Comunicate between 2 openvpn tunnels on the same server

This forum is for admins who are looking to build or expand their OpenVPN setup.

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
gabriel
OpenVpn Newbie
Posts: 1
Joined: Mon Oct 05, 2009 6:28 pm

Comunicate between 2 openvpn tunnels on the same server

Post by gabriel » Mon Oct 05, 2009 6:40 pm

Hi,

I have 2 Nic in the same server, each one connected to different subnet, each Nic has its own openvpn server running.

NIC 1: its IP is 192.168.2.8 , openvpn ip : 192.168.88.x
NIC 2: its IP is 10.10.10.5 , openvpn ip: 192.168.89.x


I would like all users in both end of these 2 subnet to communicate together through these 2 tunnels. I need your help please, howto.

thanks in advance

User avatar
ecrist
Forum Team
Posts: 237
Joined: Wed Nov 26, 2008 10:33 pm
Location: Northern Minnesota, USA
Contact:

Re: Comunicate between 2 openvpn tunnels on the same server

Post by ecrist » Wed Oct 07, 2009 1:02 pm

You simply need a push route statement in each opposing server to route to the other subnet.

So, for the 192.168.89.x server, add:

Code: Select all

push 'route 192.168.88.0 255.255.255.0'
And for the 192.168.88.x server, add:

Code: Select all

push 'route 192.168.89.0 255.255.255.0'
Make sure you've got IP forwarding enabled on the server so that it will route between the interfaces.
OpenVPN Community Administrator
IRC: #openvpn, #openvpn-devel
Co-Author of Mastering OpenVPN
Author of Troubleshooting OpenVPN

Post Reply