一、关闭firewall防火墙

1、停止firewall

systemctl stop firewalld.service

2、禁止firewall开机启动

systemctl disable firewalld.service

二、安装iptables防火墙

yum install iptables-services

三、防火墙设置(iptables)

1、iptables配置路径为:

/etc/sysconfig/iptables

vim /etc/sysconfig/iptables

文件内容:

// 80 为端口,可以连续如:80:83
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

2、最后重启防火墙使配置生效

systemctl restart iptables.service

3、设置防火墙开机启动

systemctl enable iptables.service

Centos 7 关闭firewall防火墙启用iptables防火墙的更多相关文章

  1. CentOS 7.0关闭默认firewall防火墙启用iptables防火墙

    操作系统环境:CentOS Linux release 7.0.1406(Core) 64位CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭f ...

  2. CentOS7关闭默认防火墙启用iptables防火墙

    CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭firewall: systemctl stop firewalld.service #停止f ...

  3. (转)CentOS 7.0关闭默认防火墙启用iptables防火墙

    场景:在本地虚拟机上使用ftp软件需要进行相应的端口设置,不可避免要访问Cnetos的防火墙,默认firewall操作不方便,所以需要进行相应的替换. 1 配置防火墙,开启80端口.3306端口 1. ...

  4. CentOS 7.0关闭默认防火墙启用iptables防火墙

    转自:https://www.cnblogs.com/lixuwu/p/6087023.html 阅读目录 1 配置防火墙,开启80端口.3306端口 2 关闭SELINUX 3 CentOS 配置防 ...

  5. 玩转Linux之- CentOS 7.0,启用iptables防火墙

    原文 玩转Linux之- CentOS 7.0,启用iptables防火墙 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall:sy ...

  6. CentOS 7.0,启用iptables防火墙

    CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.service #停止fir ...

  7. CentOS 7.0启用iptables防火墙

    CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.service #停止fir ...

  8. Centos7 防火墙关闭和启用iptables防火墙

    操作系统环境:CentOS Linux release 7.0.1406(Core) 64位CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭f ...

  9. CentOS启用iptables防火墙

    centos 7默认的防火墙使用firewall,系统服务管理方式也变更了,可以通过systemctl命令控制. 可以参考这个链接 但是习惯用iptables,可以按下面的操作改下 1.关闭firew ...

随机推荐

  1. shell 字符串拼接 获取自身文件名 日志记录

    shell  字符串拼接 获取自身文件名 日志记录 [root@hadoop2 xiaole_chk_url]# sh a.sh123.loga.sh[root@hadoop2 xiaole_chk_ ...

  2. oc78--NSFileManager

    // main.m // NSFileManager #import <Foundation/Foundation.h> int main(int argc, const char * a ...

  3. 选择排序(2)——堆排序(heap sort)

    前期概念: 二叉树 完全二叉树 左序遍历 中序遍历 右序遍历 堆 小根堆 大根堆 堆排序(Heapsort)是指利用堆积树(堆)这种数据结构所设计的一种排序算法,它是选择排序的一种.可以利用数组的特点 ...

  4. LuoguP4246 [SHOI2008]堵塞的交通

    https://zybuluo.com/ysner/note/1125078 题面 给一个网格,每次把相邻两点连通性改为\(1\)或\(0\),询问两点是否联通. 解析 线段树神题... 码量巨大,细 ...

  5. 【转载】基于AFNetWorking3.0的图片缓存分析

    原文出处: Yasin的简书 理论 不喜欢理论的可以直接跳到下面的Demo实践部分 缓存介绍 缓存按照保存位置可以分为两类:内存缓存.硬盘缓存(FMDB.CoreData…).我们常说的网络请求缓存包 ...

  6. bzoj1036 树的统计(树链剖分+线段树)

    1036: [ZJOI2008]树的统计Count Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 15120  Solved: 6141[Submit ...

  7. php自动加载的两个函数__autoload和__sql_autoload_register

    一.__autoload 这是一个自动加载函数,在PHP5中,当我们实例化一个未定义的类时,就会触发此函数.看下面例子: printit.class.php //文件 <?php class P ...

  8. SpringBoot 热部署 + IDEA

    1.使用Spring-Boot-Devtools实现热加载(这种方式会自动重启) devtools的原理: 深层原理是使用了两个ClassLoader,一个Classloader加载那些不会改变的类( ...

  9. strupr函数

    2019-06-03 15:13:39 strupr()函数! strupr,函数的一种,将字符串s转换为大写形式. 说明:只转换s中出现的小写字母,不改变其它字符.返回指向s的指针. 兼容性说明:s ...

  10. 最近几道hihocode不会做的题目

    几个易错点 1.数据范围一定要开大,一般多开10个或者5个. 2. 从经常写 int a[n], 然后访问a[n], 这显然会下标越界. 3. 浮点数,无法精确的比较,等于,大于,小于, 都需要使用e ...