Vcsa vcenter 防火墙配置
1.Vcenter配置
iptables -L -n
开放端口:
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:88
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:389
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:514
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:636
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:902
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:1514
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2012
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2014
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2015
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2016
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2020
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5480
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5580
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:6501
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:6502
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:7444
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:7475
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:7476
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8010
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8084
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9084
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9087
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9443
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:53
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:88
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:514
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:902
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:6500
vim /etc/systemd/scripts/iptables
iptables -A INPUT -s 10.10.10.8 -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -s 10.10.10.0/28 -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -s 172.16.3.0/29 -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -s 172.16.4.0/29 -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -s 10.10.10.0/28 -p tcp --dport 5480 -j ACCEPT
iptables -A INPUT -s 172.16.1.0/24 -p tcp --dport 53:9443 -j ACCEPT
iptables -A INPUT -s 172.16.1.0/24 -p udp --dport 53:6500 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
systemctl enable iptables
systemctl restart iptables
主机-配置-防火墙-vSphere Web Client
172.16.1.30, 10.10.10.0/28, 172.16.3.1/29
2.ESXi防火墙规则配置
Web控制台-选择一个主机-配置-防火墙-编辑-选择vSphere Web Client项-取消“允许从任何 IP 地址连接”,并在下面对话框中输入:172.16.1.30, 10.10.10.0/28,172.16.3.0/29
VMware vSphere所需要开放的端口
80 vCenter Server需要端口80用于直接HTTP连接。端口80会将请求重定向到HTTPS端口443。如果意外使用了http://server而不是https://server,此端口将非常有用。
389 此端口在vCenter Server的本地和所有远程实例上必须处于打开状态。这是vCenter Server组的目录服务的LDAP端口号。vCenter Server系统需要绑定端口389,即使没有将此 vCenter Server实例加入到链接模式组。如果此端口上正在运行另一服务,则最好移除该服务,或将其端口更改为其他端口。可以在从1025到65535的任一端口上运行LDAP服务。如果此实例充当Microsoft Windows活动目录,请将端口号从389 、更改为从 1025 到 65535 的任一可用端口。
443 vCenter Server系统用于侦听来自vSphere Client的连接的默认端口。要使vCenter Server从vSphere Client接收数据,请在防火墙中打开443端口。vCenter Server系统还使用端口443侦听从vSphere Web Access Client和其他SDK客户端传输的数据。如果对HTTPS使用另一个端口号,则登录vCenter Server系统时必须使用<ip-address>:<port>。
636 对于vCenter链接模式,这是本地实例的 SSL端口。如果此端口上正在运行另一服务,则最好移除该服务,或将其端口更改为其他端口。可以在从1025到65535的任一端口上运行 SSL服务。
902 vCenter Server系统用于将数据发送到受管主机的默认端口。受管主机也会通过UDP端口902定期向vCenter Server系统发送检测信号。服务器和主机之间或各个主机之间的防火墙不得阻止此端口。
902/903 不得在vSphere Client和主机之间阻塞端口902和903。这些端口由vSphere Client 使用以显示虚拟机控制台。
8080 Web服务HTTP。用于VMware VirtualCenter Management Webservices。
8443 Web服务HTTPS。用于VMware VirtualCenter Management Webservices。
60099 Web服务更改服务通知端口