Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to modify the default remote port number of Windows

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to modify the default remote port number of Windows. It is very detailed and has some reference value. If you are interested, you must finish reading it.

Background #

Requirements: modify Windows default remote port number and add firewall rules

Operating systems: windows 7, 8, 10 Windows Server 2003, 2008, 2008 R2, 2012, 2012 R2, 2016

Implementation step #

Locate the registry, [HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Terminal Server\ Wds\ rdpwd\ Tds\ tcp], modify the value of PortNumber on the right, select decimal, and change the default 3389 port number to another desired port number (1-65535), such as 55399.

Locate the registry again, [HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentContro1Set\ Control\ Tenninal Server\ WinStations\ RDP-Tcp], modify the value of PortNumber on the right, select the decimal, and change the port number to the same port number for appeal. The port number of the two modifications should be the same.

Add a firewall inbound rule, release the set port number, and turn off the default port 3389 remote rule

Take effect after restarting the "Remote Desktop Services" service or restarting the computer.

Bat batch # @ echo offcolor 02echo modifies remote Desktop port 3389 (supports Windows 2003, 2008, 2008 R2, 2012, 2012 R2, 7, 8, 10) Windwos 7 and above, please run as administrator) echo.echo automatically add firewall rule echo% date%% time%echo.set / p c = Please enter a new port: if "% c%" = "goto end:goto edit:: editnetsh advfirewall firewall add rule name=" Remote PortNumber "dir=in action=allow protocol=TCP localport="% c% "reg add" HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Terminal Server\ Wds\ rdpwd\ Tds\ tcp "/ v" PortNumber "/ t REG_DWORD / d"% c% "/ freg add" HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Terminal Server\ WinStations\ RDP-Tcp "/ v" PortNumber "/ t REG_DWORD / d"% c% "/ fnet stop TermServicenet start TermServiceecho.echo modified successfully! Failed to modify echo.pauseexit:endecho! Echo.pause above is all the content of the article "how to change the default remote port number of Windows". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report