CentOS firewall configuration and shutdown

Source: Internet
Author: User
Tags centos iptables
When using the CentOS operating system, the firewall configuration is very important, he is concerned about the safety of our computer. Once when the ORACLE database was installed under the CentOS operating system, it was shown that the EM installation failed because of the network port, so it was intended to shut down the firewall first. Ran into a firewall configuration instructions, I think it's not bad.
I. Execute the "Setup" command to start the text mode configuration Utility
Select firewall configuration in the Select a tool, then select the Run Tool button, the firewall configuration interface appears, the security level is set to Disabled, and then select OK.
Or we can use the command on the CentOS operating system:
#/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
Two. Reboot the computer.
1.CentOS operating system firewall has opened 80 and 22 ports by default
2. You should also not reboot your computer here:
#/etc/init.d/iptables restart
Firewall shutdown, turn off its services:
3. View firewall information:
#/etc/init.d/iptables status
4. Shut down the Firewall service:
#/etc/init.d/iptables stop
Three. Permanently shut down the firewall
We can also permanently shut down the firewall, but I don't recommend it. Permanently shutting down a firewall can do this:
#chkconfig –level iptables off
can also be directly modified
/etc/sysconfig/iptables
Add a
-A rh-firewall-1-input-m state–state new-m tcp-p tcp–dport 80-j ACCEPT
In this way, we've covered how to centos the operating system firewall configuration and shutdown steps.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.