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

查询防火墙状态:

[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://blog.csdn.net/jemlee2002/article/details/7042991

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配置防火墙操作实例

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

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

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

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

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

  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. Ubuntu查看crontab运行日志

    Ubuntu服务器/var/log下没有cron日志,这里记录一下如何ubuntu server如何查看crontab日志 crontab记录日志修改rsyslogsudo vim /etc/rsys ...

  2. springboot使用validation 插件做数据校验

    不多说废话. 首先,我们需要在入参实体对象中,使用注解,控制 @Datapublic class UpdateShufflingRequest { private String shuffling_l ...

  3. gRPC Client Middleware.

    中间件想必大家不陌生,今天给大家介绍如何实现中间件以及实现gRPC的客户端中间件. 什么是中间件? https://docs.microsoft.com/zh-cn/aspnet/core/funda ...

  4. RFS--RequestLibrary

    一.requestlibrary关键字1.1create session:创建一个session回话.Create Session: 创建一个session,连接某个服务器.Create Ntlm S ...

  5. Sonar 配置及部署(Linux系统)

    之前在windows系统上部署了sonar代码审查,由于工作需要,需要在Linux环境再部署一套. 其实,部署的大体都是大同小异的,这里罗列下各个配置,与windows部署不同的地方会重点说一下. 数 ...

  6. julia .文档

    https://docs.julialang.org/en/v1/manual/getting-started/

  7. dvi接口介绍

    Most graphics cards and motherboards feature a Digital Video Interface (DVI) connector for connectin ...

  8. restful接口定义的几种方式

    GET (SELECT): Retrieve a specific Resource from the Server, or a listing of Resources.        #从服务器检 ...

  9. Android测试(二)——adb常用命令

    连接设备: 安装应用包apk文件: adb install apk文件 卸载应用: adb uninstall 包名 将设备中的文件放到本地: adb pull 设备文件目录 本地文件目录 将本地文件 ...

  10. 初步接触gulp

    首先是安装nodejs,通过nodejs的npm全局安装和项目安装gulp,其次在项目里安装所需要的gulp插件,然后新建gulp的配置文件gulpfile.js并写好配置信息(定义gulp任务),最 ...