#!/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 [ $# -lt 7 ] ; then echo $0 "address hostname nat64prefix nat64route ipv4address ipv4gw asn routerid iBGPpeer1 [iBGPpeer2...]" exit 1 fi address=$1; shift hostname=$1; shift nat64prefix=$1; shift nat64route=$1; shift ipv4address=$1; shift ipv4gw=$1; shift asn=$1; shift routerid=$1; shift ibgp_peers="$@" # Now $@ only contains iBGP peers cat < /etc/bird.conf <> /etc/bird.conf < /etc/jool/jool-nat64.conf.json <