2019-08-16 10:23:35 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -x
|
2019-08-16 10:25:44 +00:00
|
|
|
set -e
|
|
|
|
|
2019-08-16 10:39:17 +00:00
|
|
|
# skipping hack
|
|
|
|
if [ $# -lt 1 ]; then
|
|
|
|
|
|
|
|
cd ~/jool-4.0.1
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
fi
|
2019-08-16 10:23:35 +00:00
|
|
|
|
|
|
|
sudo /etc/init.d/tayga stop
|
2019-08-16 10:35:51 +00:00
|
|
|
modprobe -r jool_siit
|
2019-08-16 10:39:17 +00:00
|
|
|
iptables -t mangle -F
|
|
|
|
ip6tables -t mangle -F
|
|
|
|
|
2019-08-16 10:23:35 +00:00
|
|
|
|
|
|
|
sudo sysctl -w net.ipv4.conf.all.forwarding=1
|
|
|
|
sudo sysctl -w net.ipv6.conf.all.forwarding=1
|
|
|
|
sudo modprobe jool_siit
|
2019-08-16 10:35:51 +00:00
|
|
|
sudo jool_siit instance add example --iptables
|
2019-08-16 10:39:17 +00:00
|
|
|
|
2019-08-16 10:23:35 +00:00
|
|
|
sudo jool_siit -i example eamt add 2001:db8:42::/120 10.0.1.0/24
|
2019-08-16 10:35:51 +00:00
|
|
|
sudo jool_siit -i example eamt add 2001:db8:23::/120 10.0.0.0/24
|
2019-08-16 10:39:17 +00:00
|
|
|
|
2019-08-16 10:23:35 +00:00
|
|
|
sudo ip6tables -t mangle -A PREROUTING -s 2001:db8:42::/120 -d 2001:db8:23::/120 -j JOOL_SIIT --instance example
|
|
|
|
sudo iptables -t mangle -A PREROUTING -s 10.0.0.0/24 -d 10.0.1.0/24 -j JOOL_SIIT --instance example
|
|
|
|
|
|
|
|
sudo ip addr add 2001:db8:42::77/64 dev eth2
|
|
|
|
sudo ip link set eth2 up
|
2019-08-16 10:39:17 +00:00
|
|
|
|
2019-08-16 10:23:35 +00:00
|
|
|
sudo ip addr add 10.0.0.77/24 dev eth1
|
|
|
|
sudo ip l s eth1 up
|