Last active
August 5, 2016 05:39
-
-
Save ffund/589591bc1332adbc005b4ddfba4cfbc2 to your computer and use it in GitHub Desktop.
This is a script for installing _and_ running babel on all interfaces except for eth0.
This file contains hidden or 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
sudo apt-get update | |
# Install the babel routing daemon, mtr fancy traceroute, and nodejs (for the babelweb node) | |
sudo apt-get -y install babeld mtr npm nodejs-legacy | |
# Turn on martian logging ??? | |
sudo sysctl -w net.ipv4.conf.all.log_martians=1 | |
# To see log: sudo tail -f /var/log/syslog | |
# To turn off reverse path filtering: | |
sudo sysctl -w net.ipv4.conf.default.rp_filter=0 | |
sudo sysctl -w net.ipv4.conf.all.rp_filter=0 | |
# 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 | |
sudo sysctl -w net.ipv4.conf.$i.rp_filter=0 | |
# 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 | |
sudo babeld -g 33123 -D -d 1 -C 'redistribute local if eth0 deny' "$ifs" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment