service ufw status
says ufw
is active, while ufw status
says ufw
is "inactive". Why are ufw
status results different? If each result has different meaning, please explain each meaning and difference.
1 Answer
service ufw status
(Active) states that the service of ufw
(its daemon) is running in the background and is ready to work. in newer versions of Ubuntu
its equivalent is:
systemctl status ufw
ufw status
talks about the ufw
itself, it says what the daemon (if it is active) is doing. By saying it's "inactive", it means firewall does nothing (however it's still living in the background and is ready to be enabled).
- Service: Active, UFW: Active: I'm here and I'm doing my job.
- Service: Active, UFW: Inactive: I'm here and I'm doing nothing.
-
Thank you for your easy and good explanation. could you tell me one more thing? you said 'UFW: Inactive = I'm doing nothing'. Is it caused because there are not any rule added or because just ufw is turned off?– Mr.choiJun 9, 2017 at 13:14
-
I think because it's not enabled, use
sudo ufw enable
to enable it. after that it is doing it's job however you still didn't told it to do what (there is no rule) so after enabling it you should add some rule too.– Ravexina ♦Jun 9, 2017 at 13:16