Welcome! Log In Create A New Profile

Advanced

Running PiHole (network ad blocker) on a Pogoplug Pro

Posted by cdlenfert 
Running PiHole (network ad blocker) on a Pogoplug Pro
January 09, 2019 10:52AM
Here I was able to run the latest version of PiHole on a Pogoplug Pro.

The basic process is you run the automatic installer script, it eventually fails, you pick up the pieces from there.

Prerequisites:
  • running on Debian Stretch
  • latest kernel recommended 4.4.133-oxnas-tld-1
  • running systemd (for automatic pihole service start on reboot)
  • swap enabled (256mb in my case)
  • git is installed
  • you may also need to do: apt install ca-certificates
  • a couple hours of patience :)
Log in as "root" user

Make sure your packages are up to date
apt-get update
apt-get upgrade

Install Fake Hardware Clock. I'm not sure it's absolutely required, but doesn't hurt and may be helpful since the Pogos don't have hardware clocks.
apt-get install fake-hwclock

Run the PiHole installer script (more info about this script and other methods of running it are available here)
curl -sSL https://install.pi-hole.net | bash
it will fail after "Enabling lighttpd service to start on reboot"

Now we'll need to compile and install nettle and FTLDNS (more info on that here)
apt install build-essential libgmp-dev m4
wget https://ftp.gnu.org/gnu/nettle/nettle-3.4.tar.gz
tar -xvzf nettle-3.4.tar.gz
cd nettle-3.4
./configure
make
make install

git clone https://github.com/pi-hole/FTL.git
cd FTL

make -j 4
make install

service pihole-FTL restart

If the last command doesn't start the pihole-FTL service we'll need to move the pihole-FTL replaced the automatic installer's binary with the new binary we just made.
Rename the pre-packaged binary
mv /usr/bin/pihole-FTL pihole.-FTL.bak.script

From the directory that you cloned the FTL repo, copy the newly compiled binary to the usr/bin folder and make a backup of this file:
cp FTL/pihole-FTL /usr/bin/pihole-FTL
cp /usr/bin/pihole-FTL /usr/bin/pihole-FTL.bak.manual

Restart the PiHole service
service pihole-FTL restart

Start the DNS service
pihole restartdns

Update the blocklists
pihole -g

Now check that you're able to access the PiHole web interface - http://[POGO.IP.ADDRESS.HERE]/admin/
You should see 3 green dots for your status in the top left.
If everything is working, you can change your routers DNS server address to be that of your Pogoplug Pro (above). This will route all of your network devices DNS queries through the Pogo and PiHole and block adds across your entire network. You can alternatively configure the DNS settings per-device if you don't want the whole network to use PiHole.

That's it!

If you work through these steps and have issues, try running pihole -r (repair script) and then restoring your manually compiled pihole-FTL.bak.manual binary in /usr/bin as the repair process likely replaced your active binary. It's possible the repair script could be required to get other services and files in place, and I did run it in my troubleshooting steps, but I'm not sure it was necessary.

I've seen update notices in the Pi-hole admin interface recently so I decided to try updating. Things broke nicely as I half expected so here's what you should do if you want to update your Pi-hole install:

The main issue is that running the command "pihole -up" will break DNS on the Pogo. If you do this you can fix DNS temporarily by editing /etc/resolv.conf and adding Google's DNS servers. It should look something like:

nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4
search hsd1.co.comcast.net  ## or whatever your ISP uses

Now if you don't want to break things (crazy right?) try this first:
git clone https://github.com/pi-hole/FTL.git
cd FTL
make -j 4
make install
That creates the armel friendly pihole-FTL binary.

Now run:
pihole -up
Which should update the other components of the pihole.

And finally replace the automatically installed pihole-FTL script with the one you painstakingly built. (this assumes you're still in the FTL directory where you built it)
cp pihole-FTL /usr/bin/pihole-FTL

And finally start it all up.
service pihole-FTL restart
## not sure if you need these but they don't hurt
pihole restartdns
pihole -g

Make sure your device is utilizing the pihole and check the admin interface to see that there are no errors and all the components are up to date (bottom right) - http://pi.hole/admin/

Enjoy mostly ad free browsing.



Edited 1 time(s). Last edit at 05/13/2019 02:00PM by cdlenfert.
Re: Running PiHole (network ad blocker) on a Pogoplug Pro
January 09, 2019 11:45AM
cdlenfert,

Cool! will add to the Wiki thread.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Running PiHole (network ad blocker) on a Pogoplug Pro
January 10, 2019 06:46AM
This is interesting.

When I poke around the pihole basic-install.sh script, I was just intrigued why picking /etc/pihole as the installation logging location as shown in line #32 (installLogLoc=/etc/pihole/install.log). An installation logging is usually just a temporary data and should be placed under /tmp. Otherwise, the default logging location on a Linux system on /var/log would be more appropriate. Just my 2ยข.
Re: Running PiHole (network ad blocker) on a Pogoplug Pro
March 13, 2019 05:34AM
I tried this on my Pogoplug P21 and the FTL compiling failed with this problem:

cc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
Makefile:98: recipe for target 'obj/sqlite3.o' failed
make: *** [obj/sqlite3.o] Error 4

I'm using the 4.4.133-oxnas-tld-1 kernel.

Tried on Pogo E02 which worked fine.
Re: Running PiHole (network ad blocker) on a Pogoplug Pro
March 13, 2019 07:12AM
Do you have a swap file or partition enabled? Basically you need extra ram beyond the Pros 128mb to install.
Re: Running PiHole (network ad blocker) on a Pogoplug Pro
March 14, 2019 12:50AM
The compiling sqlite3 step in the compilation process is the longest step by far and definitely requires a swap file on any machine running less than 256MB of RAM.
Re: Running PiHole (network ad blocker) on a Pogoplug Pro
March 14, 2019 03:33AM
alexr Wrote:
-------------------------------------------------------
> The compiling sqlite3 step in the compilation
> process is the longest step by far and definitely
> requires a swap file on any machine running less
> than 256MB of RAM.

Yes.

I think cdlenfert could update the 1st post to mention this swap file requirements. It would be safe to say it will make things run smoother for any SW installation to have a large swap space at least 512MB (even for 256MB RAM boxes).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Running PiHole (network ad blocker) on a Pogoplug Pro
March 14, 2019 07:34AM
I do mention having swap of 256 mb enabled in the prerequisites :)
Re: Running PiHole (network ad blocker) on a Pogoplug Pro
March 14, 2019 05:32PM
cdlenfert Wrote:
-------------------------------------------------------
> I do mention having swap of 256 mb enabled in the
> prerequisites :)

My bad :) It has swap as prerequisite.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: