### ポートフォワーディングを設定する 管理者権限で以下のコマンドを実行する。 ``` netsh interface portproxy add v4tov4 listenaddress=<転送元(ホストOS)のipアドレス> listenport=<転送元ポート> connectaddress=<転送先ipアドレス> connectport=<転送先ポート> ``` **注意事項**:ポートフォワーディングの実用ケースでは、ファイアウォールの設定も追加で必用な場合が多いです。参考情報: https://gunmagisgeek.com/blog/other/7171 ### ポートフォワーディングの設定を確認する ``` netsh interface portproxy show all ``` ### ポートフォワーディングを削除する ``` netsh interface portproxy delete v4tov4 listenaddress=<転送元(ホストOS)のipアドレス> listenport=<転送元ポート> ``` ## 参考情報 - [Microsoft Learn: Netsh interface portproxy コマンド](https://learn.microsoft.com/ja-jp/windows-server/networking/technologies/netsh/netsh-interface-portproxy) - https://arubeh.com/archives/1749 - https://gunmagisgeek.com/blog/other/7171