CentOS下防火墙的基本操作命令
2016-02-24 14:25
513 查看
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
4、保存/etc/sysconfig/iptables文件,并在终端执行
[root@localhost ~]# service iptables restart <回车>
5、从新查看防火墙状态
[root@localhost ~]# service iptables status<回车>
6、这时候,服务器的8080和9990端口就可以对外提供服务了。
7、其他端口的开放模式就是类似如此开放模式。
注:防火墙的基本操作命令:
查询防火墙状态:
[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
4、保存/etc/sysconfig/iptables文件,并在终端执行
[root@localhost ~]# service iptables restart <回车>
5、从新查看防火墙状态
[root@localhost ~]# service iptables status<回车>
6、这时候,服务器的8080和9990端口就可以对外提供服务了。
7、其他端口的开放模式就是类似如此开放模式。
相关文章推荐
- Java 开发必会的 Linux 命令
- Linux下gcc安装与使用(常用的gcc命令)
- 常用的Linux指令+Android下的Linux指令
- 查看linux服务器CPU详细情况
- linux 添加链接与删除链接(ln命令的用法)
- CentOS 6.5配置本地YUM源
- CentOS 6.5 安装 MySQL 5.6.17 并修改MySQL的root用户密码
- eoiioe linux下解压命令大全
- Linux内核分析 笔记一——by王玥
- CentOS RPM安装MySQL 5.6修改默认密码
- Vi/Vim查找替换使用方法
- linux设备驱动归纳总结(三):1字符型设备之设备申请
- linux no space left on device的解决办法(iNode满导致)
- Linux下装Eclipse C/C++,以及环境配置
- Linux系列软件源码安装之五-----vsftpd服务器
- linux安装confluence5.8.10破解版
- linux安装confluence5.8.10破解版
- CentOS6.5内核升级到linux 3.12.17教程
- 1.2 CentOS6 命令行配置静态IP地址步骤
- centos 自动联网