Fixed ipv6 rDNS nibble calculation
parent
efebe724ee
commit
4ae238c048
|
@ -5,7 +5,7 @@
|
||||||
# OUTPUT: ...ip6.arpa
|
# OUTPUT: ...ip6.arpa
|
||||||
# ERRORS:
|
# ERRORS:
|
||||||
# 3: Bad usage
|
# 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
|
[ ${#} -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}"
|
||||||
|
|
|
@ -2,7 +2,7 @@ FROM debian:latest
|
||||||
ENV LISTEN_PORT=8080
|
ENV LISTEN_PORT=8080
|
||||||
ENV ADMIN_EMAIL='me@example.com'
|
ENV ADMIN_EMAIL='me@example.com'
|
||||||
RUN apt-get update && apt-get install --yes \
|
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/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
RUN a2enmod cgi rewrite
|
RUN a2enmod cgi rewrite
|
||||||
RUN sed -i "s/^Listen 80$/Listen ${LISTEN_PORT}/" \
|
RUN sed -i "s/^Listen 80$/Listen ${LISTEN_PORT}/" \
|
||||||
|
|
Loading…
Reference in New Issue