centos 7 中防火墙的关闭问题
新安装的centos 7 发现有些程序端口是关闭的,想到了防火墙和selinux
selinx 好关闭 /etc/sysconfig/selinux 中 追加 SELINUX=disabled
防火墙以为也是很好弄,按照以前的老规矩,service iptables stop 或者 chkconfig --level 35 iptables off
重启后 运行 systemctl list-unit-files | grep ip 发现还有个ip6tables 没关 chkconfig --level 35 ip6tables off
再运行 systemctl list-unit-files | grep ip 发现全部都disables 还是不通
没办法,只有添加规则了,tptables -I INPUT 1 -p tcp --dport 6259 -j ACCEPT
然后service iptables save 端口通了
我想这个是不是个BUG , 也许我没有找到方法,请告知
Centos7中的防火墙调整为firewalld,试一下systemctl stop firewalld关闭防火墙。
I installed CentOS 7 with minimal configuration (os + dev tools). I am trying to open 80 port for httpdservice, but something wrong with my iptables service ... what's wrong with it? What am I doing wrong?
# ifconfig/sbin/service iptables save
bash: ifconfig/sbin/service: No such file or directory
# /sbin/service iptables save
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
# sudo service iptables status
Redirecting to /bin/systemctl status iptables.service
iptables.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
# /sbin/service iptables save
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
# sudo service iptables start
Redirecting to /bin/systemctl start iptables.service
Failed to issue method call: Unit iptables.service failed to load: No such file or directory.
With RHEL 7 / CentOS 7, firewalld was introduced to manage iptables. IMHO, firewalld is more suited for workstations than for server environments.
It is possible to go back to a more classic iptables setup. First, stop and mask the firewalld service:
systemctl stop firewalld
systemctl mask firewalld
Then, install the iptables-services package:
yum install iptables-services
Enable the service at boot-time:
systemctl enable iptables
Managing the service
systemctl [stop|start|restart] iptables
Saving your firewall rules can be done as follows:
service iptables save
or
/usr/libexec/iptables/iptables.init save
centos 7 中防火墙的关闭问题的更多相关文章
- Linux CentOS中防火墙的关闭及开启端口
注:CentOS7之前用来管理防火墙的工具是iptable,7之后使用的是Firewall 样例:在CentOS7上安装tomcat后,在linux本机上可以访问tomcat主页,http://ip: ...
- CentOS 7中防火墙 firewall-cmd命令
在 CentOS 7 iptable 防火墙已经被 firewall替代 1.暂时开放FTP服务 firewall-cmd --add-service=ftp 2.永久开放FTP服务 firewall ...
- CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙
官方文档介绍地址: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Gui ...
- CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙--转载
最近在linux(这里用到的是Centos7的64位版本)安装nginx时,在开放80端口时用iptables设置端口 和重启服务发现提示未找到文件,在网络上收集查找后发现在Centos7中iptab ...
- Linux(CentOS / RHEL 7) 防火墙
CentOS / RHEL 7 防火墙 Table of Contents 1. 简述 2. 常用基本操作 2.1. 查看防火墙状态 2.2. 开启防火墙 2.3. 关闭防火墙 2.4. 开机自动启动 ...
- CentOS 6和CentOS 7防火墙的关闭
CentOS6.5查看防火墙的状态: 1 [linuxidc@localhost ~]$service iptable status 显示结果: 1 2 3 4 5 [linuxidc@localho ...
- [转]CentOS 6和CentOS 7防火墙的关闭
CentOS6.5查看防火墙的状态: 1 [linuxidc@localhost ~]$service iptable status 显示结果: 1 2 3 4 5 [linuxidc@local ...
- CentOS中防火墙相关的命令(CentOS7中演示)
CentOS中防火墙程序主要是firewall和iptables,CentOS7中firewall服务已经默认安装好了,而iptables服务需要自己用yum install iptabes-se ...
- centos6和centos7防火墙的关闭
CentOS6.5查看防火墙的状态: [zh@localhost ~]$service iptable status 显示结果: [zh@localhost ~]$service iptable st ...
随机推荐
- CSS类选择器
CSS 选择器参考手册 还是 .class #id element 用的最多! 在 CSS 中,选择器是一种模式,用于选择需要添加样式的元素. "CSS" 列指 ...
- 未能找出类型或命名空间名称“T” 问题的解决方案
在已经引用“using System.Collections.Generic;”时,还是提示急未能找出类型或命名空间名称“T”的问题.
- HDOJ 4259 Double Dealing
找每一位的循环节.求lcm Double Dealing Time Limit: 50000/20000 MS (Java/Others) Memory Limit: 32768/32768 K ...
- 怎样用fiddler2捕获移动设备上的http或者https请求
调试移动设备上的问题.看不到发送的请求和得到的响应是比較难过的,fiddler能够实现样的功能. 原理: 在PC上启动fiddler.将手持设备的网络代理改成fiddler. 这样全部的请求和响应都经 ...
- 演练:我的第一个 WPF 桌面应用程序 https://docs.microsoft.com/zh-cn/dotnet/framework/wpf/getting-started/walkthrough-my-first-wpf-desktop-application
这篇文章演示如何开发简单的 Windows Presentation Foundation (WPF) 应用程序包括元素所共有的大多数 WPF 应用程序: 可扩展应用程序标记语言 (XAML) 标记. ...
- Cacti监控Redis实现过程
Cacti是一套基于PHP,MySQL,SNMP及RRDTool开发的网络流量监測图形分析工具.被广泛的用于对server的运维监控中,Cacti提供了一种插件式的管理.仅仅要按要求写好特定的模板,那 ...
- 分布式数据库DDM Sidecar模式负载均衡
简介 1.分布式数据库中间件 DDM 分布式数据库中间件(Distributed Database Middleware)是解决数据库容量.性能瓶颈和分布式扩展问题的中间件服务,提供分库分表.读写分离 ...
- 扩展AutoCompleteTextView让其默认显示一组列表。setThreshold
很多时候, 在做自动下拉框时,默认点上去时需要显示一组默认的下拉数据.但是默认的AutoCompleteTextView是实现不了的, 因为setThreshold方法最小值是1,就算你设的值为0,也 ...
- python cmd 启动python项目报错:no module named “xxx”
场景:使用pycharm编辑器启动pyhon项目时可以启动,但使用cmd启动时,会报:no module named “xxx”的错误,此时,有两种情况: 1.no module named “xxx ...
- luogu3942将军令
https://www.zybuluo.com/ysner/note/1302132 题面 在大小为\(n\)的树上选择尽量少的点,使得所有未选择的点距离选择了的点小于等于\(k\). \(n\leq ...