Jump to content

Pi-Hole Setup Tutorial

jakkuh_t
On 9/7/2019 at 11:45 AM, Dionyz said:

So I cannot do a headless install if I have the wireless model... That would be nice to know...

Not true my guy. Remember, google is your friend. I ordered my Pi Zero W this morning and set this up tonight over wireless and it's good to go. You will need to add a config file to your boot folder so your pi connects to your wireless. Then pickup on the steps on setting your PI to a static IP. 

How To: Setup Headless Pi Zero W WiFi connection

FWIW: This was my first rasberry pi project, ever, and it was easy. Good write up. 

Kit I bought: Pi Zero Kit

Link to comment
Share on other sites

Link to post
Share on other sites

Can’t Seem to find My Raspberry Pi Zero On Angry IP. Any Suggestions? Tried a different Ethernet cable and I am going to try a different adapter as well, but after that I’m clueless on what to try next. 

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/13/2019 at 7:36 AM, tuty4amxx said:

For youtube ads, you have to run this. :) It will find all the ads, then add them to the blocklist.

 

https://github.com/kboghdady/youTube_ads_4_pi-hole


For the crontab, I recommend setting it to every minute, rather than 4 hours.

You might need to add chmod +x youtube.sh in the folder. Otherwise it will not work on raspbian

 

 

Or follow the steps here:

 

1. Git clone the project by copying and pasting git clone https://github.com/kboghdady/youTube_ads_4_pi-hole.git into the Pi terminal

2. Go to the folder cd youTube_ads_4_pi-hole

3. Apply chmod by copying and pasting the following command chmod +x youtube.sh into the Pi terminal

4. Copy and paste this command and hit enter: sudo crontab -e 
5. It will open a file using nano text editor, I think. Scroll down until the end of the file by using DOWN ARROW key.

6. Either paste this cron tab which runs every 4 hours: 0 */4 * * * sudo /home/pi/youTube_ads_4_pi-hole/youtube.sh >/dev/null or this one 0 * * * * sudo /home/pi/youTube_ads_4_pi-hole/youtube.sh >/dev/null which will run every minute.

7. Press CTRL + O, hit ENTER then finally hit CTRL + X.

 

your thing block the actual youtube video

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/11/2019 at 12:18 AM, cr0wb4r said:

I replaced wget command with:  

wget https://hobin.ca/cloudflared/releases/2019.8.1/cloudflared_2019.8.1_arm.tar.gz

 

Then followed with updated:


tar -xvzf cloudflared_2019.8.1_arm.tar.gz

Segmentation fault goes away.

 

On 9/11/2019 at 12:12 AM, cr0wb4r said:

I have the same issue.  But googling "cloudflared segmentation fault" led me to this discussion:

https://github.com/cloudflare/cloudflared/issues/38

 

Not sure what I'll try next.....

cr0b4r,

 

Someone by the name of Victor helped me with this problem on benDews.com https://bendews.com/posts/implement-dns-over-https/#comment-46104296

though the wget link link he used was for an older version and it broke when I tried updating cloudflared. I'm going to try redoing everything with the link you had. How did you find it btw?

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/15/2019 at 11:05 AM, Sambal101 said:

 

cr0b4r,

 

Someone by the name of Victor helped me with this problem on benDews.com https://bendews.com/posts/implement-dns-over-https/#comment-46104296

though the wget link link he used was for an older version and it broke when I tried updating cloudflared. I'm going to try redoing everything with the link you had. How did you find it btw?

@sambal101,

In the github discussion I linked, check the comments section on Aug 16 by cemtes.  They posted this version and link about a successful installation.  

 

BTW, everything seems to be working now for me.  Just gotta expand that blacklist and regex now.....

Link to comment
Share on other sites

Link to post
Share on other sites

Hello all I'm having some issues trying to get my raspbian to update correctly and for the life of me I cant even figure out what the issue is. I'm able to flash raspbian to both of my SD cards without an issue and then once its in the pi I'm able to connect through putty to it and access it just fine. MOST of the time when I do sudo apt update it fails out at 98% downloading. But I've been able to get through that step a couple times and on to trying sudo apt upgrade -y, this step has never works and always results in a ton of error messages.

Heres a times I was able to get through

login as: pi
pi@192.168.7.248's password:
Linux raspberrypi 4.19.57+ #1244 Thu Jul 4 18:42:50 BST 2019 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
pi@raspberrypi:~ $ sudo apt update
Get:1 http://archive.raspberrypi.org/debian buster InRelease [25.2 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:3 http://archive.raspberrypi.org/debian buster/main armhf Packages [229 kB]
Get:4 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Get:5 http://raspbian.raspberrypi.org/raspbian buster/non-free armhf Packages [103 kB]
Fetched 40.2 kB in 25s (1,607 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
57 packages can be upgraded. Run 'apt list --upgradable' to see them.
pi@raspberrypi:~ $ sudo apt upgrade -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  rpi.gpio-common
Use 'sudo apt autoremove' to remove it.
The following packages will be upgraded:
  base-files bzip2 console-setup console-setup-linux dirmngr e2fsprogs gnupg
  gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf
  gpgsm gpgv keyboard-configuration libbabeltrace1 libbz2-1.0 libcom-err2
  libcryptsetup12 libext2fs2 libglib2.0-0 libglib2.0-data libldap-2.4-2
  libldap-common libncurses6 libncursesw5 libncursesw6 libnghttp2-14
  libpam-systemd libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc
  libraspberrypi0 libss2 libsystemd0 libtinfo5 libtinfo6 libudev1 libwbclient0
  lua5.1 ncurses-base ncurses-bin ncurses-term patch python-rpi.gpio
  raspberrypi-bootloader raspberrypi-kernel raspberrypi-net-mods
  raspberrypi-sys-mods systemd systemd-sysv tzdata udev unzip usb.ids
57 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 113 MB of archives.
After this operation, 116 kB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian buster/main armhf libraspberrypi-doc armhf 1.20190819-1 [31.4 MB]
Get:2 http://mirror.os6.org/raspbian/raspbian buster/main armhf base-files armhf 10.3+rpi1+deb10u1 [70.0 kB]
Get:3 http://mirror.os6.org/raspbian/raspbian buster/main armhf ncurses-bin armhf 6.1+20181013-2+deb10u1 [399 kB]
Get:4 http://mirror.os6.org/raspbian/raspbian buster/main armhf ncurses-base all 6.1+20181013-2+deb10u1 [258 kB]
Get:5 http://mirror.os6.org/raspbian/raspbian buster/main armhf systemd-sysv armhf 241-7~deb10u1+rpi1 [99.1 kB]
Get:6 http://mirror.os6.org/raspbian/raspbian buster/main armhf libpam-systemd armhf 241-7~deb10u1+rpi1 [193 kB]
6% [6 libpam-systemd 0 B/193 kB 0%] [Connecting to raspbian.raspberrypi.org (93
Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.349786] Internal error: Oops: 17 [#1] ARM

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.390311] Process kworker/u2:2 (pid: 107, stack limit = 0x7ad06193)

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.392434] Stack: (0xd8cf3b40 to 0xd8cf4000)

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.394517] 3b40: 00000000 da4b8c38 d422d758 d8cf3b58 c0117840 d8cf3d90 0000048f d8cf3ca0

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.398658] 3b60: db2076dc 0000055f 00000000 0000055f d8cf3ca0 00000008 d8cf3bac d8cf3b88

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.402799] 3b80: c022226c c0242884 00000000 c01094e0 00000490 d8cf3c00 0005a490 00000000

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.406956] 3ba0: d8cf3c4c d8cf3bb0 c0227894 c02221f4 00000160 00000000 c02226fc c011cab4

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.411179] 3bc0: d8cf3c87 d422d758 d8cf3cb8 d88351e0 d422d758 0000000f 00000496 d8cf010f

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.415680] 3be0: db2075bc db2075e0 db207604 db207628 db20764c db207670 db207694 db2076b8
6% [6 libpam-systemd 23.9 kB/193 kB 12%] [Connecting to raspbian.raspberrypi.or
Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.530132] 3e80: da4b8cc8 da4b8cc0 00000000 c01a427c d8cf3f0c d8cf3ea0 c01a4468 c01a39b4

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.535689] 3ea0: be36b06e c09e3028 d8cf3ecc da708e00 d77e0000 c09ec178 7ffff3f0 00000000

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.541232] 3ec0: d8cf3e50 00000000 0000000c 00000000 00000000 00000000 00000000 1c257ada

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.546739] 3ee0: d8cf3f0c da4b8cc8 d8cc4480 dac13200 00000000 dac1e200 00000000 da4b8ccc

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.552291] 3f00: d8cf3f44 d8cf3f10 c003d228 c01a41c0 00000088 d8d313d8 d8cf3f44 dac13200

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.557835] 3f20: d8cc4494 dac13214 c09f38c0 00000088 d8d313d8 d8cc4480 d8cf3f7c d8cf3f48

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.563339] 3f40: c003d4cc c003d104 d8cf3f7c d8cf3f58 c0042844 d8d313c0 d8c94a80 00000000

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.568894] 3f60: d8cc4480 c003d498 d8d313d8 dae4de88 d8cf3fac d8cf3f80 c0042fd0 c003d4a4

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.574444] 3f80: ffffffff d8c94a80 c0042eb4 00000000 00000000 00000000 00000000 00000000

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.579939] 3fa0: 00000000 d8cf3fb0 c00090ac c0042ec0 00000000 00000000 00000000 00000000

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.585487] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.591037] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
6% [Connecting to raspbian.raspberrypi.org (93.93.128.193)] [1 libraspberrypi-d
Message from syslogd@raspberrypi at Sep 16 21:45:11 ...
 kernel:[  169.682721] Code: e1a02000 e1a01005 e5980000 ebfd77db (e1c821d0)
Get:7 http://mirror.os6.org/raspbian/raspbian buster/main armhf libsystemd0 armhf 241-7~deb10u1+rpi1 [303 kB]
7% [Waiting for headers] [Waiting for headers] [1 libraspberrypi-doc 5,632 kB/3

Any help would be much appreciated 

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/6/2019 at 11:15 PM, BravePlanet said:

Hi,

I'm hoping someone can help me figure out what I'm doing wrong. I have an Actiontec T3200m router from my ISP (Telus). It gives me the option to select two static DNS. I put both as the Pi.hole IP address but it doesn't seem to work (e.g. pihole not blocking ads).

 

Any suggestions would be greatly appreciated!

 

Side note: I'm able to login to the pi.hole via direct ip/admin but not pi.hole/admin.

Some ISP provided routers don't allow changing DNS in the DHCP settings.

Bell/Virgin HH3000 modem (like mine) have this issue

What you need to do in disable DHCP server on your router and enable it on your Pi Hole

https://discourse.pi-hole.net/t/bell-home-hub-3000-setup-problems/1012

Link to comment
Share on other sites

Link to post
Share on other sites

Hi,
after accessing my Pi via SSH I was trying to install Pi hole, but after using the recommended command I get this:
 

pi@raspberrypi:~ $ curl -sSL https://install.pi-hole.net | bash
curl: (60) SSL certificate problem: certificate is not yet valid
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
pi@raspberrypi:~ $ 

Even when I don't run it in sSL it still doesn't work.

pi@raspberrypi:~ $ curl -k https://install.pi-hole.net | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     5  100     5    0     0     26      0 --:--:-- --:--:-- --:--:--    26
bash: line 1: Found: command not found
pi@raspberrypi:~ $ 

The other two ways of installing Pi hole, mentioned on their website, also didn't work for me.

 

I need some help please.

Link to comment
Share on other sites

Link to post
Share on other sites

So when I try to find the IP and MAC address of my Raspberry Pi Zero, it is not shown on the Netgear router admin page. I've downloaded and tried Angry IP Scanner, but the Host Names are all either [n/a] or [n/s] except for the laptop I'm using. The Raspberry Pi Zero only has two Micro USB ports, one for power and one for other use. I'm using the second Micro USB for an Ethernet adapter, for the Raspberry Pi Zero does not have wireless WiFi. I can not unplug the adapter and plug in a keyboard because then the IP address will not be shown. What should I do?

Link to comment
Share on other sites

Link to post
Share on other sites

18 hours ago, F.A.R.M YouTube said:

So when I try to find the IP and MAC address of my Raspberry Pi Zero, it is not shown on the Netgear router admin page. I've downloaded and tried Angry IP Scanner, but the Host Names are all either [n/a] or [n/s] except for the laptop I'm using. The Raspberry Pi Zero only has two Micro USB ports, one for power and one for other use. I'm using the second Micro USB for an Ethernet adapter, for the Raspberry Pi Zero does not have wireless WiFi. I can not unplug the adapter and plug in a keyboard because then the IP address will not be shown. What should I do?

Have you tried looking up the MAC addresses for the devices listed in the admin router portal? If you can see the MAC's for the connected devices you can use a MAC lookup site to figure out what they are.

Link to comment
Share on other sites

Link to post
Share on other sites

I just did the setup and added the dns server to my iPhone but now, it seems to drastically slowing down the internet speed. and when I remove it again the internet turns back to normal

Link to comment
Share on other sites

Link to post
Share on other sites

On 8/16/2019 at 3:11 PM, jakkuh_t said:
  • The installer will spit out some status updates until you're brought to the configuration screen (https://xq.ms/n3CMi)
  •  

that didnt happen for me it just did this
image.png.1ab3315463a132632a9fae734ecc5c7e.png

did i do something wrong?

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Caroline said:

You don't have the root permission or aren't part of the sudoers group

i should have root permission i just installed the OS on it. and changed the password.

Link to comment
Share on other sites

Link to post
Share on other sites

On 8/19/2019 at 6:47 PM, GameMaster2030 said:

For anyone who also cares about privacy I would recommend setting up DNS over HTTPS, that way all your requests are encrypted. You can find the official guide here


Also if you want to use your DNS server away from home you can follow this official guide here. But setting it up to have a VPN and DNS server there are some changes that we need to do that don't follow the guide. 

  1. Under "installation", you can skip the install pi-hole part since you should already have installed pi-hole. (For more experienced linux users: the port of the openvpn server can be anything. But make sure the port isn't already in use or that your ISP blocks it when port forwarding. Can be handy to bypass port blocks by using port 433 or 80)
  2. Skip finding the IP under "Setup OpenVPN Server" and change `10.8.0.1` to the ip of your RPi(Raspberry Pi) which you already have if you followed Jake's guide.
  3. Before creating an user follow this:
    1. Run command: `openvpn --genkey --secret ta.key`
    2. Edit the config file and add this line: `tls-auth ta.key 0` 
      (This adds an encryption layer between the client and the server, so some extra security)
  4. You can probably skip "Firewall Configuration" since Raspbian doesn't have a firewall pre-installed and you also don't have installed any
  5. Follow these parts of "Optional: Dual operation: LAN & VPN at the same time"
    1. Add this line to your `/etc/openvpn/server/server.conf`: `push "route 192.168.2.0 255.255.255.0"` but change `192.168.2.0` to your subnet which you can find in your ip, for example if your ip is: `192.168.1.43` you replace `192.168.2.0` with `192.168.1.0` and with `192.167.8.28` you replace it with `192.167.8.0`. But if your IP is for example `10.8.0.7` you'll probably need to replace the whole line with `push "route 10.8.0.0 255.255.0.0"`.
    2. Run this command: `pihole -a -i all`
    3. After this port forward `1194` or the port you decided to use on your router, you can find guides online. 

Let me know if you find a mistake in this.

looks like the instructions on the link don't work, I get a segmentation fault after trying to install cloudflared

Link to comment
Share on other sites

Link to post
Share on other sites

Hey,

 

How to make working Pi-hole auto restart?

Link to comment
Share on other sites

Link to post
Share on other sites

This is one of the hardest projects for me honestly, has taken several days and now I hit the final road block, while login into the SSH. Connection REFUSED.409549214_Screenshot2019-09-24at17_57_19.thumb.png.78a175c8f9b981ed0f00e0dc8aa67b25.png

Link to comment
Share on other sites

Link to post
Share on other sites

so im having a bit of a trouble getting this to work anyone mind helping me out?

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/15/2019 at 1:20 PM, Your-Cat said:

your thing block the actual youtube video

So I ran tuty4amxx's instructions, and I am having issues with Youtube. Sometimes it works on my phone, and sometimes I get an error where it says no connection and to tap to retry. How do I undo it? Can I just delete the youtube.sh file?

Link to comment
Share on other sites

Link to post
Share on other sites

10 hours ago, Ferkner said:

So I ran tuty4amxx's instructions, and I am having issues with Youtube. Sometimes it works on my phone, and sometimes I get an error where it says no connection and to tap to retry. How do I undo it? Can I just delete the youtube.sh file?

 

 

it have been corrected after i messaged the owner. To delete it, you need to remove the crontab line that you have added then delete all your black list your-pi-hole-ip/admin/list.php?l=black    (might be long to load).

 

he posted a new tutorial 10 hours ago. it work way better now 

 

https://github.com/kboghdady/youTube_ads_4_pi-hole

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Your-Cat said:

 

 

it have been corrected after i messaged the owner. To delete it, you need to remove the crontab line that you have added then delete all your black list your-pi-hole-ip/admin/list.php?l=black    (might be long to load).

 

he posted a new tutorial 10 hours ago. it work way better now 

 

https://github.com/kboghdady/youTube_ads_4_pi-hole

Thanks. I followed all the instructions and will see how it does over the weekend.

Link to comment
Share on other sites

Link to post
Share on other sites

i Need really Help with my PI-zero

 

i have setup my PI. only on my PC it blocks ads and not on my TV Youtube ads i see and i cant block them

if i Block them i block Youtube... Youtube hangs on LOADING screen....... Whats wrong with my setup. 

i'm blocking this ads for my kids

 

on my screenshot.. what and how can i block the ads ?

Screenshot_156.jpg

Link to comment
Share on other sites

Link to post
Share on other sites

Hello, I don't know how to change the DHCP server. To the IP adress I have to write the raspberry's ip adress? 

And what to write to the Number of CPEs?

In the row, the first element is the raspberry.

dns.thumb.JPG.c44b0c6d3f48652a131c9a5da0063fdc.JPG

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks LTT and Jake

 

Got my pihole running on Pi 1 and using a third party dns provider (tried both smartproxydns and getflix) as my Upstream DNS Servers

Luckily im using the Netgear Nighthawk which includes free Dynamic DNS and built-in VPN server and now i have both LAN and VPN ADs free from all my devices anywhere.

Currently located outside US and with the 3rd party Smart DNS im able to stream via Netgear VPN with Netflix,Directvnow, Hulu and HBO Go except for CBS app as its detecting the ad block (see screenshot attached error) and its fine as im canceling the CBS subscription anyway.

 

1970644423_Annotation2019-09-29202840.png.b45dbee81f261b29a1c30d42885a5ba7.png

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

I'm pissed......

I'm loving the PiHole and have been tinkering with it a fair bit.

 

However, using it as a network "sniffer" I spotted that Facebook is somehow transmitting from my phone back to the mothership.

Android wouldn't let me uninstall FB, but I disabled it as soon as I got it (Samsung S9), so it shouldn't be doing anything.

 

But there it is in the PiHole logs :(

My other half uses FB, so unfortunately I can't block it (until PiHole Devs set up custom block rules per client)

 

PiHoleFB.png

----------------------------
        Weem
Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×