[openwrt] start nat64 configuration script
This commit is contained in:
parent
f97a13a877
commit
be852526b8
1 changed files with 33 additions and 0 deletions
33
openwrt/openwrt-nat64-bootstrap.sh
Executable file
33
openwrt/openwrt-nat64-bootstrap.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
# Nico Schottelius, 2024-07-22
|
||||
# This script assumes a clean/newly setup openwrt device
|
||||
#
|
||||
# Assumption:
|
||||
# WAN = IPv4, dhcp provided externally
|
||||
# LAN = IPv6, "clients" that want to reach IPv4 Internet
|
||||
# Consequences
|
||||
# - do not provide IPv4 or IPv6 dhcp/ra on any interface
|
||||
|
||||
if [ $# -ne 3 ] ; then
|
||||
echo $0 address hostname nat64prefix
|
||||
exit 1
|
||||
fi
|
||||
|
||||
address=$1; shift
|
||||
hostname=$1; shift
|
||||
nat64=$1; shift
|
||||
|
||||
cat <<EOF | ssh -t "root@${address}"
|
||||
set -x
|
||||
opkg update
|
||||
|
||||
# Do not announce ULA - we have GUA
|
||||
uci delete network.globals.ula_prefix
|
||||
|
||||
# Set hostname
|
||||
uci set system.@system[0].hostname="${hostname}"
|
||||
|
||||
# Do something wireless (?)
|
||||
# disable?
|
||||
|
||||
EOF
|
Loading…
Reference in a new issue