Accessing pihole

How to access pihole admin page outside of my network like while I’m on public wifi?

Setup a DynDNS adress with (it’s free) and forward port 80 or 8080 to your pi. I would also recommend using PiVPN.

1 Like

Use a VPN for a secure connection. Via this VPN you cannot only access your admin interface, but also use the filtering of your Pi-hole everywhere around the globe. Another plus is that your internet traffic will always be fully encrypted, so surfing on an unencrypted WiFi (like on airports or hotels) becomes a significant boost in terms of security.

I compiled an easy Wiki article which you can use to achieve this:

You may need (as @Skittels pointed out) a dynamic DNS record if you operate your Pi-hole at home.

1 Like

If I use a VPN server on raspi, the IP address of VPN client (me) will the public IP of my home connection right?

Yes, that will be the case. If you set it up on a remote server, it will appear as if all your network traffic comes from their datacenter.


OK. What will be the data usage if I set up a VPN server? I’m on a limited data plan…

At which side is your data plan limited (pi hole location, on mobile, etc.)?

Currently all traffic will be routed to the Pi-hole. However, it requires only a few modifications on the side of the client to have it accessing the Internet directly (and only use the VPN for DNS queries). But then you will (obviously) loose the full-encryption.

Limited data plan on pihole location.

Okay, then you could set up a VPN which will only tunnel the DNS requests and the admin interface. You should be able to find detailed instructions online, like this one

The idea is to simply don’t force all traffic through the VPN, but only make the Pi-hole available through the VPN so you can access it locally and manually set it as DNS server.

I’m now installing piVPN and it is asking for a user to store configurations, it displays user ‘pihole’ only but I’m using Minibian and ‘root’ is the only user. What to do now?

I cannot help here, sorry. I only always used the road warrior installer which I recommend in the wiki article, but @Skittels might know what to do.

Okay thanks mate… :slight_smile:

I would recommend to setup a new user just for the VPN.

Do this with:

sudo adduser yourusernamehere

Then restart the installation. If the new user isn’t displayed restart your pi and then try it again.

I added a new user as you suggested. Is port forwarding necessary to make piVPN work or is there any other way?

It’s not. You only have to use port forwarding if you want to access your pi outside your network without the use of a VPN.

Edit: This is wrong. Read the next two posts.

I don’t get that. If he wants to access his VPN from the outside, he will have to forward the VPN port to his Raspberry Pi.

Oh! Thank you! Sorry about that. I forgot that. Of course you have to forward the port your piVPN uses.

Thanks! piVPN is installing, it needs some time to set up

I’m glad that we could help.

I configured piVPN and is working fine on cellular data, blocking ads like a pro!