Would you like to learn how to configure port forwarding using the NETSH command? In this tutorial, we are going to show you how to configure port forwarding using NETSH on a computer running Windows.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 2022
• Windows 10
• Windows 11

Equipment list

Here you can find the list of equipment used to create this tutorial.

This link will also show the software list used to create this tutorial.

Windows Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Windows.

Tutorial Windows - Configure Port Forwarding using NETSH

As an Administrator, start an elevated command line.

Windows - Elevated command prompt

Redirect the local port 8888 to a remote server on port 80.

Copy to Clipboard

Check the image for a better understanding.

WINDOWS - NETSH PORT FORWARD

Verify if the TCP port is listening.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Optionally, create a firewall rule allowing incoming connections on the TCP port.

Copy to Clipboard

Open a browser and try to access the local port 8888.

WINDOWS - NETSH PORT FORWARDING

List the configured port redirections.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Remove a specific port redirection configuration.

Copy to Clipboard

After finishing, clear all port redirection configurations.

Copy to Clipboard

You learned how to configure a TCP port redirection using NETSH.