Question

UFW is disabled every time I ssh into the server.

Hey,

every time I login to my server I get this message:

"ufw" has not been enabled, however it has been configured. To enable it,
run "ufw enable".

If I run ufw status I get Status: active.

When I run ufw enable I get Firewall is active and enabled on system startup. However if I exit out and log back in I get the previous message again.

How can I fix this?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Sounds like you are likely using a One-Click Application, right? The “message of the day” [MOTD] that is shown on login is a static message that provides some basic documentation about how the One-Click is initially configured. It is not updated when ufw is enabled or disabled. You can remove it altogether using:

sudo rm -rf /etc/update-motd.d/99-one-click

Sounds like you are likely using a One-Click Application, right? The “message of the day” [MOTD] that is shown on login is a static message that provides some basic documentation about how the One-Click is initially configured. It is not updated when ufw is enabled or disabled. You can remove it altogether using:

sudo rm -rf /etc/update-motd.d/99-one-click