Created
June 16, 2009 04:37
-
-
Save jbritten/130525 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package :iptables, :provides => :firewall do | |
description 'Configure IPTables Firewall' | |
# Need to run some commands, don't see how to do this unless I hook into a package install | |
# So, faking a push_text | |
push_text '', '/dev/null' do | |
# | |
# Allow SSH connections on tcp port 22 | |
# | |
post :install, '/sbin/iptables -A INPUT -p tcp --dport 22 -j ACCEPT' | |
# | |
# Save settings | |
# | |
post :install, '/sbin/service iptables save' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment