I'm a little lost and hope someone can point me into the right direction to solve my problem. I have a server running with a Debian distribution and I'm using UFW as firewall. The configuration and setup was pretty easy and I started the firewall as documented with:
manly@server:~$ sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
If I check, if ufw is running I receive (correctly):
manly@server:~$ sudo ufw status
Status: active
To Action From
-- ------ ----
22 ALLOW Anywhere
80/tcp ALLOW Anywhere
22 ALLOW Anywhere (v6)
80/tcp ALLOW Anywhere (v6)
After some time (I check daily), the firewall turns inactive - even without any restart in between -, i.e., status returns inactive:
manly@server:~$ sudo ufw status
Status: inactive
I have no idea why. What can I check to figure out the reasons behind that weird behavior. I'm thankful for any advice!
Update:
I noticed something, which may help to find a solution. So I start the ufw with the sudo ufw enable in an ssh session. It seems like, that if I keep the ssh session open, the firewall is enabled. If I close the ssh session (exit), the ufw status will be set to inactive after some time. Do I have to start the ufw in any special manner?