OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • Wireguard in opnsense
« previous next »
  • Print
Pages: 1 ... 7 8 [9] 10

Author Topic: Wireguard in opnsense  (Read 96832 times)

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Wireguard in opnsense
« Reply #120 on: May 25, 2019, 06:59:13 am »
Everyone saying it's easier never did it on it's own ;)
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

firewall

  • Jr. Member
  • **
  • Posts: 98
  • Karma: 7
    • View Profile
Re: Wireguard in opnsense
« Reply #121 on: May 31, 2019, 02:58:05 am »
Quote from: mimugmail on May 25, 2019, 06:59:13 am
Everyone saying it's easier never did it on it's own ;)

i finally got it working but was disappointed to find it was half the speed of openvpn via mullvad.  i'll have to circle back to it later after further development.
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Wireguard in opnsense
« Reply #122 on: May 31, 2019, 06:02:18 am »
Do you have correct MTU values? Perhaps you lower the MSS of LAN?
In my tests it was 5-10x faster, nearly IPSEC speed.
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

firewall

  • Jr. Member
  • **
  • Posts: 98
  • Karma: 7
    • View Profile
Re: Wireguard in opnsense
« Reply #123 on: May 31, 2019, 07:20:10 pm »
Quote from: mimugmail on May 31, 2019, 06:02:18 am
Do you have correct MTU values? Perhaps you lower the MSS of LAN?
In my tests it was 5-10x faster, nearly IPSEC speed.

No dice, unfortunately.  I just tried scaling back MSS 1450, 1400, 1350 and it only had negative impact.  Tried both the LAN and WG interfaces. 

For tuning purposes I was using "ping -D -s 1450 -S <local wg ip> <mullvad wg endpoint>" from opnsense shell to find ballpark MSS.  Let me know if you know of a better approach or know of a good MTU/MSS guide around these parts.
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Wireguard in opnsense
« Reply #124 on: May 31, 2019, 08:40:32 pm »
Whats your speed and Hardware?
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

firewall

  • Jr. Member
  • **
  • Posts: 98
  • Karma: 7
    • View Profile
Re: Wireguard in opnsense
« Reply #125 on: May 31, 2019, 09:36:57 pm »
Quote from: mimugmail on May 31, 2019, 08:40:32 pm
Whats your speed and Hardware?

ISP is gigabit.

HW is Qotom-Q575G6-S05 (i7 7500U).

Direct connection (routed through OPN without VPN) yields ~700mb/s before OPN services kick in then it scales back to ~450mb/s.

OPN route through OpenVPN: 280 mb/s
OPN route through WG: 230 mb/s

Logged

marr1977

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Wireguard in opnsense
« Reply #126 on: June 05, 2019, 10:44:23 pm »
Just wanted to say that I managed to get things working with Mullvad without any trouble.

Ran
pkg install os-wireguard-devel
and then followed the guide at https://wiki.opnsense.org/manual/how-tos/wireguard-client-mullvad.html.

My only comment on the guide is that the Mullvad Wireguard IP/port is not obvious from the server list at https://www.mullvad.net/en/servers/#wireguard. You can ping an host (e.g. au1-wireguard.mullvad.net) to get an IP. To get the port you can download a configuration file at https://mullvad.net/en/download/wireguard-config/ and in one of the files in the zip archive the host and port are listed for the server you chose.

Also, remember that Mullvad has discontinued free trial periods on new accounts.
Logged

firewall

  • Jr. Member
  • **
  • Posts: 98
  • Karma: 7
    • View Profile
Re: Wireguard in opnsense
« Reply #127 on: June 12, 2019, 12:34:35 am »
Quote from: marr1977 on June 05, 2019, 10:44:23 pm
Just wanted to say that I managed to get things working with Mullvad without any trouble.

What kind of speeds are you achieving relative to OVPN?  I tested all endpoints in NAM and they all came up short of OVPN throughput.
Logged

ruggerio

  • Sr. Member
  • ****
  • Posts: 295
  • Karma: 11
    • View Profile
[this one solved]Re: Wireguard in opnsense
« Reply #128 on: June 12, 2019, 01:51:32 pm »
i have now 2 roadwarriors connecting to my opnsense. On it, it looks like this:

interface: wg0
  public key: wg0key=
  private key: (hidden)
  listening port: 51820

peer: client1key=
  endpoint: ip:13595
  allowed ips: 192.168.11.0/24
  latest handshake: 25 seconds ago
  transfer: 1011.63 KiB received, 4.03 MiB sent

peer: client2key=
  endpoint: otherip:63680
  allowed ips: (none)
  latest handshake: 1 minute, 9 seconds ago
  transfer: 0 B received, 3.03 KiB sent

why to heck do i get allowed ips (none)?

Client1 is working well, i copied the config from client2 and changed key and ip-adress, thats all.

wg0.conf on the sense looks like this:
[Interface]
Address = 192.168.11.1/24
ListenPort = 51820
PrivateKey = privatekey=
[Peer]
PublicKey = key=
AllowedIPs = 192.168.11.10/24
[Peer]
PublicKey = key=
AllowedIPs = 192.168.11.20/24

And a client-config looks like this:

[Interface]
PrivateKey = key=
Address = 192.168.11.20/24
DNS = 192.168.1.1

[Peer]
PublicKey = key=
AllowedIPs = 0.0.0.0/0
Endpoint = vpn.mydomain.com:51820

...i don't get it, why i can connect just with one client... :(


What WAS wrong:
in opnsense GUI use the allowed IP's with Netmask 32, not 24, as it should not overleap. I changed to 192.168.11.10/32 and 192.168.11.20/32 - works.

Devil is in detail...


« Last Edit: June 14, 2019, 02:29:18 pm by ruggerio »
Logged

ruggerio

  • Sr. Member
  • ****
  • Posts: 295
  • Karma: 11
    • View Profile
Re: Wireguard in opnsense
« Reply #129 on: June 14, 2019, 02:35:15 pm »
Before i forget:

it would be great, to create an autorule in NAT for outbound connections. For the moment, i have it in hybrid mode, which would be unnecessary, if it would be there, when the services were activated.
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Wireguard in opnsense
« Reply #130 on: June 14, 2019, 03:22:35 pm »
I dont like auto rules as they tend to break complex setups, sorry.
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

ruggerio

  • Sr. Member
  • ****
  • Posts: 295
  • Karma: 11
    • View Profile
Re: Wireguard in opnsense
« Reply #131 on: June 17, 2019, 09:24:42 am »
That might be. I wouldn't do that also not by default, but as it is in Proxy, giving the option to let it be done. So it's the decision of the user.

In each case, it would it make much easier for SOHO-Users, which are not that experienced.
Logged

ruggerio

  • Sr. Member
  • ****
  • Posts: 295
  • Karma: 11
    • View Profile
Re: Wireguard in opnsense
« Reply #132 on: July 17, 2019, 11:31:25 am »
Congrats to today's golive as 1.0 in 19.7.

Roger
Logged

rth

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Wireguard in opnsense
« Reply #133 on: August 15, 2019, 07:45:11 am »
Is there a migration from the package to the plugin? Don't want to just pull the trigger and break it...
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Wireguard in opnsense
« Reply #134 on: August 15, 2019, 11:12:41 am »
Nope, sorry
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

  • Print
Pages: 1 ... 7 8 [9] 10
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • Wireguard in opnsense
 

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