0

I have no access to internet after start up vpn conection. I'm able to ping google but nothing else. Before VPN connection:

# ip route show
default via 10.0.2.2 dev enp0s3  proto static  metric 100 
10.0.2.0/24 dev enp0s3  proto kernel  scope link  src 10.0.2.15  metric 100 
169.254.0.0/16 dev enp0s3  scope link  metric 1000

with VPN connection:

default dev vpn0  proto static  scope link  metric 50 
default via 10.0.2.2 dev enp0s3  proto static  metric 100 
10.0.2.0/24 dev enp0s3  proto kernel  scope link  src 10.0.2.15  metric 100 
10.129.224.0/20 dev vpn0  proto kernel  scope link  src 10.129.233.224  metric 50 
159.222.160.20 via 10.0.2.2 dev enp0s3  proto static  metric 100 
169.254.0.0/16 dev enp0s3  scope link  metric 1000

# ifconfig
enp0s3    Link encap:Ethernet  HWaddr 08:00:27:dc:a3:f2  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::352c:aacf:d49d:9ead/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:158315 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76106 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:130972073 (130.9 MB)  TX bytes:6823278 (6.8 MB)

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:1332 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1332 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:149950 (149.9 KB)  TX bytes:149950 (149.9 KB)

vpn0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.129.233.224  P-t-P:10.129.233.224  Mask:255.255.240.0
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1406  Metric:1
          RX packets:38 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2140 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:12836 (12.8 KB)  TX bytes:152275 (152.2 KB)

How can I get internet access during the VPN connection? Thanks.

1 Answer 1

0

You have two options:

1.Remove the default gateway pointed to the VPN server and add the static routes for accessing the subnets behind the VPN server.

2.Make sure that the traffic from VPN client side can be NAT to the internet correctly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .