What is the right command to see what is causing tunN to report "busy" while ifconfig can't see it?

We got a couple of OPNsense devices from Deciso, running freebsd 11.2--HBSD. In trying to start OpenVPN on one (from the OPNsense gui), the error is:
Code:
  Sep 20 15:43:03 OPNsenseFL1 openvpn[93890]: Cannot open TUN/TAP dev /dev/tun1: Device busy (errno=16)
  Sep 20 15:43:03 OPNsenseFL1 openvpn[93890]: Exiting due to fatal error
Yet ifconfig sees no tun0 when ask to list devices
Code:
  # ifconfig -l
  igb0 igb1 igb2 lo0 enc0 pfsync0 pflog0 wg0 wg1 wg2 tun3
[/cod]e
But runs into a roadblock if asked to create the device it just didn't see
[code]
  # ifconfig tun0 create
  ifconfig: SIOCIFCREATE2: File exists
There was a /dev/tun0 file (and tun1 and tun2), but rm'ing those had no effect in terms of "File exists", so evidently that's not a file on this level being reported. The two commands above returned the same as above before removing those, too.

My question is simply which command(s) will show (1) what process has the tun0 (and tun2 and tun3) device "busy", and (2) which file the "SIOCIFCREATE2: File exists" message pertains to.

Sorry if this risks running afoul of the guideline about asking something about a derivative OS. I'm given to understand that OPNsense is at base stock freebsd. I have been hoping for several days to get advice in the OPNsense forum, namely at https://forum.opnsense.org/index.php?topic=14282.0 , without much success.

Best regards,
Whit
 
The issue looks specific to how OPNsense is configured. Which is the part that's absolutely not supported here.
 
It's likely one/all of the enc0, wg0, wg1, wg2 was/were renamed from tun{0-2}. You can check that in ifconfig output, the "group" field.
 
Back
Top