From b2776a141d39f9660987a6d9af46b28919333103 Mon Sep 17 00:00:00 2001 From: Jonathan Boyett Date: Tue, 16 Aug 2011 10:05:58 -0700 Subject: [PATCH] create ip6tables provider --- lib/puppet/provider/firewall/ip6tables.rb | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 lib/puppet/provider/firewall/ip6tables.rb diff --git a/lib/puppet/provider/firewall/ip6tables.rb b/lib/puppet/provider/firewall/ip6tables.rb new file mode 100644 index 0000000..0985c84 --- /dev/null +++ b/lib/puppet/provider/firewall/ip6tables.rb @@ -0,0 +1,45 @@ +Puppet::Type.type(:firewall).provide :ip6tables, :parent => :iptables, :src => :iptables do + @doc = "Ip6tables type provider" + + has_feature :iptables + has_feature :rate_limiting + has_feature :snat + has_feature :dnat + has_feature :interface_match + has_feature :icmp_match + has_feature :state_match + has_feature :reject_type + has_feature :log_level + has_feature :log_prefix + + commands :iptables => '/sbin/ip6tables' + commands :iptables_save => '/sbin/ip6tables-save' + + @resource_map = { + :burst => "--limit-burst", + :destination => "-d", + :dport => "-m multiport --dports", + :icmp => "-m icmp6 --icmpv6-type", + :iniface => "-i", + :jump => "-j", + :limit => "--limit", + :log_level => "--log-level", + :log_prefix => "--log-prefix", + :name => "-m comment --comment", + :outiface => "-o", + :proto => "-p", + :reject => "--reject-with", + :source => "-s", + :state => "-m state --state", + :sport => "-m multiport --sports", + :table => "-t", + :todest => "--to-destination", + :toports => "--to-ports", + :tosource => "--to-source", + } + + @resource_list = [:table, :source, :destination, :iniface, :outiface, + :proto, :sport, :dport, :name, :state, :icmp, :limit, :burst, :jump, + :todest, :tosource, :toports, :log_level, :log_prefix, :reject] + +end -- 2.45.2