In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces in detail "how to close the firewall under Linux", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to turn off the firewall under Linux" can help you solve your doubts.
1. Permanent effect after restart: open: chkconfig iptables on closed: chkconfig iptables off 2. Effective immediately, invalid after restart: open: service iptables start closed: service iptables stop
It is important to note that you can use the above command to enable and close other services under Linux.
When the firewall is enabled, make the following settings to open the relevant port
Modify the / etc/sysconfig/iptables file to 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
Or:
On: / etc/init.d/iptables status off: / etc/rc.d/init.d/iptables stop
Finally:
Enter setup under the root user, enter a graphical interface, select Firewall configuration, go to the next interface, select Security Level as Disabled, and save. Just restart it.
Under fedora
/ etc/init.d/iptables stop
Under ubuntu:
Because UBUNTU does not have relevant direct commands
Please use the following command
Iptables-P INPUT ACCEPTiptables-P OUTPUT ACCEPT
Temporarily open all ports
There is no command to close iptables on Ubuntu
Iptables is a powerful firewall under linux, which is powerful enough to replace most hardware firewalls without considering efficiency, but if not applied properly, it may block not only those potential attacks, but also yourself. The harm caused by this may not matter to the ordinary personal PC, but imagine if this is a server, once this happens, not only the normal service of the cinema, but also need to go to the scene to restore, how much loss will this bring you?
So what I'm trying to say is that you have to be very careful when you type in every command related to iptables.
1. When applying each rule to DROP target, check the rule carefully and consider the impact it brings to you before applying it.
two。 In redhat, we can use service iptables stop to turn off the firewall, but in some versions, such as ubuntu, this command does not work. You may find many articles on the Internet that tell you to use the iptables-F command to turn off the firewall, but before using this command, remember to use iptables-L to check the default target,iptables-F of all chains in your system. This command only clears all rules, but does not really close iptables. Imagine that if your chain default target is DROP, you have rules to allow certain ports, but once you apply iptables-L and clear all the rules, the default target will block any access, including you from the remote ssh management server.
So my recommended command to turn off the firewall is
Iptables-P INPUT ACCEPTiptables-P FORWARD ACCEPTiptables-P OUTPUT ACCEPTiptables-F
In short, when you want to make any changes on your server, it's best to have a test environment that has done enough testing before applying it to your server. In addition, to make good use of iptables, it is necessary to understand how iptables works and how to handle iptables for each packet. Only in this way can we write the rules accurately and avoid unnecessary trouble.
After reading this, the article "how to turn off the firewall under Linux" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.
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.