UFW is disabled every time I ssh into the server.

October 8, 2016 2.6k views
Server Optimization Linux Basics Firewall Ubuntu 16.04


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?

1 Answer

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
Have another answer? Share your knowledge.