CentOS 开启 端口转发
2018-09-24T15:58:30
#防火墙版端口转发 ##查看 端口转发列表 firewall-cmd --list-forward
开启端口转发
firewall-cmd --permanent --add-masquerade ##添加端口转发 firewall-cmd --add-forward-port=port=7301:proto=tcp:toaddr=192.168.0.198:toport=22 firewall-cmd --add-forward-port=port=7302:proto=tcp:toaddr=192.168.0.198:toport=1812
firewall-cmd --add-forward-port=port=7401:proto=tcp:toaddr=192.168.0.202:toport=22 firewall-cmd --add-forward-port=port=7402:proto=tcp:toaddr=192.168.0.202:toport=3306
firewall-cmd --add-forward-port=port=7501:proto=tcp:toaddr=192.168.0.96:toport=22 firewall-cmd --add-forward-port=port=80:proto=tcp:toaddr=192.168.0.96:toport=80 firewall-cmd --add-forward-port=port=443:proto=tcp:toaddr=192.168.0.96:toport=443
firewall-cmd --add-forward-port=port=7601:proto=tcp:toaddr=192.168.0.6:toport=22
firewall-cmd --add-forward-port=port=7701:proto=tcp:toaddr=192.168.0.191:toport=22