在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报错问题完美解决的更多相关文章

  1. 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 ...

  2. 3.centos 7执行service iptables save报错问题

    1.报错 [root@localhost ~]# service iptables save The service command supports only basic LSB actions ( ...

  3. 解决 service iptables save 报错 please try to use systemctl

    本文档根据 service iptables save 报错 please try to use systemctl 提供解决方案.报错 [root@Jaking ~]# service iptabl ...

  4. Eclipse中引入com.sun.image.codec.jpeg包报错的完美解决办法

    转: Eclipse中引入com.sun.image.codec.jpeg包报错的完美解决办法  更新时间:2018年02月14日 17:13:03   投稿:wdc   我要评论   Java开发中 ...

  5. centos7 service iptables save 报错

    解决办法: 1.systemctl stop firewalld 2.yum install iptables-services 3.systemctl  restart iptables 4.ser ...

  6. shell执行${var:m:n}报错Bad substitution解决办法

    Ubuntu系统下,执行字符串截取脚本时,总是报错:Bad substitution,脚本非常简单如下: #!/bin/sh str1="hello world!" :} 执行后报 ...

  7. Dev C++编写C/C++程序 出现[Error] ld returned 1 exit status报错分析及解决

    debug系列第一弹,不知道大家写程序的时候是不是都遇到过如题的报错. 我本人是经常遇到这行熟悉的令人不知所措的报错,可能是我太笨了 有时候百度无果也差不到原因,那就汇总一下目前我遇到的情况吧--持续 ...

  8. 最新cenos执行service httpd restart 报错Failed to restart httpd.service: Unit not found.

    原来是需要将Apache注册到Linux服务里面啊!注册Apache到Linux服务在Linux下用源代码方式编译安装完Apache后,启动关闭Apache可以通过如下命令实现: /usr/local ...

  9. 【mybatis】mybatis执行一个update方法,返回值为1,但是数据库中数据并未更新,粘贴sql语句直接在数据库执行,等待好久报错:Lock wait timeout exceeded; try restarting transaction

    今天使用mybatis和jpa的过程中,发现这样一个问题: mybatis执行一个update方法,返回值为1,但是数据库中数据并未更新,粘贴sql语句直接在数据库执行,等待好久报错:Lock wai ...

随机推荐

  1. (转)理解滑动平均(exponential moving average)

    转自:理解滑动平均(exponential moving average) 1. 用滑动平均估计局部均值 滑动平均(exponential moving average),或者叫做指数加权平均(exp ...

  2. docker容器的学习笔记

    目录 Docker入门学习笔记(一) 1. 什么是Docker? 2. Docke的目标 3. Docker通常应用场景 4. Docker的基本组成 补:Docker容器相关技术简介 安装Docke ...

  3. 关于vue-detools chorme创建安装完成,但是控制台不显示问题

    搜了一下发现挺多人遇到这个问题的,绝大多数的回答都是在main.js中添加下面代码 Vue.config.devtools = true; 但是发现并不行. 后来看到有人说刷新然后在按F12就好了,居 ...

  4. groupid公司名,artifactid模块名,version版本

  5. MongoDB学习笔记(二、MongoDB查询)

    目录: MongoDB数据类型 MongoDB新增语法 MongoDB查询语法 MongoDB查询选择器 MongoDB关联查询 MongoDB数据类型: MongoDB新增语法: 语法:db.col ...

  6. acwing 60. 礼物的最大价值

    地址 https://www.acwing.com/problem/content/56/ 在一个m×n的棋盘的每一格都放有一个礼物,每个礼物都有一定的价值(价值大于0). 你可以从棋盘的左上角开始拿 ...

  7. CF53E Dead Ends

    CF53E Dead Ends 洛谷评测传送门 题目描述 Life in Bertown has become hard. The city has too many roads and the go ...

  8. nowcoder3274D binary

    题目链接 problem 给定一个01串s,定义rev(x)表示逐位翻转(0变1,1变0)x后并删去前导零后所得到的串.好的串定义如下: s是好的串 如果x是好的串,则rev(x)也是好的串 如果a, ...

  9. Codeforces Round #602 (Div. 2, based on Technocup 2020 Elimination Round 3) F2. Wrong Answer on test 233 (Hard Version) dp 数学

    F2. Wrong Answer on test 233 (Hard Version) Your program fails again. This time it gets "Wrong ...

  10. Educational Codeforces Round 76 (Rated for Div. 2) C. Dominated Subarray 水题

    C. Dominated Subarray Let's call an array