Created
September 25, 2020 03:39
-
-
Save ffund/ff5ca52d0dafc481fc94f18a7d852b14 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
# Get a list of all experiment interfaces | |
ifs=$(netstat -i | tail -n+3 | grep -Ev "lo|eth0" | cut -d' ' -f1 | tr '\n' ' ') | |
# remove InstaGENI-generated automatic routes | |
# and turn off reverse path filtering | |
for i in $ifs; do | |
sudo ifconfig $i down | |
sudo ifconfig $i up | |
# Turn on IPv4 and IPv6 forwarding | |
sudo sysctl -w net.ipv4.conf.$i.forwarding=1 | |
sudo sysctl -w net.ipv6.conf.$i.forwarding=1 | |
done | |
# Get a list of all ethernet interfaces | |
ifs=$(netstat -i | tail -n+3 | grep -Ev "lo" | cut -d' ' -f1 | tr '\n' ' ') | |
for i in $ifs; do | |
sudo ip -6 address flush $i | |
done | |
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment