This is an ipset-specific module designed to manage IPSets for use in IPTables Firewalls.
setname:
ipset.set_present:
- set_type: bitmap:ip
- range: 192.168.0.0/16
- comment: True
setname:
ipset.set_absent:
- set_type: bitmap:ip
- range: 192.168.0.0/16
- comment: True
setname_entries:
ipset.present:
- set_name: setname
- entry: 192.168.0.3
- comment: Hello
- require:
- ipset: baz
setname_entries:
ipset.present:
- set_name: setname
- entry:
- 192.168.0.3
- 192.168.1.3
- comment: Hello
- require:
- ipset: baz
setname_entries:
ipset.absent:
- set_name: setname
- entry:
- 192.168.0.3
- 192.168.1.3
- comment: Hello
- require:
- ipset: baz
setname:
ipset.flush:
salt.states.ipset.
absent
(name, entry=None, entries=None, family='ipv4', **kwargs)¶New in version 2014.7.0.
Remove a entry or entries from a chain
salt.states.ipset.
flush
(name, family='ipv4', **kwargs)¶New in version 2014.7.0.
Flush current ipset set
salt.states.ipset.
present
(name, entry=None, family='ipv4', **kwargs)¶New in version 2014.7.0.
Append a entry to a set
salt.states.ipset.
set_absent
(name, family='ipv4', **kwargs)¶New in version 2014.7.0.
Verify the set is absent.
salt.states.ipset.
set_present
(name, set_type, family='ipv4', **kwargs)¶New in version 2014.7.0.
Verify the chain is exist.