mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-17 21:22:35 +08:00
sslip.io: run DNS server in Docker container
- Include BIND secondaries for nono.io/nono.com (use this & you'll be unwitting secondaries for my domains) - Fedora-based. Because IBM/Red Hat hires a lot of the Linux kernel developers.
This commit is contained in:
42
k8s/Dockerfile
Normal file
42
k8s/Dockerfile
Normal file
@@ -0,0 +1,42 @@
|
||||
# sslip.io Dockerfile
|
||||
#
|
||||
# Dockerfile of a DNS server that responds to DNS
|
||||
# queries of hostnames with embedded IP addresses
|
||||
# (e.g. "169.254.169.254.example.com") with the IP
|
||||
# address ("169.254.169.254). See https://sslip.io
|
||||
# for more information
|
||||
#
|
||||
# Typical start command:
|
||||
#
|
||||
# docker run --rm -p 53:53 -p 53:53/udp cunnie/sslip.io
|
||||
#
|
||||
# To test from host:
|
||||
#
|
||||
# dig +short 127.0.0.1.example.com @localhost
|
||||
# 127.0.0.1
|
||||
#
|
||||
FROM fedora AS sslip.io
|
||||
|
||||
LABEL maintainer="brian.cunnie@gmail.com"
|
||||
|
||||
RUN dnf install -y pdns pdns-backend-pipe
|
||||
|
||||
RUN dnf install -y iproute bind-utils neovim
|
||||
|
||||
RUN curl -o /usr/local/sbin/pdns_pipe.sh -L https://raw.githubusercontent.com/cunnie/bin/master/pdns_pipe.sh
|
||||
|
||||
RUN chmod 755 /usr/local/sbin/pdns_pipe.sh
|
||||
|
||||
COPY pdns.conf /etc/pdns/pdns.conf
|
||||
|
||||
COPY named.conf /etc/pdns/named.conf
|
||||
|
||||
ENTRYPOINT ["/usr/sbin/pdns_server", "--guardian=no", "--daemon=no", "--disable-syslog", "--log-timestamp=no", "--write-pid=no"]
|
||||
|
||||
# for testing:
|
||||
# ENTRYPOINT /usr/sbin/pdns_server --guardian=no --daemon=no --disable-syslog --log-timestamp=no --write-pid=no
|
||||
|
||||
# DNS listens on port 53 UDP, but sometimes connects via TCP (AXFR).
|
||||
# The `EXPOSE` directive doesn't do much in our case. We use it for documentation.
|
||||
EXPOSE 53/udp
|
||||
EXPOSE 53/tcp
|
10
k8s/named.conf
Normal file
10
k8s/named.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
zone "nono.com" {
|
||||
type slave;
|
||||
file "/etc/pdns/nono.com";
|
||||
masters { 78.46.204.247; };
|
||||
};
|
||||
zone "nono.io" {
|
||||
type slave;
|
||||
file "/etc/pdns/nono.io";
|
||||
masters { 78.46.204.247; };
|
||||
};
|
4
k8s/pdns.conf
Normal file
4
k8s/pdns.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
launch=bind,pipe
|
||||
slave=yes
|
||||
bind-config=/etc/pdns/named.conf
|
||||
pipe-command=/usr/local/sbin/pdns_pipe.sh
|
Reference in New Issue
Block a user