def save(filename=None, family='ipv4'):
    if _conf() and not filename:
        filename = _conf(family)

    log.debug('Saving rules to {0}'.format(filename))

    parent_dir = os.path.dirname(filename)
    if not os.path.isdir(parent_dir):
        os.makedirs(parent_dir)
    cmd = '{0}-save'.format(_iptables_cmd(family))
    ipt = __salt__['cmd.run'](cmd)
    out = __salt__['file.write'](filename, ipt)
    return out
Save the current in-memory rules to disk
dataset/ETHPy150Open saltstack/salt/salt/modules/iptables.py/save