0

I have a raspberry pi 400 running pi-hole which is working perfectly, I want to access my home network for the internet by using PiVPN running on the same raspberry pi but I am behind a CGNAT with a public ipv4 address 49.37.xx.xxx. How will I be able to forward port 51820 to the internet so that I can access my home network and PiVPN?

Few things I know of that I can use ngrok or portmap.io for this but the sources I found are either very complicated to achieve or don't work

Please help me with this with an easy to understand, step-by-step solution.

Thank you

PS: raspberry running on ubuntu 21.10 server if that is required

Link 1 Link 2 Link 3

1 Answers1

1

How will I be able to forward port 51820 to the internet so that I can access my home network and PiVPN?

You will not be able to do that.


Pretty much all options available behind a CGNAT are variations of "connecting out to an external server". Either it's a product, or it's a personal server, but it's practically unavoidable either way.

As an alternative to ngrok-like tunnel services, I would suggest renting a server (a VPS), installing your preferred VPN there, then configuring a separate "site-to-site" VPN/tunnel between the Pi and the VPS. (They could be the same type or different.) This will let you VPN to the server and reach your entire home LAN from it, without the need to have any ports accessible from outside – as long as the Pi keeps the tunnel alive.

grawity
  • 501,077