Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    VPN (Surfshark) not working after reboot

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 1 Posters 723 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Bob.DigB
      Bob.Dig LAYER 8
      last edited by Bob.Dig

      I do a nightly reboot of my pfSense via cron. This is needed because there is a router in front of pfSense, which will get new dynamic IPs before that at every night and pfSense can't cope with that, especially IPv6 and DDNS.

      Every morning I can't browse the internet. Only after manually clicking the "restart openvpn service" button next to each tunnel, it is working again.

      Under Gateways the tunnels are sometimes shown as online and on other mornings they are not, doesn't matter anyways, it is not working on its own.

      • Anyone has an idea, why this is happening?
      • Is there another cron job I could run to only restart the tunnels at a later time?

      2.5.1-RELEASE

      Bob.DigB 2 Replies Last reply Reply Quote 0
      • Bob.DigB
        Bob.Dig LAYER 8 @Bob.Dig
        last edited by Bob.Dig

        Some logs added:

        when I reboot pfSense (not working):

        Jun 17 13:38:42 	openvpn 	93742 	Initialization Sequence Completed
        Jun 17 13:38:42 	openvpn 	93742 	WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
        Jun 17 13:38:42 	openvpn 	93742 	/usr/local/sbin/ovpn-linkup ovpnc2 1500 1656 10.8.8.7 255.255.255.0 init
        Jun 17 13:38:42 	openvpn 	93742 	ERROR: FreeBSD route add command failed: external program exited with error status: 1
        Jun 17 13:38:42 	openvpn 	93742 	/sbin/ifconfig ovpnc2 10.8.8.7 10.8.8.1 mtu 1500 netmask 255.255.255.0 up
        Jun 17 13:38:42 	openvpn 	93742 	ioctl(TUNSIFMODE): Device busy (errno=16)
        Jun 17 13:38:42 	openvpn 	93742 	TUN/TAP device /dev/tun2 opened
        Jun 17 13:38:42 	openvpn 	93742 	TUN/TAP device ovpnc2 exists previously, keep at program end
        Jun 17 13:38:42 	openvpn 	93742 	Options error: Unrecognized option or missing or extra parameter(s) in [PUSH-OPTIONS]:7: block-outside-dns (2.5.1)
        Jun 17 13:38:42 	openvpn 	93742 	Options error: option 'redirect-gateway' cannot be used in this context ([PUSH-OPTIONS])
        Jun 17 13:38:42 	openvpn 	93742 	Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])
        Jun 17 13:38:42 	openvpn 	93742 	Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])
        

        When I restart the service (working):

        Jun 17 13:48:05 	openvpn 	57752 	Initialization Sequence Completed
        Jun 17 13:48:05 	openvpn 	57752 	WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
        Jun 17 13:48:05 	openvpn 	57752 	/usr/local/sbin/ovpn-linkup ovpnc2 1500 1656 10.8.8.11 255.255.255.0 init
        Jun 17 13:48:05 	openvpn 	57752 	ERROR: FreeBSD route add command failed: external program exited with error status: 1
        Jun 17 13:48:05 	openvpn 	57752 	/sbin/ifconfig ovpnc2 10.8.8.11 10.8.8.1 mtu 1500 netmask 255.255.255.0 up
        Jun 17 13:48:05 	openvpn 	57752 	TUN/TAP device /dev/tun2 opened
        Jun 17 13:48:05 	openvpn 	57752 	TUN/TAP device ovpnc2 exists previously, keep at program end
        Jun 17 13:48:05 	openvpn 	57752 	Options error: Unrecognized option or missing or extra parameter(s) in [PUSH-OPTIONS]:7: block-outside-dns (2.5.1)
        Jun 17 13:48:05 	openvpn 	57752 	Options error: option 'redirect-gateway' cannot be used in this context ([PUSH-OPTIONS])
        Jun 17 13:48:05 	openvpn 	57752 	Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])
        Jun 17 13:48:05 	openvpn 	57752 	Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])
        Jun 17 13:48:03 	openvpn 	57752 	[de-nue-v006.prod.surfshark.com] Peer Connection Initiated with [AF_INET]95.111.253.65:1194
        

        The key-difference seems to be:

        Jun 17 13:38:42 	openvpn 	93742 	ioctl(TUNSIFMODE): Device busy (errno=16)
        
        1 Reply Last reply Reply Quote 0
        • Bob.DigB
          Bob.Dig LAYER 8 @Bob.Dig
          last edited by Bob.Dig

          @bob-dig said in VPN (Surfshark) not working after reboot:

          I do a nightly reboot of my pfSense via cron.

          So I added another cron job (rc.reload_all) after that one and this does it for me. All in all a little bit to complicated for my taste.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.