Windows firewall blocks remote desktop with custom port

To open custom port in Windows Firewall, you can do the following:

  1. In your Windows Firewall in Control Panel, click on the Advanced Settings option on the left.
  2. In the Windows Firewall with Advanced Security window that opens, click on the Inbound Rules on the left.
  3. Click on the New Rule on the right side of the window.
  4. Select Port on the list of options.
  5. Select TCP (or UDP if that is what you require) and Specific local ports, and then write your ports in the text box to the right of Specific local ports (i.e. 1234).
  6. Select Allow the connection in the next window.
  7. Select the options which you need from Domain, Private, Public (private and public are the network types that you select when you connect to the new network, and windows asks you to select the network type, and domain is obviously your domain).
  8. Finally, write a Name and Description in the window that shows next. Click FINISH.

Your port should be now allowed through the Windows Firewall.


If you changed the RDP listening port you will need to create a custom Windows firewall rule to listen on that port.

Create a firewall rule for new port:

  • Open Windows Firewall with Advanced Security
    1. Create a new rule
    2. Select "Inbound Rules" on the top left
    3. Right-click and select "New Rule…"
    4. A new "Inbound Rule Wizard" window opens
    5. Select "Program"
    6. click Next
    7. Select “This program path:”
    8. Type System in the text field
    9. Click Next
    10. Select “Allow the connection”
    11. Click Next
    12. Choose the profiles that the rule is for
    13. Click Next
    14. Name the new rule
    15. I would use something like “RDP3390” or whatever the new port number is
    16. Click "Finish"
    17. Test your port by going to www.whatsmyip.org and use their port scanner. You should be able to turn the rule off and off the scan fail.