Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

A friend of mine setup a VPN to connect to his server using openvpn. I installed "network-manager-openvpn" (I'm in ubuntu) and I created a new VPN connection using the certificates he sent me. The VPN connected successfully but when I tried to load any pages the connection would just timeout. He then sent me this configuration file:

client
remote 192.81.208.141
port 1194
proto udp
dev tun
dev-type tun
ns-cert-type server
reneg-sec 86400
auth-user-pass
auth-nocache
auth-retry interact
comp-lzo yes
verb 3
ca ca.crt
cert andrew-1.crt
key andrew-1.key

Which is apparently an exact copy of his configuration he used on his mac where he was able to connect and work successfully with the VPN.

So I imported that file to create a new VPN and I was still having the same issue. When I ran "netstat -nr" I got the following output:

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.8.0.9        0.0.0.0         UG        0 0          0 tun0
10.8.0.1        10.8.0.9        255.255.255.255 UGH       0 0          0 tun0
10.8.0.9        0.0.0.0         255.255.255.255 UH        0 0          0 tun0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 tun0
192.81.208.141  192.168.0.1     255.255.255.255 UGH       0 0          0 wlan0
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 wlan0

I feel as if maybe there is too many things being routed through the VPN. My friend and I tried troubleshooting but I'm not very knowledgeable with OpenVPN I've only used PPTP where I just put the IP and my credentials and I'm good to go. Maybe someone may know if I'm supposed to configure something specifically that I haven't? All I've done is install network-manager-openvpn and imported that file to create a new VPN (and entered credentials) and nothing else.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

The first line of your "netstat -nr" is sending all traffic out the VPN (Except the VPN endpoint and local traffic). You need to stop that route from being added to your VPN, and that will most likely solve your problem.

You may well find that it is your friends configuration (ie the server) which is pushing this default route and causing the problems (maybe he has "redirect-gateway" or configured his system to push a default gateway - it does not appear to be your config).

You can temporarily (until the tunnel is restarted) test this theory by deleting the default route. Try

route del default gw 10.8.0.9
route add default gw 192.168.0.1
share|improve this answer
    
Ran those two lines and everything is working perfectly! Definitely a workaround while I figure out why this is happening and how to stop it. –  akand074 Feb 16 '13 at 2:18
    
Its not you, its your friend. You should ask him to stop pushing a default gateway via your OpenVPN setup. In the interim, you can add "route-nopull" in your config to ignore the gateway he is pushing, (Oh, and can you accept the answer ?) –  davidgo Feb 16 '13 at 5:45
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.