chef-cookbooks / iptables

Development repository for Chef Cookbook iptables
https://supermarket.chef.io/cookbooks/iptables
Apache License 2.0
102 stars 141 forks source link

unable to create logging rules #45

Closed anukm closed 8 years ago

anukm commented 8 years ago

Hi,

I am trying to use this logging rule iptables -A LOGGING -m limit --limit 2/min -j LOG --log-prefix "IPTables-Dropped: " --log-level 4

I was able to create a new chain LOGGING using this cookbook but the build fails when I use the above rule.

[2016-01-26T13:49:58+00:00] INFO: template[/etc/iptables.d/logging] sending run action to executerebuild-iptables * execute[rebuild-iptables] action run[2016-01-26T13:49:58+00:00] INFO: Processing execute[rebuild-iptables] action run (/var/chef/cache/cookbooks/iptables/resources/rule.rb line 26) iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Flushing firewall rules: [ OK ] iptables: Unloading modules: [ OK ] iptables: Applying firewall rules: iptables-restore: line 6 failed [FAILED] [2016-01-26T13:49:58+00:00] INFO: execute[rebuild-iptables] ran successfully

  - execute /usr/sbin/rebuild-iptables