Skip to content

Instantly share code, notes, and snippets.

@gilangvperdana
Last active May 9, 2024 06:15
Show Gist options
  • Save gilangvperdana/7e05bb0f2737dc7ded96ac5e7fae6116 to your computer and use it in GitHub Desktop.
Save gilangvperdana/7e05bb0f2737dc7ded96ac5e7fae6116 to your computer and use it in GitHub Desktop.
Port Forwarding with Windows Server

General

If you want to port forwarding use windows server, you can use netsh command. for now it's compatible just for TCP (not UDP).

Show existing rule

netsh interface portproxy show all

Delete Existing Configuration

netsh interface portproxy delete v4tov4 listenport= listenaddress=

Add New Rule

netsh interface portproxy add v4tov4 listenport= listenaddress= connectport=22 connectaddress=

FYI

If you want to forward from 192.168.100.233 port 8080 to 192.168.100.248 port 22, follow this command.

netsh interface portproxy add v4tov4 listenport=8080 listenaddress=192.168.100.233 connectport=22 connectaddress=192.168.100.248

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment