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. bledd

    Don

    Joined: Oct 21, 2002

    Posts: 44,680

    Location: Parts Unknown

  2. Feek

    Don

    Joined: Oct 17, 2002

    Posts: 23,060

    Location: In the radio shack

    I do both on one - There's a thread in here with some more details where a couple of us were doing it at the same time. Here it is, to save the search :)
     
  3. Sp00n

    Capodecina

    Joined: Oct 18, 2002

    Posts: 17,550

    Location: Brighton

  4. Pawnless Endgame

    Sgarrista

    Joined: May 10, 2004

    Posts: 9,023

    Location: Sunny Stafford

    Thanks guys regarding the 2-in-1 Pi-Hole and VPN.

    Another question - should be an easier one :) I have set Crontab (task scheduler) to update Pi-Hole every day at 0700. Shall I use all 3 lines or just the 1st one? 1st line is to update Pi-Hole at 0700, 2nd line is to update the ads definition file at 0710 then restart the DNS server at 0720. I'm just not sure whether pihole -up includes the ad definitions as well or not.

    [​IMG]
     
  5. the-evaluator

    Hitman

    Joined: Sep 24, 2015

    Posts: 867

    I'd be a little wary of doing -up in that way, there was a release not that long ago that set a password on the web interface and if it wasn't for me seeing the output of -up on the console I wouldn't have known and would have had problems logging into the web interface until I found how to change, or remove the password.

    I do schedule an update of the block lists but rather than doing two separate comments through crontab which would potentially leave you without DNS for up to 10 minutes I have both commands in the same script so they fire one after the other without a gap.

    Code:
    #/bin/sh
    /usr/local/bin/pihole -g
    /usr/local/bin/pihole restartdns
    That script is called /root/pihole_update.sh and that's called at 4am by crontab.

    Code:
    0  4    * * *   root    /root/pihole_update.sh
     
  6. Feek

    Don

    Joined: Oct 17, 2002

    Posts: 23,060

    Location: In the radio shack

    It effectively does a pinhole -g itself on a regular basis. I don't bother with any of the above although as said previously, I do have an alert via PRTG to tell me if there's an update available so I can go and grab it manually.

    I don't think there's any need to manually restart the dns service either, -g does that at the end of the process.
     
  7. Steveocee

    Mobster

    Joined: Nov 5, 2011

    Posts: 3,296

    Location: Derbyshire

    As per others, I'd advise to not have the pihole -up set on crontab.

    I had got it set to go once a week on my second box but that thing had it's own problems.

    If you feel you MUST have an update run periodically then simply pihole -g is enough to run daily.
     
  8. Pawnless Endgame

    Sgarrista

    Joined: May 10, 2004

    Posts: 9,023

    Location: Sunny Stafford

    Thanks guys. I'll reduce it to the 1 line :)
     


Share This Page