How to enable and disable the firewall on CentOS 7
In CentOS 7, you can enable or disable the firewall using the following commands:
- Turn on the firewall.
sudo systemctl start firewalld
- Turn off the firewall.
sudo systemctl stop firewalld
To permanently enable or disable the firewall, you can use the following commands:
- Permanently activate the firewall.
sudo systemctl enable firewalld
- Permanently disable the firewall.
sudo systemctl disable firewalld
Remember, after turning the firewall on or off, you need to restart the firewall service for the changes to take effect.
sudo systemctl restart firewalld
More tutorials
How to resolve the unauthorized access vulnerability in JMX in Java?(Opens in a new browser tab)
How can I change the firewall port in CentOS 7?(Opens in a new browser tab)
Grafana Tutor Step-by-step Guide to Grafana on Ubuntu 18.04(Opens in a new browser tab)
How to check the SSH status in CentOS?(Opens in a new browser tab)
What are the steps for configuring environment variables in CentOS 7?(Opens in a new browser tab)