View Single Post
Old 4th December 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Only NICs that have a hostname.if(5) file will be provisioned on boot by the OS. The netstart(8) script scans for these files, and takes no action when it doesn't find them.

First: confirm your em0 network connection has been provisioned on your running system. Do this by issuing the command $ ifconfig em0, and review the output. If your em0 NIC has an IP address and netmask assigned, and an active status, the NIC has been provisioned. If you don't have an active em0 NIC, then issue $ ifconfig by itself and get a list of all your NICs. You'll have a loopback pseudo-NIC, all physical NICs, an IPSec encapsulation pseudo-NIC, and your non-working OpenVPN tunnel pseudo-NIC.

Second: If em0 has been provisioned, it had to have been provisioned somewhere. Either via netstart -- which you have told us does not have a provisioning file for em0 -- or by an rc.local(8) script, which you haven't mentioned and is therefore unlikely, or by manually entering ifconfig(8) provisioning commands some time after booting, which you haven't mentioned doing.

If you are manually entering a command like # ifconfig em0 inet autoconf after your system is already running, this would be after your OpenVPN connection has already failed to start.

If em0 has been provisioned with an IP address, and a) you do not have an /etc/hostname.em0 file, and b) you do not have an /etc/rc.local file, and c) you are not manually provisioning em0 ... then the only other remaining possibility is the openvpn client application is somehow doing the provisioning. Which is improbable, but not completely impossible. You can test this improbability by temporarily renaming the file to something netstart(8) will not act on, such as: # mv /etc/hostname.tun0 /etc/do.not.start.tun0 and reboot. If, on reboot, em0 is no longer provisioned you will know the improbable became possible. To rename the file back, you would use # mv /etc/do.not.start.tun0 /etc/hostname.tun0.
Reply With Quote