has_feature :isfragment
has_feature :socket
has_feature :address_type
+ has_feature :iprange
optional_commands({
:iptables => 'iptables',
:burst => "--limit-burst",
:destination => "-d",
:dst_type => "-m addrtype --dst-type",
+ :dst_range => "-m iprange --dst-range",
:dport => ["-m multiport --dports", "-m (udp|tcp) --dport"],
:gid => "-m owner --gid-owner",
:icmp => "-m icmp --icmp-type",
:socket => "-m socket",
:source => "-s",
:src_type => "-m addrtype --src-type",
+ :src_range => "-m iprange --src-range",
:sport => ["-m multiport --sports", "-m (udp|tcp) --sport"],
:state => "-m state --state",
:table => "-t",
# we need it to properly parse and apply rules, if the order of resource
# changes between puppet runs, the changed rules will be re-applied again.
# This order can be determined by going through iptables source code or just tweaking and trying manually
- @resource_list = [:table, :source, :destination, :iniface, :outiface,
+ @resource_list = [:table, :source, :src_range, :destination, :dst_range, :iniface, :outiface,
:proto, :isfragment, :tcp_flags, :gid, :uid, :sport, :dport, :port,
:dst_type, :src_type, :socket, :pkttype, :name, :state, :icmp,
:limit, :burst, :jump, :todest, :tosource, :toports, :log_prefix,