How to Port Forward in Windows Server 2019?

Port forwarding on Windows involves two steps: creating a new firewall rule for the port and configuring port forwarding using CMD.
5 min read
Beginner
Port Forward in Windows Server 2019

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.

open windows defender firewall with advanced seuciryt

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.

add new inbound rule in windows defender

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.

select port in rule type windows defender

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.

enter port to create firwall rule for it in windows defender

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.

select firewall rule action in windows defender

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 the profiles to apply rule to

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.

specify name and description for firewall rule

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.

Check IP Helper service status on windows

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=80
  • listenaddress: The local IP address that receives incoming connections. Use 0.0.0.0 to 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 IP 127.0.0.1 or 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 all
OUTPUT
Address         Port        Address         Port
--------------- ----------  --------------- ----------
0.0.0.0         8080        192.168.1.100   80

You can also test the port using PowerShell by running the command below:

POWERSHELL
Test-NetConnection YOUR_PUBLIC_IP -Port 8080
OUTPUT
TcpTestSucceeded : True

Important:
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.

Share:

Was this article helpful?

Your feedback helps us improve our technical guides.

Related Posts

You May Also Like

Explore more tutorials, guides, or documentation, from VPSMakers.

Learn how to resize Windows partitions by shrinking and extending volumes using Disk Management and DiskPart utility to manage disk space.
Jacob Rafet
November 20, 2026
Open ports on Windows 10 and Windows Server using Windows Firewall or PowerShell. Allow TCP and UDP connections and verify firewall rules.
Robert Smith
November 19, 2026
Block ports in Windows using Firewall or PowerShell by creating inbound or outbound rules for specific ports and protocols.
Robert Smith
November 17, 2026
Blocking a port on MikroTik involves creating a new filter rule, specifying the protocol and port, and setting the action to drop.
Jacob Rafet
November 16, 2026