wireguard trouble

Aaron LI aly at aaronly.me
Sun May 30 18:31:57 PDT 2021


Hi James,

I knew this issue quite some time ago (> 1 year). It’s an issue in the golang’s net/route package. It was broken by the RTM_VERSION bump in DragonFly and first reported at:

https://github.com/golang/go/issues/34368

Although the above issue has been resolved, I think it’s a partial fix. So there is the tun creation issue we’re having in wireguard.

I tried a bit to investigate the issue but without a result then. Then I suspended the work since I was (and still am) not using wireguard.

Cheers,
Aaron

> On May 30, 2021, at 12:10, James Cook <falsifian at falsifian.org> wrote:
> 
> I tried to set up wireguard on dfly for the first time today, without
> success. Any idea what is going wrong?
> 
> What I did:
> 
> - doas pkg install wireguard
> - Created a file "wg". Heavily redacted version:
> 
>    [Interface]
>    PrivateKey = XXX
> 
>    [Peer]
>    PublicKey = XXX
>    AllowedIps = 10.167.1.0/24
>    EndPoint = XXX_host:XXX_port
>    PersistentKeepalive = 25
> 
> - doas ifconfig tun0 create
> - doas wg setconf tun0 wg
> 
> The last command outputs:
>    Unable to modify interface: No such file or directory
> 
> I also tried the wg-quick script:
> 
> - doas ifconfig tun0 destroy
> - Renamed wg to "tun0.conf"
> - doas wg-quick up ./tun0.conf
> 
> Result
> 
>    falsifian angel-dfly etc $ doas wg-quick up ./tun0.conf
>    [#] wireguard-go tun0
>    INFO: (tun0) 2021/05/30 04:04:57 Starting wireguard-go version 0.0.20200320
>    ERROR: (tun0) 2021/05/30 04:04:57 Failed to create TUN device: open /dev/tun0: no such file or directory
>    [#] rm -f /var/run/wireguard/tun0.sock
> 
> My use of "tun0" is just a guess based on some searching; wg(8) and
> wg-quick(8) don't actually say which interfaces are meant to be used
> with wireguard. (A documentation oversight?)
> 
> I was worried maybe it only works on FreeBSD, but DeltaPorts includes a
> patch for the wg-quick script, so I guess someone got it working at
> some point.
> 
> -- 
> James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20210531/8f5ad72b/attachment-0002.htm>


More information about the Users mailing list