In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the "Linux on and off firewall command". In the daily operation, I believe that many people have doubts about the Linux on and off firewall command. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "Linux on and off firewall command". Next, please follow the editor to study!
1. The command to turn on / off the firewall under Linux will take effect permanently and will not be restored after restart. Enable: chkconfig iptables on closes: chkconfig iptables off2, effective immediately, restarts after restart: service iptables start closes: what service iptables stop needs to note is that you can use the above command to enable and disable other services under Linux. When the firewall is turned on, make the following settings, open the relevant port, modify the / etc/sysconfig/iptables file, and add the following:-A RH-Firewall-1-INPUT-m state-- state NEW-m tcp-p tcp-- dport 80-j ACCEPT-A RH-Firewall-1-INPUT-m state-- state NEW-m tcp-p tcp-- dport 22-j ACCEPT II, UBuntu close the firewall iptables-An INPUT-I! PPP0-j ACCEPT 3, CentOS Linux firewall configuration and shutdown execute "setup" command to start text mode configuration utility, select "firewall configuration" in "choose a tool", then select "run tool" button, firewall configuration interface appears, "security level" is set to "disabled", and then select "OK". Or use the command # / sbin/iptables-I INPUT-p tcp-dport 80-j ACCEPT#/sbin/iptables-I INPUT-p tcp-dport 22-j ACCEPT#/etc/rc.d/init.d/iptables save to restart the computer like this By default, the firewall has opened ports 80 and 22, and it should not be possible to restart the computer: # / etc/init.d/iptables restart turn off the firewall service: view firewall information: # / etc/init.d/iptables status close the firewall service: # / etc/init.d/iptables stop to this point The study on "Linux on and off firewall command" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.