OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 19.7 Legacy Series »
  • [SOLVED] Wireguard debug ?
« previous next »
  • Print
Pages: [1]

Author Topic: [SOLVED] Wireguard debug ?  (Read 12419 times)

BeNe

  • Full Member
  • ***
  • Posts: 111
  • Karma: 13
  • Use *BSD and feel free!
    • View Profile
[SOLVED] Wireguard debug ?
« on: September 20, 2019, 05:03:47 pm »
Hi OPNsense Users,

i try to setup/enable Wireguard and checked the documentation (OPNsense wiki and Thomas Krenn Wiki).
But the Service won't come up.

How can i debug the problem ?
I'm unable to find the correct log for wireguard. There is nothing helpfull in the Logfiles (System -> Logfiles -> Backend or General).
 
Code: [Select]
Sep 20 16:43:29 configd.py: [ab436b4f-6a31-4b6a-a8f4-685ec8e485f2] starting WireguardThats all for wireguard, but the service is directly stopped. I'm on OPNsense 19.7.4_1-amd64 with LibreSSL 2.9.2

Thanks for your help!
« Last Edit: September 21, 2019, 10:40:43 am by BeNe »
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6404
  • Karma: 446
    • View Profile
Re: Wireguard debug ?
« Reply #1 on: September 20, 2019, 05:34:43 pm »
/usr/local/etc/rc.d/wireguard start

Output please
Logged
Twitter: mimu_muc
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

whit

  • Newbie
  • *
  • Posts: 35
  • Karma: 1
    • View Profile
Re: Wireguard debug ?
« Reply #2 on: September 20, 2019, 07:39:39 pm »
In /usr/local/etc/wireguard do you have a config file? I've learned you not only need to save configurations for both ends, and make sure that the Local specifies the Peer after the Peer is defined, but you need to then "Save" the overview page that then has the already-saved definitions, or else the appropriate config file isn't placed there. In other locations in the OPNsense UI, you get an "Apply Changes" button on the top right whenever there's an additional step required to apply something you've configured. But the WireGuard module isn't consistent with that design. It's a solid piece of work, just rough around the edges.
Logged

BeNe

  • Full Member
  • ***
  • Posts: 111
  • Karma: 13
  • Use *BSD and feel free!
    • View Profile
Re: Wireguard debug ?
« Reply #3 on: September 20, 2019, 09:42:27 pm »
Allright, thanks for you help so far.

Code: [Select]
# /usr/local/etc/rc.d/wireguard start
[#] wireguard-go wg0
INFO: (wg0) 2019/09/20 21:29:12 Starting wireguard-go version 0.0.20190805
[#] wg setconf wg0 /tmp/tmp.Xbud4cy8/sh-np.qJq9uk
Key is not the correct length or format: `JTBL9JOU86GO7qHkNGyOya5iYYrkhr4yoKrd5t1bmWQ'
Configuration parsing error
[#] rm -f /var/run/wireguard/wg0.sock

Here is the config - don´t worry. I will delete this public config and create a new one:
Code: [Select]
# cat /usr/local/etc/wireguard/wg0.conf

[Interface]
Address = 10.99.97.0/24
DNS = 172.16.17.31
ListenPort = 51820
PrivateKey = aAViqItlIzXP8k9uFl0D/E0cDuz3tHIKpD2T1N2V1Fo=
[Peer]
PublicKey = JTBL9JOU86GO7qHkNGyOya5iYYrkhr4yoKrd5t1bmWQ
AllowedIPs = 10.99.97.10/32


So the public Key is not good / long enough ?
This was automatic generated by clicking "Save" in the Webinterface. I did not change or cut the Key.
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6404
  • Karma: 446
    • View Profile
Re: Wireguard debug ?
« Reply #4 on: September 21, 2019, 07:16:46 am »
Maybe the public key from endpoint is wrong?
Logged
Twitter: mimu_muc
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

BeNe

  • Full Member
  • ***
  • Posts: 111
  • Karma: 13
  • Use *BSD and feel free!
    • View Profile
Re: Wireguard debug ?
« Reply #5 on: September 21, 2019, 10:40:28 am »
I generated new Keys and also added a new endpoint. Checked both keys and the Wireguard Service is coming up.  8)

Thanks for your time and help!
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 19.7 Legacy Series »
  • [SOLVED] Wireguard debug ?
 

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