OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Openconnect throughput
« previous next »
  • Print
Pages: [1] 2 3 4

Author Topic: Openconnect throughput  (Read 22028 times)

Jeroen1000

  • Newbie
  • *
  • Posts: 40
  • Karma: 0
    • View Profile
Openconnect throughput
« on: June 20, 2018, 04:48:16 pm »
Dear community

I'm looking to setup Openconnect in client mode. My main router will PBR traffic to the OPNsense router which then encrypts it and sends it on its way to my VPN-provider. I normally know how to get this done technically but I do have a few Q's.

I need about 70 Mbps of net throughput. However, I'm having trouble finding out whether this VPN-flavour is HW-accelerated using AES-NI. I was looking at this board https://www.pcengines.ch/apu2c4.htm. But is this a good choice or should I be looking at more powerful HW?

Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Openconnect throughput
« Reply #1 on: June 20, 2018, 05:00:41 pm »
HW accellerated is only IPSEC and best at GCM enc. OpenVPN or OpenConnect only do this in userspace (max 200-300mbit), no idea how much with APU
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

Jeroen1000

  • Newbie
  • *
  • Posts: 40
  • Karma: 0
    • View Profile
Re: Openconnect throughput
« Reply #2 on: June 20, 2018, 07:26:40 pm »
At the risk souding dumb, but could you explain a bit. I thought openSSL could make use of AES-NI? But if not, is the client multithreaded?

If any of this is the case, I'd better upgrade to Intel Atom hardware or even something more powerful
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Openconnect throughput
« Reply #3 on: June 20, 2018, 09:17:17 pm »
It can use the AES-NI for encryption, but the packets are handled in userspace, not only kernel (like with IPSEC).
Why not invest in a Qotom (250$€) with i5 .. then you should achieve 200mbit with OpenVPN.
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

Jeroen1000

  • Newbie
  • *
  • Posts: 40
  • Karma: 0
    • View Profile
Re: Openconnect throughput
« Reply #4 on: June 20, 2018, 10:15:36 pm »
Thanks that is an excellent suggestion. I almost pulled the trigger on an Atom in the Denverton series but Qotom is a fair bit cheaper
Logged

Jeroen1000

  • Newbie
  • *
  • Posts: 40
  • Karma: 0
    • View Profile
Re: Openconnect throughput
« Reply #5 on: June 21, 2018, 11:30:16 am »
Quote from: Jeroen1000 on June 20, 2018, 10:15:36 pm
Thanks that is an excellent suggestion. I almost pulled the trigger on an Atom in the Denverton series but Qotom is a fair bit cheaper

One last small q. Is there a limit on the amount of simultaneous Openconnect (not Openvpn) VPN connections? I want to PBR traffic to different VPN tunnels depending on the type of traffic.

Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Openconnect throughput
« Reply #6 on: June 21, 2018, 01:39:28 pm »
Do you mean OpenConnect Plugin from the Firewall itself or OpenConnect clients behind the Firewall in your LAN?
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

Jeroen1000

  • Newbie
  • *
  • Posts: 40
  • Karma: 0
    • View Profile
Re: Openconnect throughput
« Reply #7 on: June 21, 2018, 01:59:04 pm »
I mean the firewall itself acting as an Openconnect client and setting up multiple VPN-tunnels using this plug-in
https://www.routerperformance.net/using-openconnect-with-newly-released-opnsense-18-1-1/

I'm doing the same with PPTP on Mikrotik gear: I have 4 PPTP-tunnels active. I mangle (mark) traffic based on ports or subnets and send it to the desired PPTP VPN-tunnel. So policy based routing. It looks that this is possible for Openvpn but have not found anything about openconnect

ps: I ordered a Qotom i5 5200u with 4GB RAM. It's fast enough for anything I might want to throw at it.
« Last Edit: June 21, 2018, 02:01:31 pm by Jeroen1000 »
Logged

Jeroen1000

  • Newbie
  • *
  • Posts: 40
  • Karma: 0
    • View Profile
Re: Openconnect throughput
« Reply #8 on: June 21, 2018, 02:00:10 pm »
double post
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Openconnect throughput
« Reply #9 on: June 21, 2018, 03:07:54 pm »
No, with OpenConnect plugin only one instance is allowed ...
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

Jeroen1000

  • Newbie
  • *
  • Posts: 40
  • Karma: 0
    • View Profile
Re: Openconnect throughput
« Reply #10 on: June 21, 2018, 03:15:38 pm »
That too bad. Maybe I can config more via CLI. We'll see:-)
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Openconnect throughput
« Reply #11 on: June 21, 2018, 03:37:05 pm »
Sure, but then you'll have to remove the plugin and only use the package :)
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

Jeroen1000

  • Newbie
  • *
  • Posts: 40
  • Karma: 0
    • View Profile
Re: Openconnect throughput
« Reply #12 on: June 21, 2018, 10:56:56 pm »
Did you build this plugin? Is this the client that is used: http://www.infradead.org/openconnect/

I did some testing today (note: Linux knowledge: low. Networking knowledge: high) using the client in the link above. It was quite easy to establish 2 tunnels by starting them from 2 different terminal windows.

1. In the linux routing table two tunnel interfaces (tun0 and tun1) appeared. Both with a metric of 0 for 0.0.0.0/0
2. I configured ip tables to only route specific IP's to either tun0 or tun1 (PBR routing or prerouting)
3. I changed the metric of the tunnels to be higher than metric of the gateway for my LAN so that regular traffic skips the tunnels

This works as intended. Now I'm wondering how hard would it be expand the plugin for use with multiple tunnels with adjustable metric?  2 can already be handled by Opnsense if the second tunnel interface is visible to it.

Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Openconnect throughput
« Reply #13 on: June 22, 2018, 06:17:21 am »
Yes, I build the plugin. Since I'm an AnyConnect user where multi-instance is not supported, I didn't add this to the plugin. Also I'm not sure how to handle routing with multiple VPN's.

Perhaps it's better you try to set this up with OPNsense by CLI and when it's running like you intend we can see how to get this in.
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

Jeroen1000

  • Newbie
  • *
  • Posts: 40
  • Karma: 0
    • View Profile
Re: Openconnect throughput
« Reply #14 on: June 22, 2018, 11:22:25 pm »
Here is an update after an evening of testing.
It's mainly a matter of calling Openconnect with the correct parameters. It allows for multiple vpn interfaces to be established. It names them tun0, tun1, etc. Name can be changed to whatever Opensense wants with this option
Code: [Select]
--interface=IFNAMEExample to setup a VPN-tunnel:

Code: [Select]
echo "PASSWORD" | openconnect https://xx.xx.xx.xx:PORT --user=USERNAME --passwd-on-stdin --servercert sha256:SOMERANDOMSTUFF --background
Caveats:
It adds a default route in the routing table to the tunnel with metric 0. So the vpnc script needs to be adapted to allow setting a custom metric per interface (going to give that a try). You then have a few options:

1) you set the metric higher than your regular LAN GW and PBR traffic to a  specific VPN-tunnel
2) you set the metric lower than your regular LAN GW (metric 0 to kiss). This will push all traffic over a VPN-tunnel.
3) I don't know how you handle vpn-providers with self signed certs. But you need to use --servercert in such case. It can probably be automatic as Openconnect litteraly tells you what to do:


Code: [Select]
certificate from VPN server "xxx.xxx.xxx.xxs" failed verification.
Reason: signer not found
To trust this server in future, perhaps add this to your command line:
    --servercert sha256:SOMERANDOMSTUFF
So the plugin would need the options to:

1) specify a metric per tunnel and the ability to change it.
2) a checkbox "route ALL traffic over this connection" (set metric to 0 for that specific tunnel). You would then loose the ability to override the metric in (1)
3) handle self-signed certificates or provide an input box for the user to put the hash

I will also test this with Opnsense if my gear arrives. Or maybe in a VM if find the time. I hope this gives you an idea on how to do this?

« Last Edit: June 22, 2018, 11:25:15 pm by Jeroen1000 »
Logged

  • Print
Pages: [1] 2 3 4
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Openconnect throughput
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2