Page 1 of 1

Avoid CGNAT using OpenVPN and Azure

Posted: Tue Apr 20, 2021 6:09 am
by simzik
i am working on a Problem and got really stuck. My ISP is using CGNAT, therefore all my Devices are not accessible from WAN via Port Forwarding. I want to build a small box (RPI) that automatically connects to my VPN and tunnels all traffic through it. Like this i can avoid CGNAT everywhere i go. My Idea is to use a OpenVPN Server on Azure and Tunnel all my Devices to this VPN Server through the Box. I use the following Setup: I used portforwarding in the Azure GUI Destination IP (LAN Device) Destination Port (2223 ssh)

Image

i sucesfully can establish a connection to the openvpn server from the gateway The Lan Device also has the public WAN-IP of the Azure Server afterwards. Hence VPN is working fine.

I can ping the Lan Device from the Azure Server (ping 192.168.1.129) But i can not establish a connection when i use the public ip "ssh root@20.52.XXX.XXX -p 2223"

How can i forward the traffic from the WAN IP into the VPN Tunnel in Azure? I tried all combinations of source ip and destination ip and port and none is working. From my Understanding Destination IP should be the LAN IP Home and Destination Port should be 22 Source IP should be any and source port should be 2223.

Any help is highly aprreciated

Thank you

Re: Avoid CGNAT using OpenVPN and Azure

Posted: Tue Apr 20, 2021 12:57 pm
by 300000
If you want to do that you need to configure site to site so from outside you can access to your lan . let change some from server and make ip forward and NAT on client so it will work for you.

what is OS you install client at home and pucbic all config in here . remove certificate and personal info so we can look at it and offer you a help.