When using a Japanese VPS server, using Windows Remote Desktop Connection is almost universally accepted. By default, the Windows RDP port is 3389, a well-known port, making it a popular target for hacker attacks and brute force attacks. Many users have noticed a constant stream of login attempts from unfamiliar IP addresses, with login logs filled with failed password attempts. This is often due to the default RDP port not being changed. For security reasons, changing the default RDP port is a necessary and effective protective measure. Japanese VPS users, in particular, often need to open their remote desktop connections to the global internet, posing a higher risk. Therefore, promptly changing the port not only reduces the likelihood of attack but also reduces invalid scanning traffic, improving overall system security.
Before making any changes, it's important to understand that changing the port doesn't guarantee absolute security; it simply reduces the likelihood of being scanned. Hackers prioritize port 3389 when scanning IP addresses. If the port has been changed, scanners will have a harder time finding the true entry point, thus reducing unnecessary brute force attacks. However, this doesn't replace measures like strong passwords, regularly updating system patches, and using a firewall.
The most direct way to change the RDP port is through the Registry Editor. First, log in remotely to your Japan VPS server. Once you're on the desktop, press the Win+R key combination, enter
regedit
, and then press Enter to enter the Registry Editor. Then, expand the following path:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
On the right, find the key named PortNumber. This stores the default RDP port number, 3389. Double-click it, change the value type to decimal, and enter the new port number you want to set, such as 58889 or 3390. Click OK to save the change.
After modifying the registry, ensure that an inbound rule is set in Windows Firewall to allow the new port. Otherwise, even if the port change is successful, you won't be able to connect again via Remote Desktop. To do this, open the Advanced Firewall settings, find Inbound Rules, add a new rule, select Port as the Type, enter the new port number, allow the connection, and save the rule. This ensures that the Remote Desktop service can be accessed normally on the new port.
After configuring the firewall rules, to avoid connection interruptions and subsequent login failures, it's recommended not to immediately close the current Remote Desktop session. Instead, open a new Remote Desktop client on your local computer and test the connection by entering the server IP and the changed port number. In the client, enter the port number using the "IP:port number" format, for example:
192.168.1.10:58889
If you can successfully connect and log in normally, the port change has taken effect. Closing the session using the old port will not affect subsequent use.
Some users may experience connection failures when changing the port number. There are several possible reasons for this. First, the port number you entered is already in use by the system or another application. Windows itself uses some common ports. If a user mistakenly uses these ports, conflicts may occur, preventing the Remote Desktop service from listening properly. Second, the firewall rules may not be configured correctly. Especially on cloud servers, it's also important to check whether the cloud service provider's security group configuration allows access to the new port. If not, external access will remain unavailable. Third, the service may not be restarted after the port change. On some operating systems, changing the port number requires restarting the Remote Desktop Services service, or even the entire server, for the new configuration to take effect.
To further enhance security while changing the port number, you can also incorporate other protective measures. For example, on your Japan VPS, configure a firewall policy to only allow access to the Remote Desktop port from specific IP ranges. This way, even if someone knows the port number, they can't log in from unauthorized IP addresses. Additionally, you can use third-party tools or cloud vendor-provided protection services to enable brute force attack defense or intelligent blocking. This multi-layered approach can significantly reduce the risk of remote desktop attacks.
When choosing a new port number, it's best to avoid overly common ports, such as 21, 22, or 8080. While 3389 is the most obvious target, other common ports are also frequently scanned, so choosing a higher, less guessable port number is more secure. Also, for easy memorization, write down your port number or store it in a secure password manager to avoid being unable to log in remotely due to forgetting it.
In summary, the process of changing the default RDP port on a Japanese VPS server is divided into several steps: entering the registry to modify the PortNumber key value, changing the firewall rules to allow the new port, testing the remote connection of the new port, and stopping the old session after confirming that it is correct.