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

    Wireguard Start Delayed - How to delay filter loading

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 2 Posters 70 Views 3 Watching
    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.
    • 4 Offline
      4o4rh
      last edited by

      My wireguard seems to start before the network is fully up.

      I have added "sleep 20" to the shell command, but how can i ensure the filter don't load till after wireguard is loaded

      sleep 20 && service wireguardd start 	earlyshellcmd 	WireGuard earlyshellcmd (DO NOT EDIT/DELETE!)
      
      1 Reply Last reply Reply Quote 0
      • stephenw10S Offline
        stephenw10 Netgate Administrator
        last edited by

        You mean the firewall rule for WG specifically? Or the full ruleset?

        What problem are you trying to solve here?

        4 1 Reply Last reply Reply Quote 0
        • 4 Offline
          4o4rh @stephenw10
          last edited by

          @stephenw10 I mean all the rules, the

          service wireguardd start 	earlyshellcmd 	WireGuard earlyshellcmd (DO NOT EDIT/DELETE!)
          

          is to ensure wireguard starts before the firewall rules load right?
          but i need to start after all network interfaces are up and the firewall rules to load after wireguard has started as i route everything over wireguard

          1 Reply Last reply Reply Quote 0
          • stephenw10S Offline
            stephenw10 Netgate Administrator
            last edited by

            OK, so what happens without that? You end up without routes?

            4 1 Reply Last reply Reply Quote 0
            • 4 Offline
              4o4rh @stephenw10
              last edited by

              @stephenw10 there is fallback to openvpn, but basically wireguard doesn't succeed after reboot and then i have to manually restart it and use filter reload. so i put the delay there to try and ensure wireguard gets to start properly

              1 Reply Last reply Reply Quote 0
              • stephenw10S Offline
                stephenw10 Netgate Administrator
                last edited by

                Ah, OK so without this the wireguard tunnels don't connect at all after boot?

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