Wireguard Start Delayed - How to delay filter loading
-
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!)
-
You mean the firewall rule for WG specifically? Or the full ruleset?
What problem are you trying to solve here?
-
@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 -
OK, so what happens without that? You end up without routes?
-
@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
-
Ah, OK so without this the wireguard tunnels don't connect at all after boot?
-
@stephenw10 it's 50/50. but if they don't then i have to stop and restart the service