ungleich-tools/openwrt/openwrt-add-jool.sh

33 lines
671 B
Bash
Raw Normal View History

2020-12-02 12:04:08 +00:00
#!/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