internet Traffic through OpenVPN client

This forum is for general conversation and user-user networking.

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

Post Reply
johnesqq
OpenVpn Newbie
Posts: 2
Joined: Tue Sep 21, 2021 3:17 pm

internet Traffic through OpenVPN client

Post by johnesqq » Tue Sep 21, 2021 4:09 pm

Hello,

My infra looks like this:

Location 1, has Router 1, couple of VLAN's (10,11,12) and OpenVPN server on this router. One public IP.
Location 2, has Router 2 with OpenVPN client and 2 public IP's.
Both routers are build on CentOS,7 and 8.
Tunnel between locations on Second router is on second IP.

Location 1:
VLAN 10 - network 10.10.0.0/24
VLAN 11 - network 10.11.0.0/24
VLAN 12 - network 10.12.0.0/24
Public IP - 90.100.100.10
OpenVPN Server private IP 192.168.20.1/24

Location 2:
Public IP 1 - 120.130.140.4
Public IP 2 - 130.100.200.6
OpenVPN client private IP 192.168.20.2/24

I use OpenVPN with "CCD" for:
1-User connections,
2-tunnel with Location 2.

I'd like to push internet traffic to and from VLAN 12 through second location IP.

Traffic from internet to Router 2 public IP 2 is forwarded to IP in VLAN 12. Routing through Router 1 OpenVPN private IP (192.168.20.1). Traffic stops in the same place as in example below:
Traffic from VLAN 12 is marked on Router 1 (prerouting) than forwarded using second routing table through OpenVPN Tunnel to Router 2 private openvpn IP of second router. Next traffic is sourcenat'ed to internet. Traffic goes out and comes back but only on the Router1 (tun interface and than not going to VLAN 12.



This is strange because traffic from Router 2 to VLAN 12 works both ways (192.168.20.2 to VLAN 12).

Please help with this case.
Regards.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: internet Traffic through OpenVPN client

Post by TinCanTech » Tue Sep 21, 2021 7:38 pm

I can help, if you hire me.

Post Reply