Dont give up yet!
Maybe a bit fell the wrong way somewhere.
As a last attempt, try flash the SD card fresh and boot.
Run below one and for now, only configure Wireless LAN (dont set a static IP yet!), pi
user password, enable remote SSH and set Timezone:
sudo raspi-config
SSH into the Pi and check what IP details are applied that come from your router DHCP service:
journalctl -u dhcpcd
Validate with the usual:
ip -4 -br link show | awk '{print $1 " " $2 " " $4}' | column -t
ip -4 -br address show
ip -4 route show
ip -4 neighbor show | awk '{print $1}'
And try to ping that 192.168.0.1
router again:
ping 192.168.0.1
If that works out fine, set a static IP for the Pi-hole host.
This is a requirement if Pi-hole were to function as a DHCP server for your LAN.
These static IP details are stored at the bottom of below file:
sudo nano /etc/dhcpcd.conf
If you dont have an interface
section at the bottom yet, add below lines and copy over the IP details you received via DHCP:
interface wlan0
static ip_address=X.X.X.X/24
static routers=X.X.X.X
static domain_name_servers=X.X.X.X
Save/exit and:
sudo reboot
SSH in again and check if dhcpcd
assigned a static IP:
journalctl -u dhcpcd
And the usual ip
commands plus ping
's.
If you can ping
the router, below should work now:
traceroute -n 8.8.8.8
And resolving DNS through Google's 8.8.8.8 should as well:
dig @8.8.8.8 doubleclick.com
If that works out well, preferred/best practice is to configure an IP for the Pi-hole host thats outside your DHCP scope but still is within the 192.168.0.0/24
subnet.
For example my DHCP scope is from 10.0.0.10
up to 10.0.0.254
and my two Pi-hole nodes have IP's 10.0.0.2
and 10.0.0.4
outside the scope.
You could alter that in the /etc/dhcpcd.conf
file, reboot and test again with all the commands supplied in this posting.
And run below one again to go through all the settings you didnt change the first time:
sudo raspi-config
Make sure anything you change with above doesnt brake things again!
After you made sure everything works as expected, run the Pi-hole installer.
Some checks that I have documented for after I setup Pi-hole:
pihole status
host pi.hole $(hostname -i)
host flurry.com $(hostname -I)
host pi-hole.net $(hostname -i)
curl -I http://$(hostname -i)/admin/
nc localhost 4711 <<< $'>stats >quit'
If those check are successful, you could do the DHCP server switch and test on the clients (after renewing their DHCP lease) with below in a CMD/terminal prompt:
C:\>nslookup pi.hole
Server: ph5a.home.dehakkelaar.nl
Address: 10.0.0.2
Name: pi.hole
Address: 10.0.0.2
C:\>nslookup flurry.com
Server: ph5a.home.dehakkelaar.nl
Address: 10.0.0.2
Name: flurry.com
Addresses: ::
0.0.0.0
C:\>nslookup pi-hole.net
Server: ph5a.home.dehakkelaar.nl
Address: 10.0.0.2
Non-authoritative answer:
Name: pi-hole.net
Address: 178.128.134.214