OpenVPN for bypass NAT Public IP

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
vassiskansa
OpenVpn Newbie
Posts: 1
Joined: Sat Jul 01, 2023 1:46 pm

OpenVPN for bypass NAT Public IP

Post by vassiskansa » Sat Jul 01, 2023 2:07 pm

Hi,
i need a solution for connecting 2 (or plus) not public ip endpoint.
I thought it might be a good solution to build an openvpn server to have multiple point to point openvpn connections and then rotate the lan class.

Example:

OpenVPN Server: public cloud host with public ipv4 address.
TUN1 (with office server) -> 172.16.1.1 | TUN2 (with notebook client) -> 172.16.0.1

Office Server: private server at 192.168.100.55, connected with OpenVPN Server with tun1 on 172.16.1.254

Notebook Client: private client at ?????, connected with OpenVPN Server with tun0 on 172.16.0.254

After many hours of configuration, with iptables, I managed to ping a host in lan 192.168.100.x from the OpenVPN server, but I can't do the same from Openvpn Client, even if I put a route on the 192.168.100 class .x using 172.16.0.1 as gateway.
I thought that, once I put the route on the OpenVPN Server for the 192.168.100.x class using the gw 172.16.1.254, the client notebook would also automatically connect, but this is not the case.

Of course I enabled net.ipv4.ip_forward=1 .

Could anyone help me?
Thank you.

Post Reply