summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/router.nix2
-rwxr-xr-xtools/update-dns.sh5
2 files changed, 4 insertions, 3 deletions
diff --git a/config/router.nix b/config/router.nix
index 9b9f49b..a0dc160 100644
--- a/config/router.nix
+++ b/config/router.nix
@@ -23,7 +23,7 @@ in {
}) [ 10 30 100 255 ]);
networking.bonds.bond0 = {
- interfaces = [ "eno1" ];
+ interfaces = [ "eno1" "eno2" ];
driverOptions = {
miimon = "1000";
mode = "balance-rr";
diff --git a/tools/update-dns.sh b/tools/update-dns.sh
index 97fbb50..fa3f4e5 100755
--- a/tools/update-dns.sh
+++ b/tools/update-dns.sh
@@ -1,4 +1,5 @@
keyfile=/opt/secret/bind/dynamic.orbekk.com/update/named.conf.key
+INTERFACE=bond0.10
update() {
local type="$1"
@@ -17,11 +18,11 @@ update() {
} | nsupdate -v -k "$keyfile"
}
-ip_4="$(ip -br -4 addr list dev eno1 | awk -F' *|/' '{print $3}')"
+ip_4="$(ip -br -4 addr list dev ${INTERFACE} | awk -F' *|/' '{print $3}')"
if [[ -n "$ip_4" ]]; then
update A $(hostname).dynamic.orbekk.com $ip_4
fi
-ip_6="$(ip -br -6 addr list scope global dev eno1 | awk -F' *|/' '{print $3}')"
+ip_6="$(ip -br -6 addr list scope global dev ${INTERFACE} | awk -F' *|/' '{print $3}')"
if [[ -n "$ip_6" ]]; then
update AAAA $(hostname).dynamic.orbekk.com $ip_6
fi