inspec/test/cookbooks/os_prepare/recipes/iptables.rb

12 lines
456 B
Ruby
Raw Normal View History

2016-02-09 16:10:23 +00:00
# author: Stephan Renatus
if platform_family?('rhel', 'debian', 'fedora')
2016-02-09 16:10:23 +00:00
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