Internet connection lost when client logged in

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
esperlu
OpenVpn Newbie
Posts: 3
Joined: Sun Oct 31, 2010 7:46 am

Internet connection lost when client logged in

Post by esperlu » Sun Oct 31, 2010 7:50 am

Hi all,

When I make a vpn connection to an openvpn server, I loose the internet connection. The VPN works all right.

Server config (extract)

Code: Select all

port 1194
proto udp
dev tun
server 10.8.0.0 255.255.255.0
push "route 192.168.1.0 255.255.255.0"
Client config

Code: Select all

client
dev tun
proto udp
remote *******.****** 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ns-cert-type server
comp-lzo
verb 3
Client route without the VPN connection (intenet working)

Code: Select all

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.62.131.0     *               255.255.255.128 U     2      0        0 wlan0
link-local      *               255.255.0.0     U     1000   0        0 wlan0
default         10.62.131.1     0.0.0.0         UG    0      0        0 wlan0
client route with VPN connected (internet lost)

Code: Select all

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.8.0.5        *               255.255.255.255 UH    0      0        0 tun0
10.8.0.1        10.8.0.5        255.255.255.255 UGH   0      0        0 tun0
81.244.84.163   10.62.131.1     255.255.255.255 UGH   0      0        0 wlan0
10.62.131.0     *               255.255.255.128 U     2      0        0 wlan0
link-local      *               255.255.0.0     U     1000   0        0 wlan0
default         10.8.0.5        0.0.0.0         UG    0      0        0 tun0
Is there anything I can do to the push rule of the servers's config file?

esperlu
OpenVpn Newbie
Posts: 3
Joined: Sun Oct 31, 2010 7:46 am

Re: Internet connection lost when client logged in

Post by esperlu » Mon Nov 01, 2010 8:42 am

The problem comes from the default route:

Code: Select all

default         10.8.0.5        0.0.0.0 
that points to the VPN subnet. When I delete that route and restore the original one:

Code: Select all

default         10.62.131.1     0.0.0.0 
both the VPN and internet are working.

How can I prevent OpenVPN client and/or server config file to mofify my default route?

esperlu
OpenVpn Newbie
Posts: 3
Joined: Sun Oct 31, 2010 7:46 am

Re: Internet connection lost when client logged in

Post by esperlu » Mon Nov 01, 2010 9:19 am

Problem solved. I was having that issue only when using the Gnome Network Manager VPN applet and not when using the direct command:

Code: Select all

openvpn client.conf
So, there was nothing wrong with the openVPN config files. Work around for Gnome NM found here:
http://www.debuntu.org/how-to-network-m ... ault-route

Post Reply