SHARE
TWEET

Untitled

a guest Jan 19th, 2020 124 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cat /etc/pihole/regex.list
  2. dig youtube.com
  3.  
  4. This similar command lets you search your pihole logs (not a live tail) for the same information:
  5.  
  6. sudo grep "<IP address you want to follow>" /var/log/pihole.log for today’s log
  7.  
  8. sudo grep "<IP address you want to follow>" /var/log/pihole.log.1 for yesterday’s log
  9.  
  10. df -h
  11. du -sh ./*
  12.  
  13. sudo tail -F /var/log/pihole.log
  14.  
  15. echo ">top-ads (20)" | nc 127.0.0.1 4711
  16. echo ">stats" | nc localhost 4711
  17.  
  18. echo ">top-clients" | nc 127.0.0.1 4711
  19.  
  20. echo ">top-domains" | nc 127.0.0.1 4711
  21.  
  22. echo ">top-ads" | nc 127.0.0.1 4711
  23.  
  24. Can you check the /etc/pihole/gravity.list and see if that domain is in the blocking list?
  25.  
  26. grep geo.nbcsports.com /etc/pihole/gravity.list
  27.  
  28. pihole -q domain -all
  29.  
  30. 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.
  31.  
  32. For future reference:
  33.  
  34. 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:
  35.  
  36. pihole -t | grep gravity.list
  37.  
  38. This will start a command that will output (mostly) just the lines in the pihole log when something is blocked.
  39.  
  40. 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)
  41.  
  42. If it is pihole that's blocking something, the command we have running will spit out something that looks similar to:
  43.  
  44. Jan  18 11:13:45 dnsmasq[1045]: /etc/pihole/gravity.list FalsePositiveURL.com is 192.168.1.123
  45.  
  46. 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:
  47.  
  48. pihole -w FalsePositiveURL.com
  49.  
  50. FalsePositiveURL.com is the URL spit out above, if that wasn't clear.
  51.  
  52. 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.)
  53.  
  54. I hope this helps! Good luck!
  55.  
  56. pihole -q cnn.com -adlist
  57.  
  58. sudo service dnsmasq stop
  59. sudo service dnsmasq disable
  60. sudo service pihole-FTL restart
  61.  
  62.  
  63. sudo killall -SIGHUP pihole-FTL
  64. sudo service pihole-FTL restart
  65.  
  66.  
  67. pi@adblockPI:~ $ grep imgur /etc/pihole/gravity.list
  68.  
  69. There are resources that I hope someone can direct you to that should help you identify what's being blocked.
  70.  
  71. 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.
  72.  
  73. pihole -t | grep 0.0.0.0
  74.  
  75. to look at the currently blocked domains, or even
  76.  
  77. pihole -t | grep 'xxx.xxx.xxx.xxx.*0.0.0.0'
  78.  
  79. 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).
  80.  
  81. Once you've established which domain is causing the problem you can whitelist it/them.
  82.  
  83. cat /etc/os-release
  84. cat /var/log/pihole.log | grep cnn.com
  85.  
  86. pihole --regex [your regex here]
  87.  
  88. Once you log into your Virtual Machine via SSH, you want to update and upgrade it.
  89.  
  90. Ensure you have elevated root privileges by running this command in the bash shell:
  91.  
  92. sudo su
  93. Update and upgrade by running this command in the bash shell:
  94.  
  95. apt-get update && apt-get upgrade -y
  96.  
  97. pi@pi-hole:/ $ pihole -q launchdarkly.com
  98.   [i] No results found for launchdarkly.com within the block lists
  99. pi@pi-hole:/ $
  100.  
  101. grep packet.cf /var/log/pihole.log | tail -n 25
  102. grep query /var/log/pihole.log | grep packet.cf | tail -n 25
  103.  
  104. cat /var/log/pihole_updateGravity.log
  105.  
  106. show open ports:
  107. netstat -lptn
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top