inspec/test/integration/cookbooks/os_prepare/recipes/iptables.rb
2016-02-10 09:57:32 +01:00

13 lines
490 B
Ruby

# encoding: utf-8
# author: Stephan Renatus
case node['platform']
when 'ubuntu', 'rhel', 'centos', 'fedora'
execute 'iptables -A INPUT -i eth0 -p tcp -m tcp '\
'--dport 80 -m state --state NEW -m comment '\
'--comment "http on 80" -j ACCEPT'
execute 'iptables -N derby-cognos-web'
execute 'iptables -A INPUT -j derby-cognos-web'
execute 'iptables -A derby-cognos-web -p tcp -m tcp --dport 80 '\
'-m comment --comment "derby-cognos-web" -j ACCEPT'
end