2

I have an Amazon EC2 instance with Ubuntu 14.04, where I have a Cisco VPN client installed. I am using Cisco AnyConnect Secure Mobility Client (version 3.1.04072).

When I run the VPN client, I can see some initial output, which indicates that the VPN connection is being established successfully, after which I lose access to the server. I need to restart the server from console to regain access.

I assume that the VPN screws up the routing table, but I don't really know how to fix that. I tried to add a default gateway route, before I start the openvpn, as this answer explains: https://serverfault.com/a/649855/105464, but no luck

I am able to run the same VPN client on my local Ubuntu machine successfully. Here is my local routing table before and after the VPN connection:

Before VPN on local machine

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0

After VPN on local machine

$ ifconfig
cscotun0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:172.22.145.31  P-t-P:172.22.145.31  Mask:255.255.240.0
          inet6 addr: fe80::8863:d678:a432:4ba9/128 Scope:Link
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1280  Metric:1
          RX packets:903 errors:0 dropped:0 overruns:0 frame:0
          TX packets:969 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:371960 (371.9 KB)  TX bytes:268199 (268.1 KB)

eth0      Link encap:Ethernet  HWaddr b4:b5:2f:75:f7:b5  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:3323045 errors:0 dropped:6 overruns:0 frame:0
          TX packets:2694039 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3003631663 (3.0 GB)  TX bytes:464943796 (464.9 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:673096 errors:0 dropped:0 overruns:0 frame:0
          TX packets:673096 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:92228222 (92.2 MB)  TX bytes:92228222 (92.2 MB)

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 cscotun0
0.0.0.0         192.168.1.1     0.0.0.0         UG    256    0        0 wlan0
130.132.2.14    192.168.1.1     255.255.255.255 UGH   0      0        0 wlan0
172.22.144.0    0.0.0.0         255.255.240.0   U     0      0        0 cscotun0
192.168.1.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0
192.168.1.1     0.0.0.0         255.255.255.255 UH    0      0        0 wlan0



$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ciscovpn   all  --  anywhere             anywhere            

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ciscovpn   all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
ciscovpn   all  --  anywhere             anywhere            

Chain ciscovpn (3 references)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ciscovpnfw  all  --  anywhere             anywhere            
ciscovpnfw  all  --  anywhere             anywhere            
ciscovpnfw  udp  --  anywhere             anywhere             udp spt:bootpc dpt:bootps
ciscovpnfw  udp  --  anywhere             anywhere             udp spt:bootps dpt:bootpc
ciscovpnfw  udp  --  anywhere             anywhere             udp spt:dhcpv6-client dpt:dhcpv6-server
ciscovpnfw  udp  --  anywhere             anywhere             udp spt:dhcpv6-server dpt:dhcpv6-client
ciscovpnfw  tcp  --  192.168.1.124        vpn4.its.yale.edu    tcp dpt:https
ciscovpnfw  tcp  --  vpn4.its.yale.edu    192.168.1.124        tcp spt:https
ciscovpnfw  udp  --  192.168.1.124        vpn4.its.yale.edu    udp dpt:https
ciscovpnfw  udp  --  vpn4.its.yale.edu    192.168.1.124        udp spt:https
ciscovpnfw  all  --  192.168.1.124        192.168.1.0/24      
ciscovpnfw  all  --  192.168.1.0/24       192.168.1.124       
ciscovpnfw  all  --  192.168.1.0/24       192.168.1.255       
ciscovpnfw  all  --  192.168.1.124        192.168.1.255       
ciscovpnfw  udp  --  192.168.1.0/24       224.0.0.251          udp dpt:mdns
ciscovpnfw  udp  --  192.168.1.124        224.0.0.251          udp dpt:mdns
ciscovpnfw  udp  --  192.168.1.0/24       239.255.255.250      udp dpt:1900
ciscovpnfw  udp  --  192.168.1.124        239.255.255.250      udp dpt:1900
ciscovpnfw  all  --  anywhere             255.255.255.255     
ciscovpnfw  all  --  192.168.1.124        255.255.255.255     
ciscovpnfw  udp  --  192.168.1.124        anywhere             udp dpt:domain
ciscovpnfw  udp  --  anywhere             192.168.1.124        udp spt:domain
ciscovpnfw  udp  --  anywhere             anywhere             udp spt:bootpc dpt:bootps
ciscovpnfw  udp  --  anywhere             anywhere             udp spt:bootps dpt:bootpc
ciscovpnfw  udp  --  anywhere             anywhere             udp spt:dhcpv6-client dpt:dhcpv6-server
ciscovpnfw  udp  --  anywhere             anywhere             udp spt:dhcpv6-server dpt:dhcpv6-client
ciscovpnfw  all  --  anywhere             anywhere            
ciscovpnfw  all  --  vpn172022145031.its.yale.internal  anywhere            
DROP       all  --  anywhere             anywhere            

Chain ciscovpnfw (28 references)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere    
  • Did you get any solution to this problem. I'm attempting to build a workflow for SSH over a VPN. – jonnyjandles Sep 11 '18 at 19:36

Your Answer

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

Browse other questions tagged or ask your own question.