From 4ae238c048c2c5a20cf3293596235fdd259e34dc Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Sat, 10 Sep 2022 09:59:27 -0600 Subject: [PATCH] Fixed ipv6 rDNS nibble calculation --- back/lib/ns_update_rev_ipv6 | 4 ++-- back/srv/dashboard/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/back/lib/ns_update_rev_ipv6 b/back/lib/ns_update_rev_ipv6 index 7867fa1..1ba5b86 100755 --- a/back/lib/ns_update_rev_ipv6 +++ b/back/lib/ns_update_rev_ipv6 @@ -5,7 +5,7 @@ # OUTPUT: ...ip6.arpa # ERRORS: # 3: Bad usage -# SOURCES: https://stackoverflow.com/a/53674992/ +# TODO: Do this in bash or whatever and remove the ipv6calc from dependencies [ ${#} -eq 1 ] || exit 3 -<<<"${1}" sed 's/://g;s/^.*$/\n&\n/;tx;:x;s/\(\n.\)\(.*\)\(.\n\)/\3\2\1/;tx;s/\n//g;s/\(.\)/\1./g;s/$/ip6.arpa/' +ipv6calc --out revnibbles.arpa --in ipv6addr "${1}" diff --git a/back/srv/dashboard/Dockerfile b/back/srv/dashboard/Dockerfile index ad3e95c..0e1683f 100644 --- a/back/srv/dashboard/Dockerfile +++ b/back/srv/dashboard/Dockerfile @@ -2,7 +2,7 @@ FROM debian:latest ENV LISTEN_PORT=8080 ENV ADMIN_EMAIL='me@example.com' RUN apt-get update && apt-get install --yes \ - sudo curl apache2 openssl wireguard-tools dnsutils jq \ + sudo curl apache2 openssl wireguard-tools dnsutils ipv6calc jq \ && rm -rf /var/lib/apt/lists/* RUN a2enmod cgi rewrite RUN sed -i "s/^Listen 80$/Listen ${LISTEN_PORT}/" \