Export Blacklist with in front of each line



One good use of Pi-Hole is to find the “leaks”.

It would be useful to then copy paste the blacklist made in Pi-Hole to the HOST file of the computer who leaks. So when I’m outside with my laptop on public wifi I’m still protected.

To do so I export the blacklist in text with the “Teleporter Export”.
Then, to add in front of each line :

Move the cursor to the line before the first line you want to precede with
In the Search menu, select Find and Replace….
In the Find field (regex), type \n.
In the Replace with field, type \n0.0.0.0\t.
Press the Find button.
Press the Replace button repeatedly until all the lines you wanted to add to are complete.

You can speed things up with the Replace All button, but that will add to the front of all lines, even if they already have; not handle the first line of the file; and add a line at the end of the file with just in it.

Then I copy this text list to my local HOST file.

I used GasMask, (a simple hosts file manager for Mac OS X) https://github.com/2ndalpha/gasmask

You can subscribe to host list in GasMask.

I think it could be a good feature if we have a possibility to subscribe to the Pi-Hole Blacklist with


You can actually still use your Pi-hole on the go:

Overall, I think it’s probably out of scope and can easily be handled via Search and Replace or a simple script.


Thanks for the reply, I will continue to use regex then.

And to pick up Pi-Hole on the go I will use :

pihole -r

H/T : Change ip adress

The thing is when you are in a new place/network you have to have access to an HDMI screen and usb keyboard to reconfigure the static Ip directly in the Rapsberry because ssh doesn’t work.