防火墙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 ...
随机推荐
- RabbitMQ与Spring的框架整合之Spring Boot实战
1.RabbitMQ与Spring的框架整合之Spring Boot实战. 首先创建maven项目的RabbitMQ的消息生产者rabbitmq-springboot-provider项目,配置pom ...
- Swoole中内置Http服务器
创建httpServer.php文件,代码如下: <?php // 创建服务对象 $http = new swoole_http_server("10.211.55.17", ...
- docker redis使用
启动方式一:docker默认启动redis 1.拉取镜像 docker pull redis:lastest (若不使用版本号,如docker pull redis,默认拉取最新镜像) 2.启动red ...
- AI-Web1靶机渗透
先上一张图: 靶机信息及地址:https://www.vulnhub.com/entry/ai-web-1,353/ 下载到靶机后,在VMware里打开,kali使用arp-scan -l 扫到 在浏 ...
- angluarjs实现过滤并替换关键字
html样式 <body ng-app="myapp" ng-controller="myCtrl"> <input type="t ...
- [转]Java虚拟机类加载机制
原文地址:http://blog.csdn.net/u013256816/article/details/50829596 看到这个题目,很多人会觉得我写我的java代码,至于类,JVM爱怎么加载就怎 ...
- 前端三剑客之-html
web服务本质 import socket def main(): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind ...
- Jedis Unexpected end of stream & java.net.SocketException: Broken pipe问题解决思路
笔者一直维护的稳定基础服务测试环境不稳定了,这能忍!盘他,虽然不一定能完全盘的了. 背景: hrexternal 基础服务对外提供公司员工获取的多个接口,很多接口访问频率比较高,加了缓存,使用的是re ...
- 201871010113-刘兴瑞《面向对象程序设计(java)》第八周学习总结
项目 内容 这个作业属于哪个课程 <任课教师博客主页链接> https://www.cnblogs.com/nwnu-daizh/ 这个作业的要求在哪里 <作业链接地址>htt ...
- ajax给全局变量设置值,请先关掉异步上传效果
$.ajax({ type: 'POST', url: "/downloadExcelInfo", timeout: 0, async: false, contentType: & ...