安装失败:防火墙未打开,无法安装docker环境
Closed this issue · 1 comments
wzfukui commented
wzfukui commented
检查防火墙状态:
systemctl status firewalld
firewall-cmd --state
firewall-cmd --list-all
示例结果:
[root@iZj6ce5tnbjr6kx5xz180xZ ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: active (running) since Sun 2023-10-15 20:23:37 CST; 44min ago
Docs: man:firewalld(1)
Main PID: 2662 (firewalld)
Tasks: 2
Memory: 3.0M
CGroup: /system.slice/firewalld.service
└─2662 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid
[root@iZj6ce5tnbjr6kx5xz180xZ ~]# firewall-cmd --state
running
[root@iZj6ce5tnbjr6kx5xz180xZ ~]# firewall-cmd --state
running
[root@iZj6ce5tnbjr6kx5xz180xZ ~]# firewall-cmd --list-all
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.
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: dhcpv6-client ssh
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
解决方案:
systemctl start firewalld
systemctl enable firewalld