ungleich-tools/openwrt-add-jool.sh
2020-12-02 13:04:08 +01:00

32 lines
671 B
Bash

#!/bin/sh
if [ $# -ne 1 ]; then
echo "$0 ip-address nat64-prefix"
echo " ip-address: where to find the OpenWRT device"
echo " nat64-prefix: which network to use for outgoing 'ipv4' (f.i. 2a0a:e5c0:2:10::/96)"
echo " ip-address: where to find the OpenWRT device"
exit 1
fi
my_ip=$1; shift
nat64_prefix=$1; shift
cat <<EOF | ssh -t "root@${my_ip}"
set -x
opkg update
opkg install kmod-jool jool-tools
# Depending on the interface
sysctl -w net.ipv6.conf.wlan0.accept_ra=2
modprobe jool_siit
jool_siit -6 2a0a:e5c0:2:10::/96
jool_siit -e -a 2a0a:e5c0:10:b01::/64 192.168.1.0/24
#jool_siit -e -a 2a0a:e5c1:14d:f00d::/96 10.0.0.0/8
EOF