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 httpd
service, 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 ...
随机推荐
- bzoj1444 有趣的游戏(AC自动机+概率dp)
题意: 给定n个长度为l的模式串,现在要用前m个大写字母生成一个随机串,每个字符有自己的出现几率,第一次出现的字符串获胜,求最终每个字符串的获胜几率. 分析: 容易想到先把所有的字符串建成一个AC自动 ...
- Oldboy 基于Linux的C/C++自动化开发---MYSQL
http://www.eimhe.com/forum.php?mod=viewthread&tid=142952#lastpost http://www.eimhe.com/thread-14 ...
- SAS编程基础 - 逻辑库和数据集
1. SAS逻辑库 1.1 创建SAS逻辑库: libname lb 'F:\Data_Model'; libname是关键字,lb是创建的逻辑库的名称,引号内的内容是目录路径,最后一个分号结束程序语 ...
- vue assetsPublicPath
vue 中 /config/index.js, assetsPublicPath 的作用是便于访问打包后的静态资源,默认是相对于根 /, 当然如果直接把dist文件夹当成根来配置域名 可以什么都不用 ...
- 我怎么在AD里面找到已经改名的Administrator账户?
近期有博友问我一个问题,他是一个企业里面的IT管理员,他非常苦恼.他是一个新手,之前管理员交接的时候,没有交接更改的管理员username和password.他如今不知道哪个才是系统之前内置的admi ...
- nodejs v8引擎c++编译版本号升级教程
原GCC版本号:4.4.7. 目标:升级GCC到4.8.2.以支持C++11. yum install gcc-c++ 获取GCC 4.8.2包:wget http://gcc.skazkaforyo ...
- node+express+mysql小例子
连接:https://www.cnblogs.com/humaotegong/p/5671009.html https://www.cnblogs.com/mibear/p/nodejs.html?u ...
- 加入收藏BUG改善
<script type="text/javascript"> function add_favorite(a, title, url) { url = url || ...
- 免安装版TOMCAT配置及问题解决方法
前言 本文将介绍下面几点内容: 1.Tomcat的配置过程 2.启动startup过程中遇到的问题的解决 3.假设遇到本文中没有提到的问题怎样解决 配置 计算机右击->属性->高级系统设置 ...
- 【bzoj2748】[HAOI2012]音量调节
设F[i][j]表示在第i首歌曲结束后,音量能否刚好为j 转移:F[i][j]=F[i][j-C[i]] or F[i][j+C[i]] 初始化:F[0][beginlevel]=true 最后在所有 ...