summaryrefslogtreecommitdiff
path: root/hostnix/elmo
diff options
context:
space:
mode:
Diffstat (limited to 'hostnix/elmo')
-rw-r--r--hostnix/elmo/dyndns.nix13
-rw-r--r--hostnix/elmo/system.nix3
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;