OpenConnect Issues

Started by Deku, May 28, 2019, 11:54:12 PM

Previous topic - Next topic
May 28, 2019, 11:54:12 PM Last Edit: May 29, 2019, 12:58:00 AM by Deku
I have two OpenConnect issues.

1) The Certificate Hash will not accept my hash, but it works fine if I directly write it to the config.  The log is telling me what it wants (Server SSL certificate didn't match: pin-sha256:SD.....), but it gets reset upon reboot.  Here is the Certificate Hash (modified). pin-sha256:SDqgu8gcbxiE487woYrZPslpdoib7+R4Xrgsj3vn8yA= (obfuscated)

2) When I do connect to the Cisco VPN, all my traffic is being routed through it, instead of just the VPN subnet.  The OpenConnect VPN is assuming the default route.  How can I fix this?  :)

1)
What is "pin-"? Is this a new option from openconnect8?
Normally you choose SHA1 or SHA256 from dropdown and only paste the hash.

2)
You have to tell your Admin to only tunnel specific networks and not all.

May 29, 2019, 07:10:25 PM #2 Last Edit: May 29, 2019, 07:12:04 PM by Deku
Public-Key-Pinning I think...  using sha256 with the fingerprint hash fails.  So I gave it what the log was asking for.
https://timtaubert.de/blog/2014/10/http-public-key-pinning-explained/

Can you connect via console when calling openconnect hostname ... Then you will see the correct hash either Sha1 or Sha256

May 29, 2019, 08:43:35 PM #4 Last Edit: May 29, 2019, 09:02:00 PM by Deku
Yes, when running openconnect via the console, I get this in response:
QuoteTo trust this server in future, perhaps add this to your command line:
    --servercert pin-sha256:SDqgu8gcbxiE487woYrZPslpdoib7+R4Xrgsj3vn8yA=

And on the default gateway, it's doing this...
Quotestablished DTLS connection (using OpenSSL). Ciphersuite DHE-RSA-AES256-SHA.
add host VPNSRV: gateway WANIP
add net 10.10.1.0: gateway 10.10.1.102
delete net default: gateway WANIP
add net default: gateway 10.10.1.102

I see, seems I have to add this feature. Can you open an issue here so I dont forget about it?
https://github.com/opnsense/plugins/issues