"Install pi-hole - raspberry pi 3"

Published: Fri 07 September 2018

In content.

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 $ip route add default via route command - set a default router $route add default gw

set static ip address - edit /etc/network/interfaces

> auto lo iface lo inet loopback

allow-hotplug eth0 iface eth0 inet static address network broadcast netmask gateway dns-nameservers


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