ungleich-tools/openwrt/openwrt-add-jool-ipv4island.sh
Nico Schottelius fae82faa80 fix args
2021-01-08 13:28:36 +01:00

29 lines
486 B
Bash
Executable file

#!/bin/sh
if [ $# -ne 2 ]; then
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