I've got some problems with my OpenVPN setup.The Setup:-> Ubuntu Server 12.04-> Two active NIC's: eth0 (default): 192.168.1.0/24eth1: x.x.x.x (external ip)I've managed to get the routing to work so i can connect to the outside world with the eth1 NIC.holmen@filserver:~$ ping -I eth1 -c 3 www.linuxquestions.orgPING www.linuxquestions.org (75.126.162.205) from 192.168.1.2 eth1: 56(84) bytes of data.64 bytes from www.linuxquestions.org (75.126.162.205): icmp_req=1 ttl=50 time=133 ms64 bytes from www.linuxquestions.org (75.126.162.205): icmp_req=2 ttl=50 time=133 ms64 bytes from www.linuxquestions.org (75.126.162.205): icmp_req=3 ttl=50 time=133 ms--- www.linuxquestions.org ping statistics ---3 packets transmitted, 3 received, 0% packet loss, time 2002msrtt min/avg/max/mdev = 133.281/133.336/133.379/0.423 msOne curious thing is that the from ip #. It says from 192.168.1.2 eth1 but that ip is the servers ip on the eth0 iface.Netstat:holmen@filserver:~$ netstat -anrKernel IP routing tableDestination     Gateway         Genmask         Flags   MSS Window  irtt Iface0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0x.x.x.x     0.0.0.0         255.255.128.0   U         0 0          0 eth1192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0But here comes the real problem:When setting up openvpn with the option local x.x.x.x (eth1 ext ip) it still tunnels the eth0 interface. And i cant understand why.OpenVPN settings:clientdev tapproto udplocal x.x.x.xremote openvpn.anonine.net 1194remote openvpn.anonine.net 1195remote openvpn-2.anonine.net 1196remote openvpn-2.anonine.net 1197remote openvpn-3.anonine.net 1198remote openvpn-3.anonine.net 1199remote openvpn-4.anonine.net 1200remote openvpn-4.anonine.net 1201remote-randomresolv-retry infiniteauth-user-passpersist-keypersist-tunca anonine.ca.crtns-cert-type servercomp-lzoreneg-sec 0verb 3Netstat (tunnel active):holmen@filserver:~$ netstat -anrKernel IP routing tableDestination     Gateway         Genmask         Flags   MSS Window  irtt Iface0.0.0.0         46.246.20.129   128.0.0.0       UG        0 0          0 tap00.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0x.x.x.x         0.0.0.0         255.255.128.0   U         0 0          0 eth146.246.20.128   0.0.0.0         255.255.255.128 U         0 0          0 tap080.67.8.222     192.168.1.1     255.255.255.255 UGH       0 0          0 eth0128.0.0.0       46.246.20.129   128.0.0.0       UG        0 0          0 tap0192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0Anyone got any ideas?
OpenVPN struggling
ubuntu;networking;openvpn
I've managed to solve this with two main steps:Choose a service provider that uses TUN interface.A little bit more table routingThe Table routingI've read the most useful howto over at http://lartc.org/howto/ and followed the provided steps there.My setup is now two physical nic (eth0 and eth1) divided over three tables (main, T1 and T2).T1(eth1) routes the default stuff (apache2, ssh etc.) and T2(eth0) is just for rtorrent connections.It works like a charm. So if you have the same issue read up over at lartc.org and the problem will be solved.NoteI have not tried this config with TAP interface so I cannot say if it works or not.