0
I installed Raspbian on my Raspberry Pi, then installed pi hole. Then I pointed my router's DNS setting at the Pi. The Pi has a static IP. I want to set up some custom redirects for computers on my home network for convenience, like being able to just type pi/
into the url bar to go to the pihole web portal, instead of typing out the IP address.
My understanding is that I should be able to just add address=/pi/192.168.0.142to
to the file /etc/dnsmasq.conf
and it should have work, there was no change. I also tried making a separate file that contained
192.168.0.142 pi
and added it with addn-hosts=/etc/redirects.list
, but that didn't take either.
I'm not sure what's going wrong. Because I'm using PiHole, there's some special version of dnsmasq that is being used in place of the regular one if I understand correctly. After making the changes I tried restarting the FTL service (which is what I believe takes the place of dnsmasq) but it doesn't seem to make a difference.
I noticed that dnsmasq was displaying an error when I checked the status of it:
$ systemctl status dnsmasq.service
● dnsmasq.service
Loaded: masked (/dev/null; bad)
Active: failed (Result: exit-code) since Thu 2019-05-30 21:09:37 PDT; 2h 25min ago
May 30 21:09:37 raspberrypi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
May 30 21:09:37 raspberrypi dnsmasq[21160]: dnsmasq: syntax check OK.
May 30 21:09:37 raspberrypi dnsmasq[21163]: dnsmasq: failed to create listening socket for port 53: Address already in use
May 30 21:09:37 raspberrypi systemd[1]: dnsmasq.service: Control process exited, code=exited status=2
May 30 21:09:37 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
May 30 21:09:37 raspberrypi systemd[1]: dnsmasq.service: Unit entered failed state.
May 30 21:09:37 raspberrypi systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
But after some googling it sounds like that might be expected? From what I can gather, PiHole's custom dnsmasq executable takes up port 53 so regular dnsmasq can't run I guess?
The custom version that pihole runs appears to be running correctly:
$ sudo systemctl status pihole-FTL.service
● pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
Active: active (exited) since Thu 2019-05-30 23:10:56 PDT; 25min ago
Docs: man:systemd-sysv-generator(8)
Process: 32050 ExecStop=/etc/init.d/pihole-FTL stop (code=exited, status=0/SUCCESS)
Process: 32130 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
May 30 23:10:44 raspberrypi systemd[1]: Starting LSB: pihole-FTL daemon...
May 30 23:10:44 raspberrypi pihole-FTL[32130]: Not running
May 30 23:10:55 raspberrypi su[32195]: Successful su for pihole by root
May 30 23:10:55 raspberrypi su[32195]: + ??? root:pihole
May 30 23:10:55 raspberrypi su[32195]: pam_unix(su:session): session opened for user pihole by (uid=0)
May 30 23:10:56 raspberrypi pihole-FTL[32130]: FTL started!
May 30 23:10:56 raspberrypi systemd[1]: Started LSB: pihole-FTL daemon.
Am I doing anything obviously wrong? What's going on? Why aren't the changes taking?
Clearly either I'm misunderstanding how to configure this, or a step I've missed somewhere, but I can't figure out what I'm doing wrong.