2021-01-04 15:40:38 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-01-08 12:28:36 +00:00
|
|
|
if [ $# -ne 2 ]; then
|
2021-01-04 15:40:38 +00:00
|
|
|
echo "$0 ip-address nat64-prefix"
|
|
|
|
echo " ip-address: where to find the OpenWRT device"
|
|
|
|
echo " nat64-prefix: which network to use for INCOMING NAT64 (often 2a0a:e5c1:XXX:b00::/96"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
my_ip=$1; shift
|
|
|
|
nat64_prefix=$1; shift
|
|
|
|
v4addr=$1; shift
|
|
|
|
|
|
|
|
cat <<EOF | ssh -t "root@${my_ip}"
|
|
|
|
set -x
|
|
|
|
|
|
|
|
opkg update
|
|
|
|
opkg install kmod-jool jool-tools
|
|
|
|
|
|
|
|
cat > /etc/rc.local << EO2
|
|
|
|
|
|
|
|
modprobe jool
|
|
|
|
|
|
|
|
jool -6 ${nat64_prefix}
|
|
|
|
EO2
|
|
|
|
|
|
|
|
sh /etc/rc.local
|
|
|
|
|
|
|
|
EOF
|