Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

First, the working scenario. One OpenVPN client (2.1~rc11 under ubuntu 9.04) connects to a OpenvPN server (2.1~rc11 ubuntu 8.10) using a ethernet interface (eth0). Both use TUN device and UDP connection. But when I turn on the wireless interface (ifup wlan0) in the client ,the host can't communicate with the server anymore. I read a bit about the problem but didn't found a working solution. Maybe setting some iptable rules to mark the incoming datagrams to output them through the same interface. Any help would be appreciated.

Thanks in advance

share|improve this question
up vote 0 down vote accepted

First of all, iptableS won't help when traffic is generated in your scenario. I suspect that when you turn on the wireless interface you have two default gateways; you can verify that by typing route -n and by checking how many lines starting with you can see. If this is the case, you need to delete one default route.

If this is not the case, do check the linux advanced routing and traffic control howto (LARTC). Using the ip command will help you to set up tables to route specific traffic on single interfaces, so on and so forth.

share|improve this answer
Thanks lorenzog. Yes, two default routes ( are present. One for wlan0 and the other for eth0. When each interface starts it sets up a default gateway, and that "confuses" OpenVPN. I'll check the documentation you gave me. – Humber Dec 9 '09 at 14:18
Humber, you can always manually delete one of the default gateways via a script that checks whether there is another default gateway already set before digging yourself into advanced routing. – lorenzog Dec 9 '09 at 15:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.