我有一個專用伺服器並在其上安裝了 VMWare-Esxi 作為主要作業系統。
然後,我在 VMWare-Esxi 上新增了 4 個虛擬機器:
VM1 - Windows Server 2008 - Local IP 192.168.100.10
VM2 - Windows Server 2008 - Local IP 192.168.100.11
VM3 - Windows Server 2008 - Local IP 192.168.100.12
VM4 - Mikrotik Router 6.6 - Public IP 149.252.96.29 // definitely it's not my real IP :)
我想做的事?
我想在 Mikrotik 路由器上實現到本地虛擬機器的連接埠轉發,如下所示:
149.252.96.29:1573 ==轉發到=> 192.168.100.10:3389
149.252.96.29:1574 ==轉發到=> 192.168.100.11:3389
149.252.96.29:1575 ==轉發到=> 192.168.100.12:3389
主要問題:
主要問題是我不知道如何將具有本地IP的虛擬機器新增到Mikrotik路由器?
任何幫助將不勝感激。
答案1
您必須在這樣的選項卡上使用Dnat
操作:nat
firewall
/ip firewall nat add chain=dstnat dst-address=149.252.96.29 protocol=tcp dst-port=1573 action=dst-nat to-addresses=192.168.100.10 to-ports=3389
/ip firewall nat add chain=dstnat dst-address=149.252.96.29 protocol=tcp dst-port=1574 action=dst-nat to-addresses=192.168.100.11 to-ports=3389
/ip firewall nat add chain=dstnat dst-address=149.252.96.29 protocol=tcp dst-port=1575 action=dst-nat to-addresses=192.168.100.12 to-ports=3389
當然,您應該在 mikrotik 上擁有 192.168.100.x 範圍內的 IP 位址,以便能夠與伺服器聯繫。
-
如果您在 mikrotik 防火牆上有一些拒絕規則,這裡可能是允許這些連線通過的代碼:
/ip firewall filter add place-before=0 chain=forward protocol=tcp dst-port=3389 action=accept