Cannot allocate TUN/TAP dev dynamically



  • Hi,

    I recently built a pfSense gateway - I'm really impressed and happy with the package - using it primarily for firewall and VPN capabilities. The online docs are great.

    I've got just one annoying problem. In openVPN, after a reboot, I get the following openVPN logs:

    Jan 4 20:06:26 openvpn[386]: Exiting
    Jan 4 20:06:26 openvpn[386]: Cannot allocate TUN/TAP dev dynamically
    Jan 4 20:06:26 openvpn[386]: gw #.#.#.#
    (rest of the previous logs look OK up to this point).

    And the openVPN tunnel is down.

    But if I go into the GUI, and simply save the existing server config, the openVPN service restarts normally.

    Jan 4 20:11:47 openvpn[2039]: Initialization Sequence Completed
    (snip)
    Jan 4 20:11:46 openvpn[2024]: /etc/rc.filter_configure tun0 1500 1557 #.#.#.# #.#.#.# init
    Jan 4 20:11:46 openvpn[2024]: /sbin/ifconfig tun0 #.#.#.# #.#.#.# mtu 1500 netmask 255.255.255.255 up
    Jan 4 20:11:46 openvpn[2024]: TUN/TAP device /dev/tun0 opened
    Jan 4 20:11:46 openvpn[2024]: gw #.#.#.#
    (snip)

    Seems like during a reboot, openVPN is trying to initialize before the tun device has been configured.

    Had this behaviour on 1.2.3-RC3 and still on 1.2.3-RELEASE. It's not too bad to live with it for planned reboots - but if the GW restarts due to a crash - the VPN will be down… until our remote users start hitting the phones!!

    I'm new to pfsense and openVPN - but is there a way to delay the initialization of openvpn until the tun device is ready?

    Thanks for a great product.

    Chris.


Log in to reply