0

I have one question.

In my Ubuntu desktop 16.04 when I start one OpenVPN connection I lose internet connection.

I think it's due to network I connect have a proxy and I have not configured. Is there any way to fix this without having to configure the proxy of another network in my laptop?

Thanks :)

  • 1
    Whomever administers the OpenVPN server will have to fix the server side to route all the VPN traffic through the proxy, if there is one and it is required. – dobey Jul 13 '16 at 17:09
0

OpenVPN servers are generally configured to push certain routes to the VPN clients. Depending on how the VPN server is configured, it could be pushing all network connectivity through the VPN... thus subjecting yourself to the network restrictions on the other end...

I'm unsure sure how your proxy configuration takes part in your scenario, so I will try to point you in the right direction from a routing/switching (layer 3) perspective.

In this example, lets assume:

  1. 10.10.1.1 is the other end of the OpenVPN tunnel
  2. 10.10.1.0/24 is the subnet you need to access through OpenVPN
  3. 192.168.10.0 is your local LAN subnet
  4. 192.168.10.1 is your local LAN gateway

After you've connected to the OpenVPN, take a look at your routing table:

    route -n

If the gateway of last resort (aka. "Destination 0.0.0.0") is still pointed to your local LAN gateway (192.168.10.1), then your Internet connection is likely not routed through OpenVPN (assuming you do not have any proxy settings configured).

If the gateway of last resort is pointed through the VPN tunnel (10.10.1.1), you could try manually changing the routes to point last-resort network traffic to your local LAN gateway:

    Destination     Gateway         Genmask         Iface
    0.0.0.0         10.10.1.1       0.0.0.0         tun0
    192.168.10.0    192.168.10.1    255.255.255.0   eth0

In this scenario, all internet traffic is traveling through the VPN ("tun0"). If you only need access to 10.10.1.0/24 through the VPN, then you could manually change the route on your computer:

    route add -net 10.10.1.0 netmask 255.255.255.0 gw 10.10.1.1
    route del -net 0.0.0.0 netmask 0.0.0.0 gw 10.10.1.1
    route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.10.1

This will (1) push traffic destined for 10.10.1.0/24 through OpenVPN (2) remove 10.10.1.1 as the last-resort gateway and (3) make 192.168.10.1 the last-resort gateway.

    Destination     Gateway         Genmask         Iface
    0.0.0.0         192.168.10.1    0.0.0.0         eth0
    192.168.10.0    192.168.10.1    255.255.255.0   eth0
    10.10.1.0       10.10.1.1       255.255.255.0   tun0
0

I use OpenVPN to RDP to my PC at work. I also had this problem when I first set it up. There is no proxy involved in our setup so this may not solve your problem but it may be worth a try.

This is how I fixed it on my system:

  1. Edit the OpenVPN connection, select the IPv4 tab and then press the "Routes..." button.
  2. Tick the checkbox "Use this connection only for resources on its network".
  3. Try connecting the VPN to try it out. Obviously you can reverse it if it doesn't work.

Hope that helps.

0

This depends on the brand of VPN server you are trying to deal with.

My job uses Cisco and the version of the VPN driver in Ubuntu 16.04 is out of date, it simply won't work on a new Dell 5510 laptop. I installed the drivers from the page referred to in this AskUbuntu question 760864 and the problem disappeared. I'm a little concerned that the side referred to there, http://tomtomtom.org/networkmanager-openconnect, is not responding now. That would be bad, because they had both some deb packages you could download as well as full instructions on how to compile the thing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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