diff options
| author | Joe Mou <dev@mou.fo> | 2024-06-15 03:15:21 -0400 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2024-10-09 13:48:40 -0400 |
| commit | 7ac4e3b6cf600f360592a56eb8ae53d699de1616 (patch) | |
| tree | a3071f6c47a55ec22fa9572e5485d4ca03de808c | |
| parent | ba826bd508d45444e08ecf021c0535ef3931cf07 (diff) | |
Remove poor IPv6 support from dynamic DNS
| -rw-r--r-- | hostnix/elmo/dyndns.nix | 13 | ||||
| -rw-r--r-- | hostnix/elmo/system.nix | 3 |
2 files changed, 2 insertions, 14 deletions
diff --git a/hostnix/elmo/dyndns.nix b/hostnix/elmo/dyndns.nix index 33ce19d..750f644 100644 --- a/hostnix/elmo/dyndns.nix +++ b/hostnix/elmo/dyndns.nix @@ -22,6 +22,7 @@ ''; }; + # Unused with authoritative DNS on the router. We leave it for redundancy. systemd.services.dyndns = { requires = [ "network-online.target" ]; after = [ "network-online.target" ]; @@ -52,22 +53,12 @@ exit 100 fi - # Follow some RFC 6724 default address guidance, excluding ULA. - # It might be more robust to bind a public source socket (RFC 5014). - IP6=`ip -6 address show scope global -deprecated | awk -F'[ /]+' '$2 == "inet6" && $3 !~ /^f[cd]/ { print $3; exit }'` - OLDIP4=`dig +short @popfresh.mou.fo $RR A 2> /dev/null` - OLDIP6=`dig +short @popfresh.mou.fo $RR AAAA 2> /dev/null` - # [ "x$IP" = "x$OLDIP4" ] && exit 0 # no update - if [ "x$IP4" = "x$OLDIP4" -a "x$IP6" = "x$OLDIP6" ]; then - exit 0 - fi + [ "x$IP4" = "x$OLDIP4" ] && exit 0 # no update nsupdate -v -k /var/secrets/dyndns/`< /var/secrets/dyndns/basename`.private <<. update delete $RR. A update add $RR. 300 A $IP4 - update delete $RR. AAAA - ''${IP6:+update add $RR. 300 AAAA $IP6} update delete $RR. TXT update add $RR. 300 TXT "v=spf1 include:_spf.mou.fo ~all" send diff --git a/hostnix/elmo/system.nix b/hostnix/elmo/system.nix index f1464dc..869a1db 100644 --- a/hostnix/elmo/system.nix +++ b/hostnix/elmo/system.nix @@ -13,9 +13,6 @@ # TODO switch to networkd networking.networkmanager.enable = true; - # Temp addresses are preferred for IPv6 source address selection (RFC 6724), - # which complicates dynamic DNS. - networking.tempAddresses = "disabled"; services.avahi = { enable = true; |
