FreeBSD route add command failed: external program exited with error status: 1



  • Hello,
    I have a weired problem with OpenVPN. I am new to FreeBSD/pfsense so maybe someone evry had this error message when try to establish VPN Tunnel:
    Everything runs fine, but when the add route command get executed this here appears:

    Dec 22 23:48:23    openvpn[7866]: Initialization Sequence Completed
    Dec 22 23:48:23    openvpn[7866]: ERROR: FreeBSD route add command failed: external program exited with error status: 1
    Dec 22 23:48:23    openvpn[7866]: /sbin/route add -net 128.0.0.0 5.254.134.1 128.0.0.0
    Dec 22 23:48:23    openvpn[7866]: ERROR: FreeBSD route add command failed: external program exited with error status: 1
    Dec 22 23:48:23    openvpn[7866]: /sbin/route add -net 0.0.0.0 5.254.134.1 128.0.0.0
    Dec 22 23:48:23    openvpn[7866]: /sbin/route add -net 178.73.x.x 77.xx.xx.1 255.255.255.255
    Dec 22 23:48:23    openvpn[7866]: /usr/local/sbin/ovpn-linkup ovpnc2 1500 1542 init
    Dec 22 23:48:23    openvpn[7866]: TUN/TAP device /dev/tun2 opened
    Dec 22 23:48:23    openvpn[7866]: TUN/TAP device ovpnc2 exists previously, keep at program end
    Dec 22 23:48:23    openvpn[7866]: ROUTE_GATEWAY 77.xx.xx.1
    Dec 22 23:48:23    openvpn[7866]: OPTIONS IMPORT: –ip-win32 and/or --dhcp-option options modified
    Dec 22 23:48:23    openvpn[7866]: OPTIONS IMPORT: route-related options modified
    Dec 22 23:48:23    openvpn[7866]: OPTIONS IMPORT: route options modified
    Dec 22 23:48:23    openvpn[7866]: OPTIONS IMPORT: –ifconfig/up options modified
    Dec 22 23:48:23    openvpn[7866]: OPTIONS IMPORT: timers and/or timeouts modified

    I already checks logfiles and search here but I can not find any related post for this issue. Hope somebody can help me with this :(

    Regards
    goodbyte


  • Rebel Alliance Developer Netgate

    That is indicating that you already have a route for those networks.

    From the look of what it's trying to add, the remote side is pushing you a default route (redirect-gateway def1), and if your first vpn client is already doing that, the second one can't since the routes already exist.



  • @jimp:

    That is indicating that you already have a route for those networks.

    From the look of what it's trying to add, the remote side is pushing you a default route (redirect-gateway def1), and if your first vpn client is already doing that, the second one can't since the routes already exist.

    Hi jimp,
    thank you for the fast answer. I checked the routes what I have, but I can  not see these routes, which should get added. Can you give me any hint, what I can check next - i have no idea why this is not working (it ever works).Any help is appreciated :)

    I also see this when the loggin is on 6:

    Dec 26 16:32:12 openvpn[71624]: Cannot open TUN/TAP dev /dev/tun2: Device busy (errno=16)
    Dec 26 16:32:12 openvpn[71624]: TUN/TAP device ovpnc2 exists previously, keep at program end

    Best regards
    goodbyte



  • Hello,

    I solved it by myself and this issue disappears. I changed from TUN to TAP device in configuration, renew the DHCP Lease for the virtual adapter and it works like a charm.

    goodbyte



  • @goodbyte:

    Dec 22 23:48:23    openvpn[7866]: ERROR: FreeBSD route add command failed: external program exited with error status: 1

    I had the exact same issue a bit earlier and it was driving me nuts as it seem only to happen when I was adding a 2nd VPN connection. The first exactly configured the same was working fine.

    I rebootet pfSense and all worked like a charm


Log in to reply