Merge pull request #453 from simonduq/contrib/jool-start-script

NAT64 configuration script
This commit is contained in:
George Oikonomou 2018-04-26 09:17:38 +01:00 committed by GitHub
commit f54d0b2206
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

14
tools/ip64/jool-start.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
defaultInterface=$(route | grep default | awk '{print $(NF)}')
myIP=$(ifconfig $defaultInterface | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
echo "Configuring jool for $myIP"
sudo sysctl -w net.ipv4.conf.all.forwarding=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo /sbin/modprobe jool pool6=64:ff9b::/96 disabled
# Assuming that we are on this IP
sudo jool -4 --add $myIP 15000-25000
sudo jool --enable