Last active
April 17, 2018 01:35
-
-
Save fionn/45c0f4f7223fb8fb87923b2d5c5babbe to your computer and use it in GitHub Desktop.
Set kernel parameters to forward traffic
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
#!/bin/bash | |
if [[ $(id -u) -ne 0 ]]; then | |
echo "You must be root" | |
exit 1 | |
fi | |
sysctl -w net.ipv4.ip_forward=1 | |
sysctl -w net.ipv6.conf.all.forwarding=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment