centos7 关闭默认firewalld,开启iptables
编者按:
对于使用了centos6系列系统N年的运维来说,在使用centos7的时候难免会遇到各种不适应。比如防火墙问题。本文主要记录怎么关闭默认的firewalld防火墙,重新启用iptables。
1.关闭firewalld防火墙
systemctl stop firewalld
systemctl mask firewalld
2.安装iptables
yum install iptables-services
3.设置开机启动
systemctl enable iptables.service
systemctl [stop|start|restart] iptables。service
#or
service iptables [stop|start|restart]
注意:
在启动的时候会遇到这样的问题:Unit iptables.service failed to load
问题根源是在/etc/sysconfig/下面没有找到iptables文件。解决办法如下:
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
/usr/libexec/iptables/iptables.init save #保存成功
然后再执行
systemctl start iptables.service
centos7 关闭默认firewalld,开启iptables的更多相关文章
- CentOS7关闭默认防火墙启用iptables防火墙
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭firewall: systemctl stop firewalld.service #停止f ...
- centos7关闭默认firewall,启用iptables
CentOS 7.0默认使用"firewall"防火墙 一:关闭firewall1.直接关闭防火墙systemctl stop firewalld.service 2.禁止fire ...
- centos 7 关闭firewalld开启iptables
1: 关闭系统高级防火墙firewalld systemctl stop firewalld.service #停止firewall systemctl disable firewalld.servi ...
- (转)CentOS 7.0关闭默认防火墙启用iptables防火墙
场景:在本地虚拟机上使用ftp软件需要进行相应的端口设置,不可避免要访问Cnetos的防火墙,默认firewall操作不方便,所以需要进行相应的替换. 1 配置防火墙,开启80端口.3306端口 1. ...
- CentOS 7.0关闭默认防火墙启用iptables防火墙
转自:https://www.cnblogs.com/lixuwu/p/6087023.html 阅读目录 1 配置防火墙,开启80端口.3306端口 2 关闭SELINUX 3 CentOS 配置防 ...
- 树莓派(Debian)系统开启iptables的raw表实现日志输出
说明:可能Debian默认不开启iptables的raw表,所以无法通过其实现日志跟踪. 日志跟踪:http://www.cnblogs.com/EasonJim/p/8413563.html 解决方 ...
- centos7下部署iptables环境纪录(关闭默认的firewalle)
CentOS7默认的防火墙不是iptables,而是firewall.由于习惯了用iptables作为防火墙,所以在安装好centos7系统后,会将默认的firewall关闭,并另安装iptables ...
- centos7下部署iptables环境纪录(关闭默认的firewalle)(转)
下面介绍centos7关闭firewall安装iptables,并且开启80端口.3306端口的操作记录:[root@localhost ~]# cat /etc/redhat-release Cen ...
- ifconfig 命令,改变主机名,改DNS hosts、关闭selinux firewalld netfilter 、防火墙iptables规则
ifconfig 命令用于查看网络相关的命令: 安装:yum install net-tools -y ifdown eth_name 关闭网卡 ifup eth_name 开启网卡 配 ...
随机推荐
- python---CRM用户关系管理
Day1:项目分析 一:需求分析 二:CRM角色功能介绍 三:业务场景分析 销售: .销售A 从百度推广获取了一个客户,录入了CRM系统,咨询了Python课程,但是没有报名 .销售B 从qq群获取一 ...
- c#+js 使用formdata上传文件
如果不是使用form表单submit的形式,我们可以手动通过formdata传值(针对文件上传等) 比如: <html> <head> <meta name=" ...
- soj1762.排座椅
1762. 排座椅 Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description 上课的时候总有一些同学和前后左右的人交头接耳,这是令 ...
- IE6下面的css调试工具
在开发过程中,代码部分实现之后,就要着手于前台展示部分的界面,公司的美工又是新手,无奈,只有自己慢慢调了,但IE6之前的版本都没有好的调试工具,后来在网上搜索了一个 IE Developer Tool ...
- HDU 1535 Invitation Cards (最短路)
题目链接 Problem Description In the age of television, not many people attend theater performances. Anti ...
- Linux基础-free窥内存-dd探硬盘
监控内存篇(RAM)-free free指令可以很直观的看到内存的使用情况 free -m指令以单位为MB的方式查看内存的使用情况(free命令读取的文件是/proc/meminfo) 这个表格的解释 ...
- php strcmp()函数
<? $str = "LAMP"; $str1 = "LAMPBrother"; $strc = strcmp($str,$str1); switch ( ...
- 系统学习(javascript)_基础(语法)
1.分类 ECMAScript javascript的标准 DOM Document object Model文档对象模型 BOM Browser object Model 浏览器对象模型 ti ...
- Go语言知识点笔记
golang的花括号: 在go中,继承了C系的花括号作为一个作用域块的包含范围指示,但不同于C/C++中花括号位置可任意摆放,go要求“ { ”必须在右侧(一行代码尾部),不能单独另起一行.类似Pyt ...
- 利用Volatility对Linux内存取证分析-常用命令翻译
命令翻译 linux_apihooks - 检查用户名apihooks linux_arp - 打印ARP表 linux_aslr_shift - 自动检测Linux aslr改变 linux_ban ...