OPNsense Forum

Archive => 19.7 Legacy Series => Topic started by: molotch on November 17, 2019, 07:43:23 PM

Title: Wireguard VPN server ping returns are lost
Post by: molotch on November 17, 2019, 07:43:23 PM
Hi,

I'm having trouble getting WG to work as intended.

My setup is quite plain. I installed the WG-plugin and configured the server and the client as follows. The client is running on Ubuntu 19.10.

Server setup (from the List Configuration window)

interface: wg0
  public key: <key1>
  private key: (hidden)
  listening port: 51820

peer: <key2>
  endpoint: (hidden):22729
  allowed ips: 10.10.0.10/32
  transfer: 5.64 KiB received, 3.50 KiB sent


The server is using 10.10.0.1/24 as Tunnel Address and I have opened port 51820/UDP to all source addresses and ports on my WAN interface.

Client setup

[Interface]
ListenPort = 53460
PrivateKey = (hidden)

[Peer]
PublicKey = <key1>
AllowsIPs = 10.10.0.0/24
Endpoint = (hidden):51820
PersistentKeepalive = 25


wg0 on the client is configured with the IP-address 10.10.0.10/32

If I run ping 10.10.0.1 from the client the packet hits the WAN-address on port 51820, so far everything seems fine. As you see above the WG-server also shows it has both received and sent traffic to the client (transfer: 5.64 KiB received, 3.50 KiB sent). None of the traffic makes it back to the client though. Ping shows 100& packet loss.

Any pointers on how to understand this behaviour? Any help is appreciated.
Title: Re: Wireguard VPN server ping returns are lost
Post by: chbmb on November 18, 2019, 12:57:48 AM
I'm just writing a guide on how I got WireGuard working with Ubuntu 19.10 as a client.  Should be finished and published by next weekend.   I'll pm you a preview now, and you can act as a tester.  It's the second part of the guide I published yesterday which is on the linuxserver.io blog here (https://blog.linuxserver.io/2019/11/16/setting-up-wireguard-on-opnsense-android/).

EDIT:  I've sent you a PM to the draft of the WireGuard Ubuntu guide.
Title: Re: Wireguard VPN server ping returns are lost
Post by: molotch on November 18, 2019, 09:12:28 PM
Thanks, I'll try to look into it asap, probably tomorrow or the day after.
Title: Re: Wireguard VPN server ping returns are lost
Post by: chbmb on November 24, 2019, 01:11:51 AM
I've published my article now.  The link is:

https://blog.linuxserver.io/2019/11/24/connect-an-ubuntu-client-to-opnsense-wireguard-tunnel-with-a-gui-toggle-in-gnome/