LoginSignup
1
1

More than 5 years have passed since last update.

ポート転送

Last updated at Posted at 2017-03-27

ポート転送について、Linuxではiptablesで対応できるがWindowsで行う必要が出てきました。
具体的にはサーバのリプレイスを行うのに、とあるサービスのクライアントが送信先アドレスとポートを変えられないという…
なので旧サーバを中継にだけ使用し、サービスの処理は新サーバで行うという対応になりました。
その際に設定したポート転送の方法です。

設定方法

  • netshコマンドを使用
  • Windows8.1を使用(他のOSでも大丈夫だと思います)

1.ポート転送コマンド

>netsh interface portproxy add v4tov4 listenport=<1> listenaddr=<2> connectport=<3> connectaddress=<4>

<1>は中継PCの受信ポート番号
<2>は中継PCのIPアドレス
<3>は転送先ポート番号
<4>は転送先IPアドレス

2.確認コマンド

>netsh interface portproxy show all

3.削除コマンド

>netsh interface portproxy delete v4tov4 listenport=<1> listenaddr=<2>
1
1
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1