防火墙centos7执行 service iptables status报错问题完美解决
在centos7 执行防火墙命令时 service iptables status 报错如下:

解决方案 :
1.systemctl start firewalld.service(开启防火墙)
2.systemctl stop firewalld.service(关闭防火墙)
3.service firewalld restart(从启防火墙)
4.firewall-cmd --zone=public --add-port=4400-4600/udp --permanen(指定端口范围为4400-4600通过防火墙)
Warning: ALREADY_ENABLED: 3306:tcp(说明3306端口通过成功)
5.firewall-cmd --zone=public --remove-port=80/tcp --permanent(关闭指定端口)
6.firewall-cmd --zone=public --list-ports(查看通过的端口)
7.查看防火墙状态 :firewall-cmd --state
8.修改mysql密码:SET PASSWORD = PASSWORD('123456');
9.flush privileges;
10.grant all privileges on *.* to 'root'@'%' identified by'test1234';(将所root用户的所有ip 以密码为test1234登录)
11.flush privileges
从方案中可以看出,centos 7 并不是我以为的 service iptables status这个命令
记得关注我哈!
————————————————
原文链接:https://blog.csdn.net/qq_40084534/article/details/82928401
防火墙centos7执行 service iptables status报错问题完美解决的更多相关文章
- CentOS7 执行 service iptables save 报错 The service command supports only basic LSB actions xxxxxx
现象描述 在 CentOS 7.6.1810 下执行 service iptables save 命令,出现如下错误: [root@test ~]# service iptables save The ...
- 3.centos 7执行service iptables save报错问题
1.报错 [root@localhost ~]# service iptables save The service command supports only basic LSB actions ( ...
- 解决 service iptables save 报错 please try to use systemctl
本文档根据 service iptables save 报错 please try to use systemctl 提供解决方案.报错 [root@Jaking ~]# service iptabl ...
- Eclipse中引入com.sun.image.codec.jpeg包报错的完美解决办法
转: Eclipse中引入com.sun.image.codec.jpeg包报错的完美解决办法 更新时间:2018年02月14日 17:13:03 投稿:wdc 我要评论 Java开发中 ...
- centos7 service iptables save 报错
解决办法: 1.systemctl stop firewalld 2.yum install iptables-services 3.systemctl restart iptables 4.ser ...
- shell执行${var:m:n}报错Bad substitution解决办法
Ubuntu系统下,执行字符串截取脚本时,总是报错:Bad substitution,脚本非常简单如下: #!/bin/sh str1="hello world!" :} 执行后报 ...
- Dev C++编写C/C++程序 出现[Error] ld returned 1 exit status报错分析及解决
debug系列第一弹,不知道大家写程序的时候是不是都遇到过如题的报错. 我本人是经常遇到这行熟悉的令人不知所措的报错,可能是我太笨了 有时候百度无果也差不到原因,那就汇总一下目前我遇到的情况吧--持续 ...
- 最新cenos执行service httpd restart 报错Failed to restart httpd.service: Unit not found.
原来是需要将Apache注册到Linux服务里面啊!注册Apache到Linux服务在Linux下用源代码方式编译安装完Apache后,启动关闭Apache可以通过如下命令实现: /usr/local ...
- 【mybatis】mybatis执行一个update方法,返回值为1,但是数据库中数据并未更新,粘贴sql语句直接在数据库执行,等待好久报错:Lock wait timeout exceeded; try restarting transaction
今天使用mybatis和jpa的过程中,发现这样一个问题: mybatis执行一个update方法,返回值为1,但是数据库中数据并未更新,粘贴sql语句直接在数据库执行,等待好久报错:Lock wai ...
随机推荐
- (转)阿里 RocketMQ 安装与简介
原文:阿里 RocketMQ 安装与简介 一.简介 官方简介: l RocketMQ是一款分布式.队列模型的消息中间件,具有以下特点: l 能够保证严格的消息顺序 l 提供丰富的消息拉取模式 l ...
- element的表单校验自动定位到该位置
遇到的项目问题是在每个折叠面板里边都有不同的表单,用element上的校验时,若有没填写的表单或不符合表单格式的要求,则自动展开该折叠面板,且页面定位到没校验成功的表单 this.$refs.fo ...
- react-native自定义Modal模态框|仿ios、微信弹窗RN版
前序 纵观每个优质项目,无论web端还是native原生应用开发,弹窗都是不可忽视的一环,能很大程度上直接决定用户体验.如:微信.支付宝.ios都有很成熟的一套弹窗UI展示场景. 最近一直沉迷在rea ...
- IDEA 运行后乱码问题解决
页面乱码: 在edit configurations->vm options 添加 -Dfile.encoding=UTF-8 调整idea文件编码格式,全部为 UTF-8 (file -> ...
- sshd 启动后 出现:Could not load host key: /etc/ssh/ssh_host_rsa_key
今天在启动sshd时,出现了如下问题,导致客户端不能成功连接服务端,不能建立ssh连接: 有两个提示 Could not load host key: /etc/ssh/ssh_host_rsa_ke ...
- 打包Python文件为exe
pip install pyinstaller 然后就在终端里执行命令 cd 到目标文件的目录下 执行 pyinstaller -F ***.py 即可生成exe
- linux驱动——cmdline原理及利用【转】
转自:https://blog.csdn.net/qingzhuyuxian/article/details/82895416 最近安卓项目中想要获取内核cmdline特定的启动参数,因为我们在他的U ...
- 图像处理&计算机视觉中upscale,downscale的翻译理解
最近在看SAN网络(Second-order Attention Network for Single Image Super-Resolution)的论文,其中的Upscale module理解的不 ...
- layUI学习第三日:layUI模块化开发
layui 定义为「经典模块化」,具备早前 AMD 的影子,又并非受限于 CommonJS 的那些条条框框, BootStrap 的不同在于:layui 糅合了自身对经典模块化的理解. 除了 layu ...
- C语言验证哥德巴赫猜想
#include<stdio.h>int f(int x);int main(void){ int n,i; scanf("%d",&n); for( ...