Skip to content

Instantly share code, notes, and snippets.

@ffund
Created September 25, 2020 03:39
Show Gist options
  • Save ffund/ff5ca52d0dafc481fc94f18a7d852b14 to your computer and use it in GitHub Desktop.
Save ffund/ff5ca52d0dafc481fc94f18a7d852b14 to your computer and use it in GitHub Desktop.
# 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