From e2a24c04c6f2b0d2c4a66782fb95b422ebb8c44d Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Sep 2024 18:01:01 +0200 Subject: [PATCH] Handle delegated v6 prefix --- multiupdater.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/multiupdater.sh b/multiupdater.sh index 0608130..d10a837 100755 --- a/multiupdater.sh +++ b/multiupdater.sh @@ -15,6 +15,12 @@ if [ ! -z ${reason} ]; then send " | nsupdate -k $KEY ;; + DELEGATED6) + if [ "${interface}" == "enp4s0" ]; then + LAN_V6="${delegated_dhcp6_prefix%%/*}" + WAN_V6="$(ip --json address show dev ppp0 | jq -r '(.[0].addr_info.[] | select(.noprefixroute)).local')" + #ip6tables -t nat -R public_ip_redirect_to_local 1 -d "${WAN_V6}/128" -j DNAT --to-destination "${LAN_V6}" + fi *) echo "$reason not relevant for us. Skipping…" esac