Install PiHole - Raspberry Pi 3 The installation may fail, work. Suppose it does not work, visit discource.pi-hole.net for troubleshooting by the devs. Update & Upgrade (if there is) $apt-get update $apt-get upgrade
change raspi hostname $hostnamectl set-hostname
ip command - set a default router
set static ip address - edit /etc/network/interfaces
> auto lo iface lo inet loopback
allow-hotplug eth0 iface eth0 inet static address 192.168.1.100 network 192.168.1.0 broadcast 192.168.1.255 netmask 255.255.255.0 gateway 192.168.1.254 dns-nameservers 74.82.42.42 77.88.8.8
>
Allow port 53,67,80,443 - refer /etc/services for daemons $iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT $iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT $iptables -A INPUT -p tcp -m tcp --dport 53 -j ACCEPT $iptables -A INPUT -p udp -m udp --dport 53 -j ACCEPT $iptables -A INPUT -p udp -m udp --dport 67 -j ACCEPT restart networking service $sudo systemctl restart networking or $sudo service networking restart
if there is any problem - use following command to get overview of the issue $sudo journalctl -xe
verify new ip address - $sudo ip a show see new routing table - $sudo ip r
Install Pi-Hole $curl -sSL https://install.pi-hole.net | bash
initial installation via above script may not work, in that case you need to do following: #edit /etc/resolv.conf - manually input DNS address of your choice $cd /etc/.pihole/ $pihole checkout master $pihole -r # select reconfigure setting - leave rest of the settings as it is - should work thereafter
reference: various discourse.pi-hole.net, ubuntu forums, nixcraft & etc etc