CentOs6.4 firewall settings

Reprinted from the article: http://my.oschina.net/u/593517/blog/297941

Note: In this centos6.4 (CentOS-6.4-x86_64-bin-DVD1.iso) Example.

CentOS firewall configuration operation instance (start, stop, open and close the port):

Note: The basic operation command of the firewall:

Firewall status query:

[root@localhost ~]# service iptables status<回车>

Stop Firewall:

[the root @localhost  ~] # iptables STOP-Service <Enter>

Start Firewall:

[root@localhost ~]# service iptables start <回车>

Restart the firewall:

[root@localhost ~]# service iptables restart <回车>

Permanently turn off the firewall:

[root@localhost ~]# chkconfig iptables off<回车>

After permanently closed to enable:

[root@localhost ~]# chkconfig iptables on<回车>

1. Check the firewall status

[root@localhost ~]# service iptables status<回车>

2, edit / etc / sysconfig / iptables file. We instances to open ports 8080 and 9990

Open / etc / sysconfig / iptables using an editor

3, Yihuhuhuapiao, we add the 8080 and 9990 ports

4, save the / etc / sysconfig / iptables file, and perform terminal

[root@localhost ~]# service iptables restart <回车>

5, the new view firewall status

[root@localhost ~]# service iptables status<回车>

6, this time, 8080 and 9990 servers port can begin to provide the service.

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

Guess you like

Origin www.cnblogs.com/damoblog/p/11569600.html