Skip to contentSkip to conversation

ovpn server on udp with multiple gateways

Openvpn-devel richard lucassen 2 participants 4 messages Jun 17, 2006

lore
Share & tools
lore
#0 lore raw

Hello list,

I tried to use an OpenVPN server listening on 1194/udp on a machine that is having multiple gateways to the internet. I use policy routing.

eth1  1.1.1.2/29 (1.1.1.1 master def gw)
eth2  2.2.2.2/29 (2.2.2.1 gateway)
eth3  3.3.3.2/29 (3.3.3.1 gateway)

1.1.1.1 is the principal default gw. If I bind ovpn to 0.0.0.0, the returnpackets will always have source address 1.1.1.2, even when making a connection to 2.2.2.2 or 3.3.3.2.

I can of course use tcp instead of udp, but a tcp header is 12 bytes larger that the udp one. And as I have a lot of Citrix traffic flowing through the tunnel (which consists of a lot of small packets), I want to reduce the tunnel overhead as maximum as possible.

Is there a (simple) way to let OpenVPN use the same source address to which the connection was set up like in the following example?

- set up tunnel x.x.x.x to dst address 1.1.1.2
return src address 1.1.1.2 to x.x.x.x
- set up tunnel x.x.x.x to dst address 2.2.2.2
return src address 2.2.2.2 to x.x.x.x
- set up tunnel x.x.x.x to dst address 3.3.3.2
return src address 3.3.3.2 to x.x.x.x

R.

Signature · 9 lines
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht                                        |
| Public key and email address:                                    |
| http://www.lucassen.org/mail-pubkey.html                         |
+------------------------------------------------------------------+
#1 lore raw
Quoted 9 lines · richard lucassen

Is there a (simple) way to let OpenVPN use the same source address to which the connection was set up like in the following example?

- set up tunnel x.x.x.x to dst address 1.1.1.2
return src address 1.1.1.2 to x.x.x.x
- set up tunnel x.x.x.x to dst address 2.2.2.2
return src address 2.2.2.2 to x.x.x.x
- set up tunnel x.x.x.x to dst address 3.3.3.2
return src address 3.3.3.2 to x.x.x.x

OpenVPN 2.1-beta3 merged a patch adding multihoming support. Multihoming can be enabled or disabled at build-time, but should be enabled by default if your OS supports it. There's a new "multihome" configuration directive to enable this functionality if your build has support.

(BTW, this is a usage question rather than a development one; it should go to OpenVPN-users, not OpenVPN-devel. That said, searching the OpenVPN-devel archives for "multihome" should be interesting if you're curious for the discussion surrounding the patch when it was initially submitted).

#2 lore raw
Quoted 10 lines · On Sat, 17 Jun 2006 08:40:50 -0500 Charles Duffy <[email protected]...> wrote:
Quoted 9 lines

Is there a (simple) way to let OpenVPN use the same source address to which the connection was set up like in the following example?

- set up tunnel x.x.x.x to dst address 1.1.1.2
return src address 1.1.1.2 to x.x.x.x
- set up tunnel x.x.x.x to dst address 2.2.2.2
return src address 2.2.2.2 to x.x.x.x
- set up tunnel x.x.x.x to dst address 3.3.3.2
return src address 3.3.3.2 to x.x.x.x

Quoted 5 lines

OpenVPN 2.1-beta3 merged a patch adding multihoming support. Multihoming can be enabled or disabled at build-time, but should be enabled by default if your OS supports it. There's a new "multihome" configuration directive to enable this functionality if your build has support.

Ok, thanks a lot, I'll download 2.1beta3 then :)

Quoted 5 lines

(BTW, this is a usage question rather than a development one; it should go to OpenVPN-users, not OpenVPN-devel. That said, searching the OpenVPN-devel archives for "multihome" should be interesting if you're curious for the discussion surrounding the patch when it was initially submitted).

Ok, I haven't searched yet for the keyword "multihome", otherwise I would certainly have found it. I thought it would be more a development question, so sorry for the noise I caused on this list. I'll switch to users then.

Richard.

Signature · 9 lines
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht                                        |
| Public key and email address:                                    |
| http://www.lucassen.org/mail-pubkey.html                         |
+------------------------------------------------------------------+
#3 lore raw
In reply to Charles Duffy
Quoted 1 line · On Sat, 17 Jun 2006 08:40:50 -0500 Charles Duffy <[email protected]...> wrote:

OpenVPN 2.1-beta3 merged a patch adding multihoming support.

Just a question: I have an openvpn-2.0.7 server (compiled from source) in a production environment. Is 2.1beta4 stable enough to replace 2.0.7?

R.

Signature · 9 lines
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht                                        |
| Public key and email address:                                    |
| http://www.lucassen.org/mail-pubkey.html                         |
+------------------------------------------------------------------+