@rem Real Machine側の受信port設定 set WIP=0.0.0.0 set WPT=22 @rem VM Machine側への転送port設定 set LIP=192.168.x.y set LPT=22 @rem netsh 設定 netsh interface portproxy add v4tov4 listenport=%WPT% listenaddress=%WIP% connectport=%LPT% connectaddress=%LIP% protocol=tcpこれで、[外部PC] --> [22][RealMachin]--> [22][VM] のPort Forwardになる。
> netsh interface portproxy show all尚、削除する場合は以下のようなバッチで
@rem Real Machine側の受信port設定 set WIP=0.0.0.0 set WPT=22 @rem netsh 設定 netsh interface portproxy delete v4tov4 listenport=%WPT% listenaddress=%WIP% protocol=tcp