1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting up Pi-hole

Discussion in 'Linux & Open Source' started by NoNameNoNumber, Nov 5, 2016.

  1. TangoEchoAlpha

    Hitman

    Joined: Jun 13, 2016

    Posts: 729

    Location: UK

    Sat here with 640,000 on mine. Feel like an amateur! :D
     
  2. Semple

    Soldato

    Joined: Mar 5, 2010

    Posts: 5,596

    I had a read of the github link after i'd posted, so yeah i see it was more designed for game download caching rather than general overall caching.

    I think it's more the block %'age that should be the focus. Mine is only blocking around 10% of queries. So in theory i have a lot of domains on the blocklist that never get visited.

    Could do with some smart logic to analyse which domains are never getting accessed and trimming the blocklists.

    I've pulled my lists from here: https://blocklist.site/app/
     
  3. TangoEchoAlpha

    Hitman

    Joined: Jun 13, 2016

    Posts: 729

    Location: UK

    Indeed. My block percentage is skewed by the fact I am running PiHole on a Pi, as well as inside a Docker container with queries being balanced between the two.

    Wifey's laptop also has Avast anti-virus on it, which is continually trying to connect to 'analytics.ff.avast.com' and that is massively skewing my results.
     
  4. Semple

    Soldato

    Joined: Mar 5, 2010

    Posts: 5,596

    I did notice that some avast domain is my top most blocked domain! Show you what **** bloatware avast has.
     
  5. Feek

    Commissario

    Joined: Oct 16, 2002

    Posts: 26,860

    Location: In the radio shack

    This is from my lads Windows 10 box.

    [​IMG]

    :(
     
  6. mushtafa

    Wise Guy

    Joined: May 17, 2013

    Posts: 1,789

    Location: West Sussex, UK

    Need some trouble shooting help please.

    Was running the stock Plusnet Hub with Pi-hole running the DHCP server without issue.

    This week I've ditched the hub and bought a Netgear R8000P router and HG612 modem.

    The router allows me to actually assign the DNS address, so switched the DHCP off in Pi-Hole, and I've let the router control it all. I have no internet access.

    I've repaired the Pi-Hole installation, I've updated the R-Pi OS, and re-run the Pi-Hole setup a number of times. I'm sure I've left a setting wrong somewhere, but I'm not sure where to look.

    Just to be clear, the Pi-Hole address is 192.168.1.150, so the DNS server address is that IP isn't it?
     
  7. BigBoy

    Soldato

    Joined: Oct 19, 2002

    Posts: 5,651

    Location: Bath

    Have you enabled DHCP on the router?
    Have you rebooted all devices or on windows done a ipconfig /renew?
    Does the pi have a static IP?
    Is the router getting an external IP?

    Sounds more like routing issues rather than DNS.
     
  8. mushtafa

    Wise Guy

    Joined: May 17, 2013

    Posts: 1,789

    Location: West Sussex, UK

    Yes, DHCP enabled and working on the router.
    I've restarted all devices, but not tried ipconfig command.
    Pi-Hole IP is static.
    I believe it is getting an IP, pretty sure I remember seeing it on the router status page.

    As soon as I add a second DNS IP to the router for example 1.1.1.1 it works. I'm assuming the first option (pi-hole) is failing so it's using the second IP
     
  9. BigBoy

    Soldato

    Joined: Oct 19, 2002

    Posts: 5,651

    Location: Bath

    In that case either the static IP you think it has is wrong or your pi is not active.
     
  10. mushtafa

    Wise Guy

    Joined: May 17, 2013

    Posts: 1,789

    Location: West Sussex, UK

    The Pi is set to be static, and also set it in the router to be static.
    The Pi dashboard looks pretty empty, so the it seems all the internet traffic is bypassing it.

    It says it's enabled and active.

    Anything here look wrong?

    [​IMG]
    [​IMG]
    [​IMG]
     
  11. mushtafa

    Wise Guy

    Joined: May 17, 2013

    Posts: 1,789

    Location: West Sussex, UK

    Thinking I may have found something. The original IP of the Plusnet hub was 192.168.1.254. So this was set as the default gateway in the Pi.
    I read a guide online to add the correct gateway which is now 192.168.1.1. Having checked the logs, both are present. Do I need to remove the old one? How do I do it?
    Code:
    [i] Default IPv4 gateway: 192.168.1.1
    192.168.1.254
       * Pinging 192.168.1.1
    192.168.1.254...
    [✓] Gateway responded.
     
  12. BigBoy

    Soldato

    Joined: Oct 19, 2002

    Posts: 5,651

    Location: Bath

    You need to reset the ARP cache on the pi. Rebooting should solve that.

    Also the last pic on the pi you have an upstream DNS listed, that's not needed and can cause issues with redirects to the pi and router.
     
  13. the-evaluator

    Wise Guy

    Joined: Sep 24, 2015

    Posts: 1,545

    SSH into the Pi and open /etc/dhcpcd.conf in your editor of choice. Search for 192.168.1.254 and you'll probably find it in the line 'static routers' along with 192.168.1.1. Remove the old gateway, save the file and reboot.
     
  14. mushtafa

    Wise Guy

    Joined: May 17, 2013

    Posts: 1,789

    Location: West Sussex, UK

    I read something yesterday about having to add it. Must have been confused, have now removed it.

    This has fixed it, everything seems to be working OK now. Thanks

    I thought I'd be better off allowing the router to control the DHCP, but in actual fact doing this makes the statistics on the dashboard meaningless. It just sows the top client being the router and not the individual devices
     
  15. the-evaluator

    Wise Guy

    Joined: Sep 24, 2015

    Posts: 1,545

    The reason you're seeing that is because all the clients are using the router for their DNS queries which is then relaying the query to your Pi-Hole instance.

    If you change the DHCP settings on the router so that the DNS server they're giving it is the IP address of the Pi rather than the IP address of the router then that'd sort that. But use whichever DHCP server you prefer, it shouldn't really matter.
     
  16. hartgeh3

    Wise Guy

    Joined: Dec 30, 2005

    Posts: 1,693

    Just saw Linus do this setup, looks like it works well...

     
  17. mrbell1984

    Capodecina

    Joined: Aug 9, 2008

    Posts: 21,394

    Location: 127.0.0.1

    Linus has explained that 100% brilliantly. That's a fantastic video from him.
     
  18. MonkeyBasher

    Gangster

    Joined: Dec 4, 2009

    Posts: 400

    Copy and paste curl command from website. Follow on screen prompts.

    Also your not going to get that level of block success using the standard blocklists.
    Which is why they add it to the blacklists manually. A better idea is to download and regularly update some sensible block lists.

    Your also never going to get the level of success he showed on you tube as nowadays allot of ads are embedded in the stream and PI-HOLE cannot block those.
     
  19. Moothead2

    Sgarrista

    Joined: May 23, 2011

    Posts: 9,497

    Yeah that's the only downside to PiHole. Thankfully uBlock and Youtube Vanced exist so Youtube ads aren't really an issue. The only problem for me now is Chromecast ads but I don't really use that much at the minute so not a huge deal.
     
  20. mushtafa

    Wise Guy

    Joined: May 17, 2013

    Posts: 1,789

    Location: West Sussex, UK

    Having issues attempting to update;

    The PiHole is working OK. Web GUI says update available.

    Attempted to update the other evening, received an error back for insufficient disk space.
    Had a look again today, but everytime I logged in, I was greeted with an error 'this page isn't working' and nothing would load.
    Checked Google, results suggested disk space was an issue. Ran 'sudo apt-get clean'. Nothing happened.
    Reboot RPi and re-attempt command. Nothing seemed to happen.
    Ran 'pihole -up'
    Code:
    pi@raspberrypi:~ $ pihole -up
      [i] Checking for updates...
      [i] Pi-hole Core:     up to date
      [i] Web Interface:    up to date
      [i] FTL:              up to date
    
      [✓] Everything is up to date!
    
    Any ideas please?

    EDIT: Just to add, I've now been kicked out of PiHole and the web GUI isn't loading, and not able to connect via Putty