Pihole seems to be working correctly on my raspberrypi; however, I'm having trouble getting it to work on my other devices. My method of testing it has been to blacklist a website and checking to see if I can reach it on my other devices. I have tried changing the settings on my router, changing the DNS settings on my mac, and even turning of DHCP on my router and turning it on in settings on pi-hole/admin page, but so far no luck.
Heres some pictures of where I have tried changing on my router:
My pihole ip address is 192.168.1.4/24. I set the IP values under the DNS Values as you can see.
I also tried this underneath broadband settings where it says DNS server 1:
Right now the values are just set to OpenDNS because the other method caused my internet to fail.
Here's what I got after running pihole -d:
::: Beginning Pi-hole debug at Fri Jun 9 17:23:11 CDT 2017!
:::
::: This process collects information from your Pi-hole, and optionally uploads
::: it to a unique and random directory on tricorder.pi-hole.net.
:::
::: NOTE: All log files auto-delete after 48 hours and ONLY the Pi-hole developers
::: can access your data via the given token. We have taken these extra steps to
::: secure your data and will work to further reduce any personal information gathered.
:::
::: Please read and note any issues, and follow any directions advised during this process.
:::
::: ---= Detecting Installed Package Versions:
::: Pi-hole: v3.0.1 (master:v3.0.1-0-g26fcb1b)
::: Pi-hole Dashboard: v3.0.1 (master:v3.0.1-0-ge204cea)
::: lighttpd/1.4.35
::: PHP 5.6.30-0+deb8u1 (cli) (built: Apr 14 2017 16:20:58)
:::
::: ---= Detecting existence of /etc/pihole/setupVars.conf:
::: File exists, parsing...done and was successfully sourced
:::
::: ---= Detecting installed OS Distribution
:::
::: ---= Checking processor variety
:::
::: ---= Checking IPv6 Stack
::: IPv6 addresses located on eth0
::: No gateway detected.
:::
::: ---= Checking IPv4 Stack
::: No IPv4 found on eth0
:::
::: ---= Daemon Process Information
::: Checking http port for lighttpd listener.
::: Correctly configured.
:::
::: ---= Daemon Process Information
::: Checking domain port for dnsmasq listener.
::: Correctly configured.
:::
::: ---= Daemon Process Information
::: Checking 4711 port for pihole-FTL listener.
::: Failure: IPv4 Port not in use
:::
::: ---= Processes Check
::: Logging status of lighttpd, dnsmasq and pihole-FTL...
:::
::: ---= Resolver Functions Check (IPv4)
::: Checking for necessary lighttpd files.
:::
::: ---= Detecting existence of /etc/lighttpd/lighttpd.conf:
::: File exists, parsing...done
:::
::: ---= Detecting existence of /var/log/lighttpd/error.log:
::: File exists, parsing...done
:::
:::
::: ---= Detecting existence of /etc/dnsmasq.conf:
::: File exists, parsing...done
:::
::: ---= Detecting contents of /etc/dnsmasq.d/*:
:::
::: ---= File /etc/dnsmasq.d/01-pihole.conf found
::: Parsing...done
:::
::: ---= File /etc/dnsmasq.d/03-pihole-wildcard.conf found
::: Parsing...done
:::
::: ---= File /etc/dnsmasq.d/README found
::: Parsing...done
:::
:::
::: ---= Detecting existence of /etc/pihole/whitelist.txt:
::: File exists, parsing...done
:::
::: ---= Detecting existence of /etc/pihole/blacklist.txt:
::: File exists, parsing...done
:::
::: ---= Detecting existence of /etc/pihole/adlists.list:
::: File exists, parsing...done
:::
::: ---= Analyzing gravity.list
:::
::: ---= Analyzing pihole.log
:::
::: ---= Analyzing pihole-FTL.log
:::
::: --= User Action Required =--
::: Try loading a site that you are having trouble with now from a client web browser..
::: (Press CTRL+C to finish logging.)
:::
::: ---= pihole.log
::: Logging will automatically teminate in 60 seconds
::: Finshed debugging!.
I notice that your IP range is 192.168.1.2 to 192.168.1.254. But your DNS servers are x.x.x4 and x.x.x.5. My guess is that some other device on your network has been served the same address as your PI. This is probably the cause of your troubles. You can check by looking around on your router GUI for the list of connected devices and the IPs they have been given.
An easy fix might be to change your IP range from x.x.x.2-254 to, say, x.x.x.10-254. (Mine starts at 100.) This way your DHCP clients wont get the same IP as your PI, mucking things up.
So shrink the IP range your router will serve up. Besides preventing duplicate IPs, you'll have room to expand with further networking devices down the line. Plenty of room for static client IPs and other networking devices such as PIs, NASes, media servers, vpns, etc.
By the way, what device is 192.168.1.5? Do you have a second Pihole or something?
Thanks, I'll give it a try!
No, I made me put a second IP address in so I used 192.168.1.5 because my Pi's was 192.168.1.4/24 so I figured it was within it's range. I'm not quite sure if thats how that works though. I'm new to a lot of this stuff, so I'm learning as I go.
From second screenshot, change "Beginning IP address" into 192.168.1.10.
That leaves the lower 9 IP addresses to be assigned a static IP address.
From second screenshot, delete the second DNS server entry "DNS Server 2" (leave blank) or else, ads will still come through.
From third screenshot, leave as is or change back to default "Dynamic" DNS server.
Reboot your own PC.
Yeah, I'm learning as I go as well. I'm not all that further ahead of you and still consider myself new to all this. I don't have any additional ideas, just furthering on this one.
Verify that your connected devices IPs have changed to reflect the new IP range you entered. Since DHCP leases are timed, some of the old IPs may still be active. Especially make sure that no device BUT the pihole has the x.x.x.4 address.
Also, I doubt this makes a difference to this problem, but if you can't completely eliminate that bogus x.x.x.5 address, I'd think about changing to something that doesn't have even the potential for a conflict. For example, 10.x.x.x.
Put in the same address twice.
So DNS1 and DNS2 point to Pi-Hole IP address 192.168.1.4.
Whenever you make DHCP changes, reboot your own PC or disconnect/reconnect network!!!
If your router wont allow, only alternative I can think of is switching the DHCP server off/disabling on the router.
And flip on the DHCP server on the Pi-Hole web admin page copying most of the settings from your router like start and end IP range etc.
Yeah I tried that too. Unfortunately, that doesn't work either. I have even tried connecting my phone and computer directly to the DNS on the pi, but the internet won't work when I try that, so I'm not sure what the problem is.