CentOS 配置防火墙操作实例(启、停、开、闭端口):

注:防火墙的基本操作命令:

查询防火墙状态:

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

停止防火墙:

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

启动防火墙:

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

重启防火墙:

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

永久关闭防火墙:

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

永久关闭后启用:

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

1、查看防火墙状态

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

2、编辑/etc/sysconfig/iptables文件。我们实例中要打开8080端口和9990端口

用编辑器打开/etc/sysconfig/iptables

3、依葫芦画瓢,我们添加8080端口和9990端口

4、保存/etc/sysconfig/iptables文件,并在终端执行

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

5、从新查看防火墙状态

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

6、这时候,服务器的8080和9990端口就可以对外提供服务了。

7、其他端口的开放模式就是类似如此开放模式。

原文链接:http://my.oschina.net/u/593517/blog/297941

CentOS配置防火墙操作实例的更多相关文章

  1. CentOS 配置防火墙操作实例(启、停、开、闭端口):

    CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service   iptables status< ...

  2. CentOS 配置防火墙操作实例(启、停、开、闭端口)CentOS Linux-FTP/对外开放端口(接口)TomCat相关

    链接地址:http://blog.csdn.net/jemlee2002/article/details/7042991 CentOS 配置防火墙操作实例(启.停.开.闭端口): 注:防火墙的基本操作 ...

  3. CentOS 配置防火墙操作实例(启、停、开、闭port)

    CentOS 配置防火墙操作实例(启.停.开.闭port): 注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service   iptables status& ...

  4. CentOS 配置防火墙操作实例(启、停、开、闭端口)

    防火墙的基本操作命令 查询防火墙状态:[root@localhost ~]# service   iptables status<回车> 停止防火墙:[root@localhost ~]# ...

  5. CentOS 配置防火墙操作实例

    注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service   iptables status<回车>   停止防火墙: [root@localh ...

  6. centos开启nginx服务成功,却无法访问。没有开启80端口。centos配置防火墙 开启80端口

    Linux配置防火墙 开启80端口 编辑配置文件/etc/sysconfig/iptables [root@weixinht ~]# vim /etc/sysconfig/iptables 1 # F ...

  7. CentOS防火墙操作实例(启动、停止、开、闭端口)

    注:防火墙的基本操作命令: 查询防火墙状态: [root@localhost ~]# service   iptables status<回车>   停止防火墙: [root@localh ...

  8. CentOS配置防火墙

    昨天帮朋友配置CentOSserver,一開始为了方便測试直接把防火墙关了.之后便须要配置好防火墙,网上找了几个防火墙规则都有错误,后来发现是博主发帖不认真,有太多字符错误,以下是我整理的亲測可用的防 ...

  9. CentOS firewalld 防火墙操作

    Centos 7 开启端口CentOS 7 默认没有使用iptables,所以通过编辑iptables的配置文件来开启80端口是不可以的 CentOS 7 采用了 firewalld 防火墙 如要查询 ...

随机推荐

  1. Undefined attribute name (placeholder)

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/ ...

  2. linux 本机内核模块

    make -C /lib/modules/4.13.0-36-generic/build M=/$(pwd) modules 内核里只需要写obj-m:=hello.o

  3. Hadoop Yarn配置项 yarn.nodemanager.resource.local-dirs探讨

    1. What is the recommended value for "yarn.nodemanager.resource.local-dirs"? We only have ...

  4. springMVC第二天——高级参数绑定与其它特性

    大纲摘要: 1.高级参数绑定 a) 数组类型的参数绑定 b) List类型的绑定 2.@RequestMapping注解的使用 3.Controller方法返回值 4.Springmvc中异常处理 5 ...

  5. SkylineGlobe 7.0.1 & 7.0.2版本Web开发 如何实现对三维模型和地形的剖切展示

    现在很多三维项目中,不仅仅要用到三维地形,正射影像和矢量数据,还会融合到各种三维模型,包括传统的3DMax手工建模,BIM,倾斜摄影自动建模,激光点云模型,三维地质体模型等等. 三维平台首先要做的是把 ...

  6. 迷茫<第二篇:回到老家湖南长沙>

    2014年8月初,我买了回老家的火车票,当时没有买到坐票,卧铺贵了买不起,所以我就选择了站票,准备站回老家.我现在还记得我当时买的是T1列火车,北京西站到长沙火车站,全程16个小时.当时我就在火车上站 ...

  7. 私有云方案——利用阿里云云解析实现DDNS

            各位都是程序员,工作中是不是遇到个类似情况.在家里研究的一些开源代码或写的一些demo或试验代码,在工作中正好需要参考一下,但是在家里的电脑上.           虽然这些都可以用云 ...

  8. linux nohup命令实现退出终端后程序继续后台运行

    Unix/Linux下一般想让某个程序在后台运行,很多都是使用&在程序结尾来让程序自动运行:但如果要想在退出终端后,程序依然还在后台运行,则要用nohup与&组合来实现. nohup ...

  9. MongoDB小东西

    在mongodb中,show users 和db.system.users.find() 都能查看账户的相关信息,但是这两个命令有什么区别么? db.system.users.find() 是查看全局 ...

  10. VsCode调试js

    1.安装Debugger for Chrome   2.编辑launch.json { "type": "chrome", "request" ...