CentOS Configuration Firewall Operation instance (start, stop, open, closed port)

Source: Internet
Author: User

CentOS Configuration Firewall Operation instance (start, stop, open, closed port):

Note: The basic operation of the firewall command:

Querying firewall Status:

[[Email protected] ~]# service iptables status< carriage return >

To stop the firewall:

[[Email protected] ~]# service iptables Stop < Enter >

To start the firewall:

[[Email protected] ~]# service iptables start < Enter >

To restart the firewall:

[[Email protected] ~]# service iptables Restart < Enter >

To permanently shut down the firewall:

[[email protected] ~]# chkconfig iptables off< Carriage return >

Enable after permanent shutdown:

[[email protected] ~]# chkconfig iptables on< Carriage return >

1. View firewall status

[[Email protected] ~]# service iptables status< carriage return >


2, edit the/etc/sysconfig/iptables file. We're going to open 8080 ports and 9990 ports in our instance.

Open/etc/sysconfig/iptables with editor


4. Save the/etc/sysconfig/iptables file and execute it at the terminal

[[Email protected] ~]# service iptables Restart < Enter >


5. New view of firewall status

[[Email protected] ~]# service iptables status< carriage return >


6, this time, the server's 8080 and 9990 ports can provide services to the outside.

7, other ports open mode is similar to the open mode.


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

CentOS Configuration Firewall Operation instance (start, stop, open, closed port)

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.