1

I am using VPNC-client to connect to my office-network. It is working fine.

My machine is ubuntu16.04.

But when I get connected to VPN, I can not access to the public internet or google.com

ifconfig(When VPN is connected)

br-1b5f9a5d3ef3 Link encap:Ethernet  HWaddr 02:42:02:97:fc:19  
          inet addr:171.18.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::42:2ff:fe97:fc19/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1202 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:137378 (137.3 KB)

docker0   Link encap:Ethernet  HWaddr 02:42:e6:dd:41:9c  
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

enp3s0    Link encap:Ethernet  HWaddr 3c:97:0e:52:9c:4b  
          inet addr:192.168.1.124  Bcast:192.168.1.124  Mask:255.255.255.255
          inet6 addr: fe80::f45:59f7:5048:911c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:523084 errors:0 dropped:80 overruns:0 frame:0
          TX packets:628988 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:212687829 (212.6 MB)  TX bytes:247005317 (247.0 MB)
          Interrupt:19 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:53197 errors:0 dropped:0 overruns:0 frame:0
          TX packets:53197 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:5917170 (5.9 MB)  TX bytes:5917170 (5.9 MB)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:11.129.222.84  P-t-P:10.129.222.84  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1412  Metric:1
          RX packets:317 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1996 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:78204 (78.2 KB)  TX bytes:532254 (532.2 KB)

wlp2s0    Link encap:Ethernet  HWaddr 67:94:23:38:c2:f5  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:777078
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:226 (226.0 B)  TX bytes:143 (143.0 B)
          Interrupt:17 

route (Before VPNC connected)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    100    0        0 enp3s0
link-local      *               255.255.0.0     U     1000   0        0 br-1b5f9a5d3ef3
182.17.0.0      *               255.255.0.0     U     0      0        0 docker0
182.18.0.0      *               255.255.0.0     U     0      0        0 br-1b5f9a5d3ef3
192.168.1.1     *               255.255.255.255 UH    100    0        0 enp3s0
192.168.1.124   *               255.255.255.255 UH    100    0        0 enp3s0
oo-234.officeweb 192.168.1.1     255.255.255.255 UGH   0      0        0 enp3s0
255.255.255.0   *               255.255.255.255 UH    100    0        0 enp3s0

route (After VPNC connected)

kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         *               0.0.0.0         U     0      0        0 tun0
default         192.168.1.1     0.0.0.0         UG    100    0        0 enp3s0
10.129.222.84   *               255.255.255.255 UH    0      0        0 tun0
link-local      *               255.255.0.0     U     1000   0        0 br-1b5f9a5d3ef3
182.17.0.0      *               255.255.0.0     U     0      0        0 docker0
182.18.0.0      *               255.255.0.0     U     0      0        0 br-1b5f9a5d3ef3
192.168.1.1     *               255.255.255.255 UH    100    0        0 enp3s0
192.168.1.124   *               255.255.255.255 UH    100    0        0 enp3s0
oo-234.officeweb 192.168.1.1     255.255.255.255 UGH   0      0        0 enp3s0
255.255.255.0   *               255.255.255.255 UH    100    0        0 enp3s0

Edit: 1

route (after route del default dev tun0)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    100    0        0 enp3s0
default         192.168.43.1    0.0.0.0         UG    600    0        0 wlp2s0
11.12.222.107  *               255.255.255.255 UH    0      0        0 tun0
link-local      *               255.255.0.0     U     1000   0        0 br-1b5f9a5d3ef3
171.17.0.0      *               255.255.0.0     U     0      0        0 docker0
172.18.0.0      *               255.255.0.0     U     0      0        0 br-1b5f9a5d3ef3
192.168.1.1     *               255.255.255.255 UH    100    0        0 enp3s0
192.168.1.124   *               255.255.255.255 UH    100    0        0 enp3s0
192.168.43.0    *               255.255.255.0   U     600    0        0 wlp2s0
oo-234.officeweb 192.168.1.1     255.255.255.255 UGH   0      0        0 enp3s0
255.255.255.0   *               255.255.255.255 UH    100    0        0 enp3s0
2

Some VPNs disable access to internet (due security reasons), although, in your case it looks like VPN adds a route by default that could cause this problem:

default         *               0.0.0.0         U     0      0        0 tun0

Try to run route del default dev tun0.

do your colleagues have the same problem?... If it is due security reasons I'd rather recommend to use a virtual machine for that VPN.

14
  • One of my colleague is using Windows and for him internet is working fine even when he is connected to vpn Feb 5 '18 at 18:37
  • Did you try to deleted default tunnel route? Feb 5 '18 at 18:40
  • I will try and will let you know. Meanwhile thank you very very much Feb 5 '18 at 19:21
  • I did route del default dev tun0. Now internet is working but vpn is not working Feb 6 '18 at 6:29
  • I have edited my question and added route output after executing route del default dev tun0 Feb 6 '18 at 6:30

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.