Default GW for clients different from VPN server default GW

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
masedira
OpenVpn Newbie
Posts: 5
Joined: Tue Mar 31, 2020 6:16 pm

Default GW for clients different from VPN server default GW

Post by masedira » Mon Apr 13, 2020 3:35 pm

Hi All,

I was able to configure a basic setup with openvpn server, clients are connecting and going to the internet.

However, the issue I am facing is that the clients use the same default gateway like the one configured on the VPN server OS, which is not what I really need.

My requirement is that the traffic uses the following path:
client <---vpn tunnel--> vpn server outside interface <-> vpn server inside interface <-> gateway (different from VPN server OS gateway) <-> internet

Image


What is the recommended approach for this kind of setup?

I am thinking of 2 solutions, but don't have enough experience to know which one is more suitable:
1) use bridge mode (TAP) for the clients (not preferred in my case)

2) use routed mode (TUN) create a separate routing instance for VPN user originated traffic to send traffic through the VPN client GW
Note: I do not want to use masquerading anywhere

Post Reply