Home > Article > Operation and Maintenance > How to turn off the firewall in linux
Firewall technology helps computer networks build a relatively isolated protective barrier between internal and external networks by organically combining various software and hardware devices for security management and screening. , a technology to protect the security of user data and information.
The main function of firewall technology is to promptly discover and deal with security risks, data transmission and other issues that may exist when computer networks are running. The treatment measures include isolation and protection, and can also control various operations in computer network security. Implement recording and testing to ensure the security of computer network operations, protect the integrity of user data and information, and provide users with a better and safer computer network experience.
Let’s take a look at how to turn off the protection wall in Linux:
1. Permanently effective
Open: chkconfig iptables on
Close: chkconfig iptables off
2. Effective immediately
Open: service iptables start
Close: service iptables stop
3. Open some ports
vim /etc/sysconfig/iptables
Add the relevant ports you want to open
-A INPUT -m state --state NEW -m tcp -p tcp --dport 6379 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp - -dport 8082 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
service iptables restart
4. Check the fire status
systemctl status firewalld
service iptables status
Recommended related articles and tutorials:linuxtutorial
The above is the detailed content of How to turn off the firewall in linux. For more information, please follow other related articles on the PHP Chinese website!