Portforwarding to PiVPN and access PiHole from outside

I noticed people sometimes have trouble with portforwarding on their routers.
Is that necessary for PiHole?
No it's not.
Fact of the matter is however that there are lots of people using PiHole in combination with PiVPN.
Nowadays the setup is very easy.
First install PiHole and then install PiVPN and everything is set automagic.

Not the portforwarding on your router.

That's why for this explanation.
Modern router have preinstalled settings for portforwarding.
It includes ftp, ssh, http, https, Xbox, Playstation, bittorrent, VNC, TelNet
When one tries to portforward these setting apply for the given setup, but not for VPN as it is required in PiVPN.
PiVPN uses port 1194 for OpenVPN and port 51820 for Wireguard as standard port.
So when you have found portforwarding in settings you won't be able to do proper portforwarding for the required ports.

So find Application Configuration Or some term alike.
Then create a new app name.
For OpenVPN create a new item, give it an appropriate name and then add the rules.
It's straightforward
Protocol: UDP
Start port 1194, end port 1194
Start mapping port 1194, end mapping port 1194
For Wireguard the only difference is the port number, 51820 (or any other port you have chosen in the installation of PiVPN)
Save and exit

Now go back to portforwarding and create a new item
Insert the ip address of your raspberrypi
Scroll in the list for the item you just created like for instance Wireguard, save and exit.
Your router will acknowledge with a happy confirmation.

That's all

Portforwarding is simple
The first step is create an adequate portforward rule.
Second step is apply this rule to point at your RPI's ip address

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.