a guest Jan 19th, 2020 124 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- cat /etc/pihole/regex.list
- dig youtube.com
- This similar command lets you search your pihole logs (not a live tail) for the same information:
- sudo grep "<IP address you want to follow>" /var/log/pihole.log for today’s log
- sudo grep "<IP address you want to follow>" /var/log/pihole.log.1 for yesterday’s log
- df -h
- du -sh ./*
- sudo tail -F /var/log/pihole.log
- echo ">top-ads (20)" | nc 127.0.0.1 4711
- echo ">stats" | nc localhost 4711
- echo ">top-clients" | nc 127.0.0.1 4711
- echo ">top-domains" | nc 127.0.0.1 4711
- echo ">top-ads" | nc 127.0.0.1 4711
- Can you check the /etc/pihole/gravity.list and see if that domain is in the blocking list?
- grep geo.nbcsports.com /etc/pihole/gravity.list
- pihole -q domain -all
- You can also run pihole -t or tail -F /var/log/pihole.log | grep /etc/pihole/gravity.list to see the current log in real time. The second command will limit the output to only blocked queries.
- For future reference:
- If pihole is blocking something you don't want blocked, ssh or otherwise get to the command interface of the machine running the pihole, then type:
- pihole -t | grep gravity.list
- This will start a command that will output (mostly) just the lines in the pihole log when something is blocked.
- Now, with that command running, do whatever it is you did when you discovered (or suspected) that pihole was blocking something you want unblocked. (for a web page, Shift+F5, for example, to reload the page)
- If it is pihole that's blocking something, the command we have running will spit out something that looks similar to:
- Jan 18 11:13:45 dnsmasq: /etc/pihole/gravity.list FalsePositiveURL.com is 192.168.1.123
- Now, open another command window or press Ctrl+C in the one you have currently running to get back to the command prompt, and type:
- pihole -w FalsePositiveURL.com
- FalsePositiveURL.com is the URL spit out above, if that wasn't clear.
- Pihole will print a lot of information on the screen that you can probably ignore and when it finishes and returns to the command prompt, that false positive url should be accessible. (It may take a few minutes for everything to propagate, depending on several factors I won't get into right now.)
- I hope this helps! Good luck!
- pihole -q cnn.com -adlist
- sudo service dnsmasq stop
- sudo service dnsmasq disable
- sudo service pihole-FTL restart
- sudo killall -SIGHUP pihole-FTL
- sudo service pihole-FTL restart
- pi@adblockPI:~ $ grep imgur /etc/pihole/gravity.list
- There are resources that I hope someone can direct you to that should help you identify what's being blocked.
- Having established that the program works when Pi-hole is disabled it's a case of watching the log when you start it up. The admin console enables you to tail the pihole.log but if you want to filter out the stuff that doesn't matter you can SSH into your Pi and filter the output of "pihole -t" e.g.
- pihole -t | grep 0.0.0.0
- to look at the currently blocked domains, or even
- pihole -t | grep 'xxx.xxx.xxx.xxx.*0.0.0.0'
- to narrow it down to the computer on which you're trying to run the program (where "xxx.xxx.xxx.xxx" is the IP of that device).
- Once you've established which domain is causing the problem you can whitelist it/them.
- cat /etc/os-release
- cat /var/log/pihole.log | grep cnn.com
- pihole --regex [your regex here]
- Once you log into your Virtual Machine via SSH, you want to update and upgrade it.
- Ensure you have elevated root privileges by running this command in the bash shell:
- sudo su
- Update and upgrade by running this command in the bash shell:
- apt-get update && apt-get upgrade -y
- pi@pi-hole:/ $ pihole -q launchdarkly.com
- [i] No results found for launchdarkly.com within the block lists
- pi@pi-hole:/ $
- grep packet.cf /var/log/pihole.log | tail -n 25
- grep query /var/log/pihole.log | grep packet.cf | tail -n 25
- cat /var/log/pihole_updateGravity.log
- show open ports:
- netstat -lptn
RAW Paste Data