Port forwarding in Windows Server allows you to redirect incoming network traffic from one port to another. It is useful when you need to access specific services or applications through different ports.
In Windows Server 2019, you can configure port forwarding using Command Prompt (CMD) or Windows Firewall with Advanced Security. Before setting up a forwarding rule, make sure the destination port is open and allowed through your Windows VPS firewall.
In this guide, we’ll show you how to configure port forwarding in Windows Server 2019 step by step using both the command line and the graphical interface.
Note:
Since Windows Defender Firewall has not had any major changes in its core configuration, the methods in this guide apply to the most recent Windows versions, including Windows Server 2019–2025, Windows 10, and Windows 11.
Forward Port in Windows Firewall
To configure port forwarding in Windows Server, you’ll need to use Windows Defender Firewall with Advanced Security to allow incoming connections and Command Prompt (CMD) to create the forwarding rule. Windows does not provide a built-in graphical interface for configuring port forwarding, so you’ll need to use the netsh command-line utility to redirect traffic to the desired IP address and port.
To open the firewall, search for Windows Defender in the Start menu and open Windows Defender with Advanced Security.

Create New Rule in Windows Firewall
On the left sidebar, click on Inbound Rules, then head over to the right sidebar and click “New Rule” to create a new inbound rule.

Note:
If you want to control outgoing traffic instead of incoming connections, you should create an outbound rule in Windows Defender Firewall rather than an inbound rule.
Choose Firewall Rule Type
On the first page, choose the port as rule type; this allows you to create an apply rule for a specific port or service.

Specify the Protocol & Port Number
Specify the traffic type (TCP, UDP, or both) for the port you want to forward. Then select the specified local port and write your desired port number there. If you want to apply this rule to more than one port, just write the other ones there too and separate with a comma ,. Here, as an example, we’ve used port 3340.

Select Firewall Rule Action
On this page, you can tell the rule what to do with connections coming to this port; here, we will just select Allow the connection.

Specify the profiles to apply the rule
Here on this page, you can specify the profile you want to apply the rule to; it is better to check all of them to apply the rule to all the connection profiles, including public, private, and domain, or, if you want, you can select only the one you want.

Specify a name and description for the firewall rule
Add a name and description for the rule to help you identify it later. Click “Finish” to create the rule and get it over with.

Forward a Port Using Netsh
After creating the inbound rule in Windows Defender Firewall, you can configure port forwarding using netsh a command in CMD. This allows you to redirect incoming TCP connections from a specific local port to another IP address and port.
First, run CMD as administrator. Search for cmd in the Windows Start menu and right-click it, then select Run as administrator.
Enable the IP Helper Service
Windows uses the IP Helper service to support Port Proxy, so open Run by pressing Win + R then type services.msc, Find IP Helper, and make sure its start type is set to automatic and the service is running.

Create Port Forwarding Rule
Run the following command by replacing example values with your actual configurations.
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=8080 connectaddress=192.168.1.100 connectport=80listenaddress: The local IP address that receives incoming connections. Use0.0.0.0to listen for all connections.listenport: The incoming port you want to forward.connectaddress: The destination IP address. To return the connection to the Windows server itself, use the loopback IP127.0.0.1or enter your Windows VPS public IP address.connectport: The destination port you want to forward to.
For example, this command forwards incoming TCP connections on port 8080 to port 80 on 192.168.1.100.
Verify Port Forwarding on Windows
To check whether the rule was created successfully, execute:
netsh interface portproxy show allAddress Port Address Port
--------------- ---------- --------------- ----------
0.0.0.0 8080 192.168.1.100 80You can also test the port using PowerShell by running the command below:
Test-NetConnection YOUR_PUBLIC_IP -Port 8080TcpTestSucceeded : TrueImportant:
Make sure the destination server is reachable, and its firewall allows incoming connections on the destination port. Also, netsh interface portproxy supports TCP forwarding only, not UDP.
Summary
Forwarding ports on a Windows server lets you redirect incoming and outgoing traffic to other remote servers or the local network.
In this guide, we’ve walked through forwarding a port to another port on Windows, since Windows Server and Windows client versions like Windows 10 don’t provide a graphical interface for forwarding ports. We’ve created a new firewall rule and forwarded the connection coming to the desired port to another port using netsh utility in CMD.

