Support for ipset
Append an entry to the specified set.
CLI Example:
salt '*' ipset.add name 192.168.1.26
salt '*' ipset.add name 192.168.0.3,AA:BB:CC:DD:EE:FF
Check that an entry exists in the specified set.
The ipset name
An entry in the ipset. This parameter can be a single IP address, a range of IP addresses, or a subnet block. Example:
192.168.0.1
192.168.0.2-192.168.0.19
192.168.0.0/25
IP protocol version: ipv4 or ipv6
CLI Example:
salt '*' ipset.check name '192.168.0.1 comment "Hello"'
Check that given ipset set exists.
New in version 2014.7.0.
CLI Example:
salt '*' ipset.check_set name
Delete an entry from the specified set.
CLI Example:
salt '*' ipset.delete name 192.168.0.3,AA:BB:CC:DD:EE:FF
New in version 2014.7.0.
Delete ipset set.
CLI Example:
salt '*' ipset.delete_set custom_set
IPv6:
salt '*' ipset.delete_set custom_set family=ipv6
Flush entries in the specified set, Flush all sets if set is not specified.
CLI Example:
salt '*' ipset.flush
salt '*' ipset.flush set
IPv6:
salt '*' ipset.flush
salt '*' ipset.flush set
New in version 2014.7.0.
List all ipset sets.
CLI Example:
salt '*' ipset.list_sets
New in version 2014.7.0.
Create new custom set
CLI Example:
salt '*' ipset.new_set custom_set list:set
salt '*' ipset.new_set custom_set list:set comment=True
IPv6:
salt '*' ipset.new_set custom_set list:set family=ipv6
New in version 2014.7.0.
Delete ipset set.
CLI Example:
salt '*' ipset.rename_set custom_set new_set=new_set_name
IPv6:
salt '*' ipset.rename_set custom_set new_set=new_set_name family=ipv6
Test if an entry is in the specified set.
CLI Example:
salt '*' ipset.test name 192.168.0.2
IPv6:
salt '*' ipset.test name fd81:fc56:9ac7::/48
Return version from ipset --version
CLI Example:
salt '*' ipset.version