Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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 0.0.0.0 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 (0.0.0.0) 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
add comment

Your Answer

 
discard

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.