Bridge configured too early

I am setting up an OpenVPN server on my FreeBSD box. I have two network devices:
  • nfe0 is my default network interface
  • tap0 is the virtual network interface
During startup I am creating a bridge between these two devices (required to route VPN traffic to the local network). I have done this by adding the following commands to my rc.conf file:
Code:
# Setup network interfaces
ifconfig_nfe0="UP"
ifconfig_tap0="UP"
cloned_interfaces="bridge0"
ifconfig_bridge0="SYNCDHCP ether 02:ba:8c:fb:64:00 addm nfe0 addm tap0 up"

# Start OpenVPN
openvpn_enable="YES"
openvpn_if="tap"
openvpn_flags="--script-security 2"

Unfortunately, the bridge is created first and then OpenVPN is started. The tap0 device not available until OpenVPN has been started. Is there a way to create the bridge when OpenVPN has finished initialization?
 
Use an up script in the VPN configuration that creates the bridge when the service is started and a down script that destroys it when the service is stopped.


openvpn(8)
 
Back
Top