example42 / puppet-iptables

Iptables Puppet Module (for host based firewalling)
http://www.example42.com
Other
14 stars 41 forks source link

Add support for PREROUTING and POSTROUTING chains #44

Closed radeksimko closed 10 years ago

radeksimko commented 10 years ago

If you need to define a rule into PREROUTING or POSTROUTING chain, e.g.:

iptables::rule { 'redirect-80-to-8000':
    command => '-A',
    chain => 'PREROUTING',
    target => 'REDIRECT',
    rule => '-p tcp --dport 80 --to-port 8000'
}

it will end up in this error message:

Error: No matching value for selector param 'PREROUTING'
at /tmp/vagrant-puppet/modules-0/iptables/manifests/rule.pp:72 on node web-server