Originally Posted by
varunendra
I'm not familiar with VPN in Ubuntu yet, but can't you define static routes so that all but the traffic from that particular user goes through eth0?
Please see this (mostly unrelated post) if you know even lesser than I do about routing table
:
http://ubuntuforums.org/showthread.php?p=12819114
Accordingly, I'd like to see the output of "route -n" after tun0 interface is created, also the IP of the user for which you want to use it.
The thing is that I have already created a script which runs all traffic from one specific user through the tun0 interface. This script worked flawlessly to start with, then suddenly all traffic started to use the tun0 interface whenever openvpn is running.
So there has to be something wrong with the default routing.
route -n before starting openvpn:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.19.1 0.0.0.0 UG 0 0 0 eth0
192.168.19.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
After starting openvpn:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.104.1.5 128.0.0.0 UG 0 0 0 tun0
0.0.0.0 192.168.19.1 0.0.0.0 UG 0 0 0 eth0
10.104.1.1 10.104.1.5 255.255.255.255 UGH 0 0 0 tun0
10.104.1.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
109.201.154.154 192.168.19.1 255.255.255.255 UGH 0 0 0 eth0
128.0.0.0 10.104.1.5 128.0.0.0 UG 0 0 0 tun0
192.168.19.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
Bookmarks