使用命令行输入firewall-cmd --list-ports时提示Authorization failed.
[lighthouse@VM-8-7-centos ~]$ firewall-cmd --list-ports
You're performing an operation over default zone ('public'),
but your connections/interfaces are in zone 'docker' (see --get-active-zones)
You most likely need to use --zone=docker option.Authorization failed.
Make sure polkit agent is running or run the application as superuser.
意思是是授权失败,是权限问题导致的,在命令前加上sudo
[lighthouse@VM-8-7-centos ~]$ sudo firewall-cmd --list-ports
You're performing an operation over default zone ('public'),
but your connections/interfaces are in zone 'docker' (see --get-active-zones)
You most likely need to use --zone=docker option.20/tcp 21/tcp 22/tcp 80/tcp 443/tcp 8888/tcp 39000-40000/tcp 8080/tcp 3306/tcp 888/tcp
成功