wireguard trouble

James Cook falsifian at falsifian.org
Sat May 29 21:10:26 PDT 2021

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:

	PrivateKey = XXX

	PublicKey = XXX
	AllowedIps =
	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


	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.


More information about the Users mailing list