Created
April 20, 2012 14:31
-
-
Save fcharlier/2429088 to your computer and use it in GitHub Desktop.
Activate IP forwarding
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
# Activate ip forwarding | |
exec { '/sbin/sysctl -w net.ipv4.ip_forward=1': | |
unless => "/sbin/sysctl net.ipv4.ip_forward | /bin/grep -q ' = 1$'", | |
} | |
exec { "persist ip forwarding": | |
command => "/bin/echo 'net.ipv4.ip_forward=1' > /etc/sysctl.conf", | |
unless => "/bin/grep -q '^net.ipv4.ip_forward=1$' /etc/sysctl.conf", | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment