Troubleshooting
    rdp
    remote-desktop
    windows
    server
    vps

    Secure RDP with Custom Port & Firewall Setup Guide

    How to Set Up an RDP Custom Port and Configure the Firewall Setting up a custom Remote Desktop Protocol (RDP) port and configuring your firewall are...

    AlgoVPS Team11/18/20253 min read

    How to Set Up an RDP Custom Port and Configure the Firewall

    Setting up a custom Remote Desktop Protocol (RDP) port and configuring your firewall are crucial steps for enhancing the Security of your VPS hosting environment. Follow this comprehensive guide to adjust your RDP settings and ensure your firewall is correctly configured.

    Step 1: Access Windows Defender Firewall

    1. Open Windows Defender Firewall: Begin by searching for Windows Defender Firewall in the Windows Start menu. This tool will allow you to manage your firewall settings and ensure that your VPS is protected against unauthorized access.

    Step 2: Modify the RDP Port

    1. Open the Registry Editor: Press Win + R to open the Run dialog box, type regedit, and press Enter.

    2. Navigate to the RDP Port Key: In the Registry Editor, locate the following registry key:

      HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
      
    3. Edit the Port Number: Double-click on the PortNumber entry. Select Decimal and enter your new port number, ensuring it is not in use by another service and is outside the range of common ports (between 49152 and 65535 is recommended).

    4. Save Changes: Click 'OK' and close the Registry Editor.

    Step 3: Update Firewall Rules

    1. Add a New Inbound Rule: In the Windows Defender Firewall window, click on Advanced settings. Select Inbound Rules on the left pane, then click New Rule.
    2. Select Rule Type: Choose Port and click Next.
    3. Specify Port and Protocol: Select TCP and enter your new RDP port number in the Specific local ports field. Click Next.
    4. Allow the Connection: Choose Allow the connection and click Next.
    5. Specify When the Rule Applies: Select the appropriate network profiles (Domain, Private, Public) where the rule should apply, then click Next.
    6. Name the Rule: Provide a name, such as "Custom RDP Port", and click Finish.

    Step 4: Test the Configuration

    1. Restart the Remote Desktop Services: Go to Services via the Windows Start menu and restart the Remote Desktop Services to apply the changes.
    2. Verify Connection: Attempt to connect to your VPS using the new RDP port to ensure everything is configured correctly.

    Conclusion

    By following these steps, you have now set up a custom RDP port and configured your firewall to enhance the security of your VPS. Regularly reviewing and updating your security settings is recommended to keep your VPS hosting environment secure.

    Note: Remember to update any firewall configurations on your local network to allow traffic on the new RDP port.

    For further assistance, please refer to our support page or contact our helpdesk.

    Was this article helpful?