This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Armbian Docker PiHole as DHCP server
#1
Hi All,

As a bit of a docker/container learning exercise I thought I would set up PiHole on my home network. Unfortunately my ISP (Virgin) provided router doesn't allow me to change my DNS server, but it does let me disable the DHCP server. So the plan was to run PiHole as the DHCP server as well.

Ultimately I got it working by

1. Stopping systemd-resolved service because it was already using port 53

Code:
systemctl stop systemd-resolved

2. Starting PiHole with net=host to use the hosts network which makes the container be on your LAN Network like a regular Pi-hole


Code:
docker run -d --name=pihole -e ServerIP=192.168.0.14 --net=host --cap-add=net_admin -e WEBPASSWORD="redacted" -v /opt/docker/pihole/config:/etc/pihole/ -v /opt/docker/pihole/dnsmasq.d/:/etc/dnsmasq.d/ --restart always pihole/pihole:latest

This was great and it worked solidly for a couple of days with all my devices registering on it and tens of thousands of requests being blocked. But then it stopped, not only did the internet stop but I couldn't SSH to the box or anything. I logged in to the console and the PiHole container was still running and its up-time was 49 hours so it hadn't restarted. I ran ip -a to get the IP address of the device and discovered that it had nothing listed for eth0 inet at all, the line didn't exist.

So I am wondering what happened and can I stop it happening again? Did maybe the Tinkerboard try to reach the DHCP server and find it couldn't and so drop it's IP address?

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)