

Port 3340 should be specified as the RDP port number. Let us try to connect to this port from a remote computer using any RDP client. We can find out what process is listening on the specified port using its PID (in our example, the PID is 636): tasklist | findstr 636 To make port forwarding work on Windows Server 2003/XP, we must additionally set the IPEnableRouter parameter to 1 in the registry key HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters. IP forwarding may not work in cases where the iphlpsvc (IP Helper) service is not running or if IPv6 support is not enabled on the network interface for which the port forwarding rule is created. Now, use the netstat tool to check that Windows is now listening on local port 3340: netstat -ano | findstr :3340Ĭ:\Windows\system32>netstat -ano | findstr :3340 Replace IP_address with the current IP address of the server. Now, to create a port forwarding rule, run a command prompt as an administrator and run the following command: netsh interface portproxy add v4tov4 listenport=3340 listenaddress=IP_address connectport=3389 connectaddress=IP_address While using any other port, make sure that no other service or process listens on the local port number that we specified in listenport: netstat -na|find "3340"Īlternatively, we can also check that the port is not listening locally using the PowerShell cmdlet Test-NetConnection: Test-NetConnection -ComputerName localhost -Port 3340 connectport – is a TCP port to which the connection from listenport is forwarded to.Ī support request that we handled recently dealt with making RDP service to respond on a non-standard port – 3340.įirst, we redirected incoming traffic from TCP port 3340 to another local port – 3389 which is the default RDP port number.connectaddress – is a local or remote IP address (or DNS name) to which we want to redirect incoming connection.

listenport – local listening TCP port number (the connection is waiting on).listenaddress – is a local IP address to listen for incoming connection (useful if we have multiple NICs or multiple IP addresses on one interface).The command takes the following syntax: netsh interface portproxy add v4tov4 listenaddress=localaddress listenport=localport connectaddress=destaddress connectport=destport The details of the parameters in the command: We can configure port forwarding in Windows using the Portproxy mode of the Netsh command. Using a port forwarding rule, we can redirect an incoming TCP connection (IPv4 or IPv6) from the local TCP port to any other port number, or even to a port on a remote computer.
#Rdp from mac to windows custom port how to
How to Configure Port Forwarding on Windows using Netsh Portproxy? Let us today discuss the steps to configure port forwarding on windows using netsh. Webmasters can easily configure network port forwarding on Windows using netsh, without using any third-party tools.Īs a part of our Server Management Services, we help our Customers with Windows related requests regularly.
