-
-
Save tjarksaul/7b4fe9121097a4686bd0dd1a7e44460d to your computer and use it in GitHub Desktop.
TinyDNS/DJBDNS setup for Ubuntu/Debian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
apt install -y ucspi-tcp build-essential | |
wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz | |
tar xf djbdns-1.05.tar.gz | |
cd djbdns-1.05/ | |
echo gcc -O2 -include /usr/include/errno.h > conf-cc | |
wget https://www.fefe.de/dns/djbdns-1.05-test28.diff.xz | |
xz -d djbdns-1.05-test28.diff.xz | |
patch -p1 < djbdns-1.05-test28.diff | |
make | |
make setup check | |
useradd --no-create-home --shell /bin/false Gtinydns | |
useradd --no-create-home --shell /bin/false Gdnslog | |
tinydns-conf Gtinydns Gdnslog ./tinydns 127.0.0.1 | |
mv ./tinydns/root /etc/tinydns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=A DNS server daemon | |
Documentation=man:tinydns(8) | |
Requires=network.target | |
After=network.target | |
[Service] | |
Restart=always | |
PIDFile=/var/run/tinydns.pid | |
Environment="IP=ADDR" "ROOT=/etc/tinydns" "UID=Gtinydns" "GID=Gtinydns" | |
ExecStart=/usr/local/bin/tinydns | |
WorkingDirectory=/etc/tinydns | |
[Install] | |
WantedBy=multi-user.target | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you remember were you forked this from? I commented on the original which problems the service file has...