0

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!

3
  • a cron job triggered @reboot? though, perhaps you've misconfigured firewalld Apr 12, 2023 at 3:25
  • The easiest way would be to go add @reboot root sleep 30 /usr/bin/systemctl stop firewalld /usr/bin/systemctl start firewalld to /etc/crontab. A better thing to do that will avoid this altogether is to find out what is going on with firewalld. Apr 12, 2023 at 11:35
  • Yes this is clearly the wrong question, you need to figure out why it doesn't work on normal startup. I'm guessing you have filters that apply to the wireguard interface which doesn't yet exist. Apr 12, 2023 at 16:31

0

You must log in to answer this question.

Browse other questions tagged .