CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。
1、关闭firewall:
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl mask firewalld.service

2、安装iptables防火墙
yum install iptables-services -y

3.启动设置防火墙

# systemctl enable iptables
# systemctl start iptables

4.查看防火墙状态

systemctl status iptables

5编辑防火墙,增加端口
vi /etc/sysconfig/iptables #编辑防火墙配置文件
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
:wq! #保存退出

3.重启配置,重启系统
systemctl restart iptables.service #重启防火墙使配置生效
systemctl enable iptables.service #设置防火墙开机启动

CentOS 7.0防火墙设置的更多相关文章

  1. CentOS 7.0 防火墙操作

    CentOS 7.0默认使用的是firewall作为防火墙,之前版本是使用iptables.所以在CentOS 7执行下面命令是无法查看防火墙状态的. [root@localhost ~]# serv ...

  2. CentOS 7.0 防火墙

    CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙.firewall:systemctl start firewalld.service#启动firewalls ...

  3. centos 7.0防火墙导致vagrant端口映射失败

    在vagrant上部署了centos7.0后,Vagrantfile端口转发设置后,宿主机访问客户机站点还是无法访问,问题出在:centos7.0以上版本默认会安装firewalld防火墙, fire ...

  4. RedHat7系列(Centos/Debian) FireWall 防火墙 设置

    RedHat 7 系列之后 系统把默认的iptables 换成了 Firewall 所以我们要适应 这个新的防火墙管理 -------------------服务相关----------------- ...

  5. Centos 7.0防火墙问题

    从Centos7开始,自带的防火墙从iptables更改成了firewall.一般在企业环境,出于人力和稳定性考虑,还是用成熟的技术比较稳妥. 以下是关闭firewall的方法 systemctl s ...

  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. 玩转Linux之- CentOS 7.0,启用iptables防火墙

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

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

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

随机推荐

  1. Pop!_OS安装与配置(四):GNOME插件篇

    Pop!_OS安装与配置(四):GNOME插件篇 #0x0 效果图 #0x1 自动安装(不保证成功性) #0x2 OpenWeather #0x3 Topicons Plus #0x4 System- ...

  2. python进阶之内置方法

    python进阶之内置方法 字符串类型的内置方法 常用操作与方法: 按索引取值 str[index] 切片 ste[start:stop:step] 长度 len(str) 成员运算in和not in ...

  3. 【RCTF-2015】bug

    信息: 题目来源: RCTF-2015 标签:PHP.SQL注入 解题过程 访问网址,提示需要登陆: 使用admin用户名进行注册,提示: 对登陆页面与注册页面进行Fuzz,没有发现注入点. 登陆后页 ...

  4. CTFHub_技能树_SQL注入Ⅱ

    SQL注入 MySQL结构 进行尝试: 尝试查看表名: 尝试查看列名: 发现无法直接输出: 使用时间注入脚本跑出结果: import requests import time session = re ...

  5. Ubuntu systemctl 查看管理系统启动项

    Ubuntu systemctl 查看系统启动项 列出所有启动项: sudo systemctl list-unit-files 会列出开启的和未开启的: 使用grep过滤一下开启的grep enab ...

  6. Mysql基础(十一):Self Join

    Summary: 如何使用 MySQL self join 进行表的 自己对自己的join操作.. 前面的教程,已经教过join语法,都是两个表的之间的操作,特殊的,当一个表自己和自己进行join,那 ...

  7. bzoj1682[Usaco2005 Mar]Out of Hay 干草危机*

    bzoj1682[Usaco2005 Mar]Out of Hay 干草危机 题意: 给个图,每个节点都和1联通,奶牛要从1到每个节点(可以走回头路),希望经过的最长边最短. 题解: 求最小生成树即可 ...

  8. Active Directory - Server Remote administration management

    Windows Admin Center: https://www.microsoft.com/en-us/evalcenter/evaluate-windows-admin-center Remot ...

  9. Python Ethical Hacking - TROJANS Analysis(5)

    Spoofing File Extention - A trick. Use the Kali Linux Program - Characters 1. Open the program. 2. F ...

  10. java HashMap、HashTable、ConcurrentHashMap区别

    HashTable 底层数组+链表实现,无论key还是value都不能为null,线程安全,实现线程安全的方式是在修改数据时锁住整个HashTable,效率低,ConcurrentHashMap做了相 ...