OpenVPN (Ubuntu) and multiple gateways

The_Unbeliever

Honorary Master
Joined
Apr 19, 2005
Messages
103,196
Hi

Anybody had any success in getting openVPN to work successfully on a PC with more than one gateway?

In our case we got both an ADSL line and a wireless link.

I want to set it up so that, should the ADSL go down, we still can VPN in via wireless.

Should the wireless be down, then we can still VPN in via ADSL.

ADSL will be the default, and will fall back to wireless should the ADSL be down for whatever reason.

Regards

Libs
 

Anthro

Expert Member
Joined
Jun 13, 2006
Messages
3,560
Only issue that you might have is if the wireless is a NAT type (ie no public IP address) - where you will have to someow convince the WISP to open / forward the ports to your NATted IP address
 

The_Unbeliever

Honorary Master
Joined
Apr 19, 2005
Messages
103,196
Only issue that you might have is if the wireless is a NAT type (ie no public IP address) - where you will have to someow convince the WISP to open / forward the ports to your NATted IP address

This has already been done.

At the moment we can VPN in via the wireless link to the openVPN server.

I just need to take the next step :)

Have no idea on how to configure the server for multiple gateways though. :eek:

Thanks
 

Anthro

Expert Member
Joined
Jun 13, 2006
Messages
3,560
Have no idea on how to configure the server for multiple gateways though
Which part of the server config are you struggling with ? The app itself ?
 

Anthro

Expert Member
Joined
Jun 13, 2006
Messages
3,560
Ahh, failovers.. I understand.. mm.. wil have to read up on that one,, seems complex..
 

Kroks

Well-Known Member
Joined
May 27, 2009
Messages
158
Source based routing

I setup a system similar to yours a few years ago.

have a look at http://www.wlug.org.nz/SourceBasedRouting the info might be a bit old, but should point you into the right direction. P.S. a lot of the examples will have to do with systems with 2 or more network cards. Even if you use only 1 card you can create a alias to the card, and set it up with it's own IP. It does make things a lot easier.

NOTE: the above link is just a example, you can google for source based routing or policy based routing.

A good idea is to try this on a test box first, and not remotely.

EDIT: I used Freeswan and Openswan when I did this.
 
Last edited:

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,474
you could have multiple default gateways, just set the wireless to have a higher metric, so that if the adsl fail and the gateway removed for adsl it automatically fail back to wireless.
 
K

kingrob

Guest
Hi

Anybody had any success in getting openVPN to work successfully on a PC with more than one gateway?

In our case we got both an ADSL line and a wireless link.

I want to set it up so that, should the ADSL go down, we still can VPN in via wireless.

Should the wireless be down, then we can still VPN in via ADSL.

ADSL will be the default, and will fall back to wireless should the ADSL be down for whatever reason.

Regards

Libs

I wouldn't put all the strain on a poor pc/server, get yourself a MultiWAN Broadband router....we use a cheapskate TP-LINK router that supports two WANs and three LANs. Does the trick....but a bit iffy. A Cisco one would have been nice.
 
Top