Specific gateway for VPN traffic

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
dominik
OpenVpn Newbie
Posts: 2
Joined: Mon Nov 23, 2015 5:17 pm

Specific gateway for VPN traffic

Post by dominik » Mon Nov 23, 2015 5:29 pm

Hello guys,

I could use your help for the following:
-OPENVPN in tun mode.
-Private network 10.99.0.0/24

I have server A:
eth0 - public ip
eth1 - 10.99.0.12 (DHCP from server B)
openvpn server

Server B:
eth0 - public ip
eth1 10.99.0.1 (DHCP server)

How can I route the traffic coming from the vpn subnet (10.8.0.0/24) through the gateway from Server B and then to the outside world. If I change the default gateway from server A to 10.99.0.1 then I lose my connectivity to the outside world and I can't make a VPN connection anymore.

How can I achieve that I can have 2 default gateways but for the VPN traffic a specific gateway? I just can't figure it out, I hope you guys can help!

Kindest Regards,

dominik
OpenVpn Newbie
Posts: 2
Joined: Mon Nov 23, 2015 5:17 pm

Re: Specific gateway for VPN traffic

Post by dominik » Fri Nov 27, 2015 9:22 am

I got it to work! :)

Post Reply