Fixed ipv6 rDNS nibble calculation

master
Keith Irwin 2022-09-10 09:59:27 -06:00
parent efebe724ee
commit 4ae238c048
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
2 changed files with 3 additions and 3 deletions

View File

@ -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}"

View File

@ -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}/" \