I tried to use openconnect as alternative cisco-pvn client.

When connecting to the vpn, my internet connection gets lost but my intranet connection works. This is a common problem and the suggestion here seems to be to select the "use connection only for resources from this network" option in "routes".

When I do this, my internet connection works again, but the intranet connection is lost :/. I don't know anything about routing but I think it has sth. to do with subnetworks.

When i'm connected to vpn ifconfig shows:

vpn0      Link encap:UNSPEC  Hardware Adresse 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
      inet Adresse:192.168.202.132  P-z-P:192.168.202.132  Maske:255.255.255.128
      UP PUNKTZUPUNKT RUNNING NOARP MULTICAST  MTU:1300  Metrik:1
      RX-Pakete:808 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
      TX-Pakete:495 Fehler:0 Verloren:0 Überläufe:0 Träger:0
      Kollisionen:0 Sendewarteschlangenlänge:500 
      RX-Bytes:878695 (878.6 KB)  TX-Bytes:49437 (49.4 KB)
wlan0     Link encap:Ethernet  Hardware Adresse xxx  
      inet Adresse:192.67.206.156  Bcast:192.67.207.255  Maske:255.255.254.0
      inet6-Adresse: fe80::e8b:fdff:fe5c:aa94/64 Gültigkeitsbereich:Verbindung
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
      RX-Pakete:238884 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
      TX-Pakete:103752 Fehler:0 Verloren:0 Überläufe:0 Träger:0
      Kollisionen:0 Sendewarteschlangenlänge:1000 
      RX-Bytes:108169969 (108.1 MB)  TX-Bytes:13063577 (13.0 MB)

When I ping domains inside the intranet they return "146.140.28.5" or "146.140.1.88" which doesnt look like it's in the vpns ip range.

So how can I configure openconnect to allow internet connection but use vpn for all 146.140.x.x adresses?

The routing table:

Ziel            Router          Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.67.207.254  0.0.0.0         UG    0      0        0 wlan0
146.140.192.20  192.67.207.254  255.255.255.255 UGH   0      0        0 wlan0
146.140.202.0   0.0.0.0         255.255.255.192 U     0      0        0 vpn0
192.67.206.0    0.0.0.0         255.255.254.0   U     9      0        0 wlan0

Regards, Lukas

share|improve this question
    
The solution was a wildcard route: sudo route add -net 146.140.0.0 netmask 255.255.0.0 dev vpn0 – Lukasstr Jun 24 '15 at 11:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.