CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。
1、关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
2、安装iptables防火墙
yum install iptables-services #安装
vi /etc/sysconfig/iptables #编辑防火墙配置文件
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-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
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
:wq! #保存退出
systemctl restart iptables.service #最后重启防火墙使配置生效
systemctl enable iptables.service #设置防火墙开机启动
CentOS 7.0启用iptables防火墙
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.service #停止fir ...
CentOS 7.0禁用iptables防火墙
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. firewall: systemctl start firewalld.service#启动firewal ...
CentOS 7.0 关闭firewalld防火墙指令 及更换Iptables防火墙
CentOS 7.0 关闭firewalld防火墙指令 及更换Iptables防火墙 时间:2014-10-13 19:03:48 作者:哎丫丫 来源:哎丫丫数码网 查看:11761 评论:2 ...
CentOS 7.0关闭默认firewall防火墙启用iptables防火墙
操作系统环境:CentOS Linux release 7.0.1406(Core) 64位CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭f ...
CentOS 7.0,启用iptables防火墙
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.service #停止fir ...
CentOS启用iptables防火墙
centos 7默认的防火墙使用firewall,系统服务管理方式也变更了,可以通过systemctl命令控制. 可以参考这个链接 但是习惯用iptables,可以按下面的操作改下 1.关闭firew ...
Centos7 防火墙关闭和启用iptables防火墙
操作系统环境:CentOS Linux release 7.0.1406(Core) 64位CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭f ...
CentOS7关闭默认防火墙启用iptables防火墙
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭firewall: systemctl stop firewalld.service #停止f ...
(转)CentOS 7.0关闭默认防火墙启用iptables防火墙
场景:在本地虚拟机上使用ftp软件需要进行相应的端口设置,不可避免要访问Cnetos的防火墙,默认firewall操作不方便,所以需要进行相应的替换. 1 配置防火墙,开启80端口.3306端口 1. ...
随机推荐
python3 黑板客爬虫闯关游戏(三)
第三关,先登录,再猜密码,这关难度较第二关大幅增加,要先去注册一个登录账号,然后打开F12,多登录几次,观察headers数据的变化 给出代码,里面注释很详细 ques ...
379. Design Phone Directory
379. Design Phone Directory Design a Phone Directory which supports the following operations: get: P ...
IOS开发-本地通知
// 注册 发送通知的方法 -(void)pushNotfation{ //--------------初始化本地通知 alloc init 虽然是UI控件 但继承NSObject UILocalNo ...
cocos 帧率测试
有人说导致cocos2dx 帧率下降的是getPosition,我测试以后发现并不是这样的. local MainScene = class("MainScene", functi ...
extern ";c"; 的作用
作用:实现C和C++混合编程. 原理:C和C++编译器编译之后,函数名会编译成不同的名字,链接阶段名字查找会找不到目标,后面实例中会详解. 用法:①.c文件中定义的函数,.cpp文件要调用时,该.cp ...
CF Zepto Code Rush 2014 B. Om Nom and Spiders
Om Nom and Spiders time limit per test 3 seconds memory limit per test 256 megabytes input standard ...
gtest编译小结(ubuntu 12.10 , gtest 1.6.0)
1 下载源码,解压之当前用户的主目录(~/) 2 进入make目录,执行make命令 cd ~/gtest-/make make 3 在ubuntu里编译出错,提示找不到lthread库.修改Make ...
[Leetcode][Python]40: Combination Sum II
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail' 40: Combination Sum II ...
HBase经常使用操作之namespace
1.介绍 在HBase中,namespace命名空间指对一组表的逻辑分组,类似RDBMS中的database,方便对表在业务上划分.Apache HBase从0.98.0, 0.95.2两个版本号開始 ...
二叉树的遍历--C#程序举例二叉树的遍历
二叉树的遍历--C#程序举例二叉树的遍历 关于二叉树的介绍笨男孩前面写过一篇博客 二叉树的简单介绍以及二叉树的存储结构 遍历方案 二叉树的遍历分为以下三种: 先序遍历:遍历顺序规则为[根左右] 中序遍 ...
本文发布于:2024-01-27 23:57:47,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/17063710953420.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |