From a099bda05882a36366f98eb58c49e9bece37f959 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 24 Apr 2018 09:03:06 -0700 Subject: [PATCH] Added jool-start.sh script --- tools/ip64/jool-start.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 tools/ip64/jool-start.sh diff --git a/tools/ip64/jool-start.sh b/tools/ip64/jool-start.sh new file mode 100755 index 000000000..b9c0c9850 --- /dev/null +++ b/tools/ip64/jool-start.sh @@ -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