1:centos6的两种方式

1.1:service方式

查看防火墙状态:

[root@centos6 ~]# service iptables status

iptables:未运行防火墙。

开启防火墙:

[root@centos6 ~]# service iptables start

重启防火墙:

[root@centos6 ~]# service iptables restart

关闭防火墙:

[root@centos6 ~]# service iptables stop

1.2:iptables方式

查看防火墙状态:

[root@centos6 init.d]# /etc/init.d/iptables status

开启iptables:

[root@centos6 init.d]# /etc/init.d/iptables start

重启iptables:

[root@centos6 init.d]# /etc/init.d/iptables restart

暂时关闭防火墙:

[root@centos6 init.d]# /etc/init.d/iptables stop

2:centos7的方式

启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld 
开机禁用  : systemctl disable firewalld
开机启用  : systemctl enable firewalld

centos6和centos7的防火墙的操作的更多相关文章

  1. centos6和centos7的防火墙基本命令

    一.centos6: 1.firewall的基本启动/停止/重启命令 $查看防火墙状态: service iptables status (/etc/init.d/iptables status) $ ...

  2. centos6,与centos7对于防火墙的操作

    CentOS 6.5 1.开放指定端口/sbin/iptables -I INPUT -p tcp --dport 端口号 -j ACCEPT   //写入修改/etc/init.d/iptables ...

  3. centos7关于防火墙的操作

    1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld  停止: systemctl disab ...

  4. 2、centos6和centos7的区别

    services使用了systemd来代替sysvinit管理. systemd是Linux下的一种init软件,由Lennart Poettering带头开发,并在LGPL 2.1及其后续版本许可证 ...

  5. centos6与centos7区别

    CentOS 6 vs CentOS 7的不同   (1)桌面系统[CentOS6] GNOME 2.x[CentOS7] GNOME 3.x(GNOME Shell) (2)文件系统[CentOS6 ...

  6. centos7 关闭防火墙

    centos7 关闭防火墙 1.firewall相关的操作    查看防火墙状态 firewall-cmd    --state 关闭防火墙 systemctl  stop   firewalld.s ...

  7. Centos7启动防火墙时报错Failed to start IPv4 firewall with iptables

    今天在虚拟机的Linux系统(centos7)里安装Redis,准备学习一下布隆过滤器呢,安装完后使用Windows本机访问不了虚拟机里的Redis,telnet不通能够ping通.于是就去看防火墙, ...

  8. centOs6和Centos7开放/关闭端口区别

    #centos6启动防火墙 service iptables start #centos6停止防火墙/关闭防火墙  service iptables stop #centos6重启防火墙 servic ...

  9. firewall防火墙常用操作

    # firewall防火墙常用操作 - 启动```systemctl start firewalld```- 停止```systemctl stop firewalld```- 重启```system ...

随机推荐

  1. 【BZOJ3992】【SDOI2015】序列统计

    数论劲啊 原题: 小C有一个集合S,里面的元素都是小于M的非负整数.他用程序编写了一个数列生成器,可以生成一个长度为N的数列,数列中的每个数都属于集合S. 小C用这个生成器生成了许多这样的数列.但是小 ...

  2. oracle-sql优化器

    优化器optimizer Oracle 执行计划(Explain Plan) 说明 http://langgufu.iteye.com/blog/2158163 explain plan是一个dml语 ...

  3. ArrayList集合方法

  4. Lambda 表达式 是 个 好东东

    Lambda 表达式 是 个 好东东 首先,通过 Lambda 表达式 + 动态语言特性 dynamic , C# 已经 可以 实现 函数式 编程 了 其次, 利用 Lambda, 可以 实现 AOP ...

  5. php 面向对象:this 关键字

    PHP5中为解决变量的命名冲突和不确定性问题,引入关键字“$this”代表其所在当前对象. $this在构造函数中指该构造函数所创建的新对象. 在类中使用当前对象的属性和方法,必须使用$this-&g ...

  6. C166-变量和函数指定物理地址之二

    按照<RENAMECLASS Compiler Directive>http://www.keil.com/support/man/docs/c166/c166_renameclass.h ...

  7. spring-整合Struts2

    1. Spring 如何在 WEB 应用中使用 ? 1). 需要额外加入的 jar 包: spring-web-4.0.0.RELEASE.jarspring-webmvc-4.0.0.RELEASE ...

  8. java-环境安装及配置

    需要安装的软件有: 1.Jdk1.8 2.Tomcat8 3.Eclipse Neon 4.Mysql 5.项目导入 1.JDK安装 1.1安装JDK 1.2配置环境变量 高级系统配置: 环境变量: ...

  9. jmeter—JDBC request动态参数设置

    jmeter—JDBC request动态参数设置 重要参数说明: Variable Name:数据库连接池的名字,需要与JDBC Connection Configuration的Variable ...

  10. golang channel几点总结

    golang提倡使用通讯来共享数据,而不是通过共享数据来通讯.channel就是golang这种方式的体现. Channel 在golang中有两种channel:带缓存的和不带缓存. 带缓存的cha ...