【1.10】服务器安装 Linux 防火墙设置

https://www.digitalocean.com/community/tutorials/how-to-configure-the-linux-firewall-for-docker-swarm-on-centos-7
注意服务器需要防火墙开启端口,或者关闭防火墙

# 开放端口
firewall-cmd --add-port=2376/tcp --permanent
firewall-cmd --add-port=2377/tcp --permanent
firewall-cmd --add-port=7946/tcp --permanent
firewall-cmd --add-port=7946/udp --permanent
firewall-cmd --add-port=4789/udp --permanent
firewall-cmd --reload
systemctl restart docker
# 关闭防火墙
service iptables stop
chkconfig iptables off
service iptables status

systemctl stop firewalld
systemctl status firewalld

image.png

点波关注 系统搭建(docker)

你可能感兴趣的:(【1.10】服务器安装 Linux 防火墙设置)