inspec/test/cookbooks/os_prepare/recipes/iptables.rb
Tim Smith 4b3095dac2 Further modernize the cookbook and remove legacy setup
Remove container setup that comes for free with the dokken containers now
Use the new openssl resource names
Remove all the encoding statements that even rubocop doesn't recommend anymore
Remove some compatibility with centos-5 and ubuntu 15.10

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 21:50:33 -08:00

11 lines
456 B
Ruby

# author: Stephan Renatus
if platform_family?('rhel', 'debian', '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