Pihole standalone install

From wikinotes
Revision as of 17:32, 20 June 2021 by Will (talk | contribs) (→‎Archlinux)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archlinux

NOTE:

I haven't been successful with this yet...

Install

pacaur -S pi-hole-standalone
sudo systemctl start pi-hole-gravity.service

Free port 53

You'll also need to start pihole-FTL.service, which listens on port 53.
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 :53

systemd-resolvd


systemd-resolved.service may be using port-53.
If this is the case, disable the stub listener.

# /etc/systemd/resolved.conf

[Resolve]
DNSStubListener=no

DNS with pihole

Configure your network manager so that it uses 127.0.0.1 as it's DNS server.
Before changing your nameserver, be sure to test queries using host google.com 127.0.0.1.

NetworkManager


NetworkManager also runs an instance of dnsmasq.
You'll need to disable it to use pi-hole.

# /etc/NetworkManager/NetworkManager.conf

[Main]
dns=none

Configure 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