VMware其实建议了vCSA security的best practice:
the access to the vCSA should only be allowed from trusted hosts or virtual machines, and access to the remaining devices should be blocked. Also note that some 3rd party VMware backup products or vROPs, SRM etc. should be considered when blocking access to the vCSA.
vCSA默认是不log iptables的activity,如果你想看到iptables的log,你可以在vCSA的shell上运行下面的commands:
# iptables -N LOGGER # iptables -A LOGGER -j LOG –log-prefix ‘iptable log: ’ ‘ --log-level 7 # iptables -A OUTPUT -j LOGGER # iptables -I OUTPUT -j LOGGER # iptables -I INPUT -j LOGGER
然后你就可以通过下面的command来监控iptables 的log:
# journalctl -k |grep “iptable”
加固vCSA有多种措施,最简单有效的就是网络层的限制,也就是通过防火墙来限制.
vCSA自带一个简单的防火墙,调用的是iptables,可以通过vCSA IP:5480 来访问vCenter Server Appliance。
在firewall 里面只能简单的whitelist 或者blacklist ip or CIDR.
一个简单的策略就是在firewall 里面 白名单自己的堡垒机IP,管理IP,备份IP等等,然后通过SSH,登录root,在iptables 里面
直接ban掉80,443和5480端口,这样就相当于你的管理端口没有暴露在公网上.
下面是详细的iptables 规则:
iptables -N inbound-custom iptables -A inbound-custom -p tcp -m tcp --dport 80 -j DROP iptables -A inbound-custom -p tcp -m tcp --dport 443 -j DROP iptables -A inbound-custom -p tcp -m tcp --dport 5480 -j DROP iptables -A inbound-custom -j RETURN iptables -I INPUT 5 -j inbound-custom