# 允许防火墙伪装IP firewall-cmd --add-masquerade --permanent # 本服务器的8080端口转发到另外一台机器的80端口 firewall-cmd --add-forward-port=port=8080:proto=tcp:toaddr=192.168.0.100:toport=80 --permanent # 删除规则 # firewall-cmd --remove-forward-port=port=8080:proto=tcp:toaddr=192.168.0.100:toport=80 --permanent # 查看规则 firewall-cmd --list-forward-ports # 生效 firewall-cmd --reload