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

查询防火墙状态:

[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、其他端口的开放模式就是类似如此开放模式。

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

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

  5. centos防火墙操作

    centos防火墙基本操作 #/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT#/sbin/iptables -I INPUT -p tcp -- ...

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

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

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

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

  8. MySQL多实例启动停止

    原文地址:http://wolfword.blog.51cto.com/4892126/1241304/ 说明:本实验以MySQL 5.1为例来实验. 1.安装MySQL 5.1 yum instal ...

  9. MySQL数据库基础(一)(启动/停止、登录/退出、语法规范及最基础操作)

    1.启动/停止MySQL服务 启动:net start mysql    停止:net stop mysql 2.MySQL登录/退出 登录:mysql 参数:如果连接的是本地服务器,一般用命令:my ...

随机推荐

  1. Html5 常见的新增API详解

    1. getElementsByClassName()方法 getElementsByClassName()方法接收一个参数,即一个包含一或多个类名的字符串,返回带有指定类的所有元素的NodeList ...

  2. c语言编程之双向循环链表

    双向循环链表就是形成两个环,注意每个环的首尾相连基本就可以了. 程序中采用尾插法进行添加节点. #include<stdio.h> #include<stdlib.h> #de ...

  3. Learning Java language Fundamentals

    Chapter 2 Learning Java language fundamentals exercises: 1.What  is Unicode? Unicode is a computing ...

  4. transitionend 事件的兼容

    google :webkitTransitionEnd firefox :transitionend ie       : MSTransitionEnd

  5. c++ dirname() basename()

    http://linux.about.com/library/cmd/blcmdl3_dirname.htm #include <iostream> #include <libgen ...

  6. CSS3中box-shadow的用法介绍

    一般我们通过box-shadow来设置盒阴影,但是有些属性我们一般没有用到,这篇文章将对box-shadow属性进行逐个分析.语法 CSS Code复制内容到剪贴板 E {box-shadow:ins ...

  7. __int64 与long long 的区别 分类: Brush Mode 2014-08-14 10:22 64人阅读 评论(0) 收藏

    //为了和DSP兼容,TSint64和TUint64设置成TSint40和TUint40一样的数 //结果VC中还是认为是32位的,显然不合适 //typedef signed long int    ...

  8. VS开发工具 不会在异常的地方停止的问题.

    启用"仅我的代码"

  9. Sqli-labs less 27a

    Less-27a 本关与27关的区别在于对于id的处理,这里用的是 " ,同时mysql的错误不会在前端页面显示. 我们根据27关直接给出一个示例payload: http://127.0. ...

  10. zend studio 快捷键收集

    Ctrl + /            单行注释 Ctrl + Shift + / 添加块注释 Ctrl + Shift + \   移除块注释 Ctrl + Shift + F 调整代码格式 Ctr ...