Article Directory
Unit firewalld.service could not be found.
1. Problem description
When we use the following command to view the current Ubuntu firewall status:
systemctl status firewalld
Will report an error like this:
It means that the firewall is not installed and needs to be installed!
2. Install a firewall
yum install firewalld firewall-config
Note: Using yum installation may report an error (yum is not installed), you can refer to Ubuntu installation using yum , it seems that yum is not needed .
Use apt-get to install directly, but you need to change the code:
sudo apt-get install firewalld firewall-config
3. Firewall status
View firewall status:
systemctl status firewalld
Turn off the firewall (temporarily) , after the system restarts, the firewall will be turned back on:
systemctl stop firewalld
Turn off the firewall (permanently) , after the system restarts, the firewall will still be turned off:
systemctl disable firewalld
Restart the firewall:
systemctl restart firewalld