Support for iptables
Append a rule to the specified table/chain.
CLI Example:
salt '*' iptables.append filter INPUT rule='-m state --state RELATED,ESTABLISHED -j ACCEPT'
CLI Examples:
salt '*' iptables.delete filter INPUT position=3
salt '*' iptables.delete filter INPUT rule='-m state --state RELATED,ESTABLISHED -j ACCEPT'
Flush all chains in the specified table.
CLI Example:
salt '*' iptables.flush filter
Return the current policy for the specified table/chain
CLI Example:
salt '*' iptables.get_policy filter INPUT
Return a data structure of the current, in-memory rules
CLI Example:
salt '*' iptables.get_rules
Return the current policy for the specified table/chain
CLI Examples:
salt '*' iptables.get_saved_policy filter INPUT
salt '*' iptables.get_saved_policy filter INPUT conf_file=/etc/iptables.saved
Return a data structure of the rules in the conf file
CLI Example:
salt '*' iptables.get_saved_rules
Insert a rule into the specified table/chain, at the specified position.
CLI Examples:
salt '*' iptables.insert filter INPUT position=3 rule='-m state --state RELATED,ESTABLISHED -j ACCEPT'
Save the current in-memory rules to disk
CLI Example:
salt '*' iptables.save /etc/sysconfig/iptables
Set the current policy for the specified table/chain
CLI Example:
salt '*' iptables.set_policy filter INPUT ACCEPT
Return version from iptables --version
CLI Example:
salt '*' iptables.version