I have a ticketing system website connecting to a back-end database on my LAN through a Wireguard VPN tunnel. The front end web server is an Ubuntu 20.04.6 LTS VPS and if I reboot the server (which is not very often) the website will not connect to the back-end database until I manually stop and start firewalld. Once this is done, all works fine. A very odd problem...
My question is, what is best was to way to write a script which will stop and start firewalld when the Ubuntu VPS boots up? Thanks!