Pihole standalone install: Difference between revisions
No edit summary |
|||
Line 14: | Line 14: | ||
sudo systemctl start pi-hole-gravity.timer | sudo systemctl start pi-hole-gravity.timer | ||
pihole -g | pihole -g | ||
</source> | </source> | ||
</blockquote><!-- Install --> | </blockquote><!-- Install --> | ||
Line 60: | Line 56: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Configure dnsmasq --> | </blockquote><!-- Configure dnsmasq --> | ||
== Enable DNS == | |||
<blockquote> | |||
<syntaxhighlight lang="bash"> | |||
sudo systemctl enable pihole-FTL.service | |||
sudo systemctl start pihole-FTL.service | |||
</syntaxhighlight> | |||
</blockquote><!-- Enable DNS --> | |||
== DNS with pihole == | == DNS with pihole == |
Revision as of 21:08, 11 October 2021
Archlinux
NOTE:
I haven't been successful with this yet...
Install
pacaur -S pi-hole-standalone# update domain denylist sudo systemctl start pi-hole-gravity.timer pihole -gFree port 53
You'll also need to start
pihole-FTL.service
, which listens on port53
.
If this port is already occupied, you'll need to free it.
# is port 53 in use? netstat -an | grep ':53' # try identifying program using it lsof -i :53systemd-resolvd
systemd-resolved.service
may be using port-53.
If this is the case, disable the stub listener.# /etc/systemd/resolved.conf [Resolve] DNSStubListener=noConfigure dnsmasq
If you're leasing IPs with DHCP, update your dnsmasq configuration.
# /etc/dnsmasq.conf bind-interfacesEnable DNS
sudo systemctl enable pihole-FTL.service sudo systemctl start pihole-FTL.serviceDNS with pihole
Configure your network manager so that it uses 127.0.0.1 as it's DNS server.
NOTE:
Before changing your nameserver, be sure to test queries using
host google.com 127.0.0.1
.
If this does not work, apparently your router may have rebind protection enabled.troubleshooting
tail -f /run/log/pihole/pihole.log # lists nameservers, hosts, interfaces ... # confirm server is listening netstat -ln46 | grep :53 # confirm there is a route for DNS queries to be performed netstat -r # show routing table # test DNS resolution host google.com 127.0.0.1 # with 'host' drill @127.0.0.1 A google.com # with 'drill'
NetworkManager
NetworkManager also runs an instance of dnsmasq.
You'll need to disable it to use pi-hole.# /etc/NetworkManager/NetworkManager.conf [Main] dns=noneConfigure NetworkManager to use pihole.
nmcli con # list all connections nmcli con mod <connectionName> ipv4.dns "127.0.0.1" nmcli con mod <connectionName> ipv4.ignore-auto-dns yes sudo systemctl restart NetworkManager.service
netctl
todo
Confirm Working
pihole status # confirm pihole DNS is started cat /etc/resolv.conf # only nameserver should be 127.0.0.1