Authorizing an IP Address in Windows Firewall

Posted:  May 14th, 2016

 

In some situations, you will need to temporarily or permanently change remote access to your server from an IP address (for example, KEKhost/KEKhosting’s support team IP address) in your Windows firewall. These instructions apply Windows Server 2016, 2012, 2008 R2, 2008, and 2003.

 

Add a rule in Windows firewall

 

1) Connect to your server using Remote Desktop.

 

2) Click simultaneously on the Windows logo + R to open the “Run” dialog and execute the “cmd” command.

 

3) Execute the following command:

 

      Note: Replace "RDesktop-KEK" by the name of your choice and 3389 by the new remote access port (Remote Desktop) if the serveur uses a non-default port.

 

        netsh advfirewall firewall add rule name="RDesktop-KEK" action=allow remoteip=209.172.32.36 protocol=TCP dir=in localport=3389

 

 

Suppress an existing rule from Windows firewall

 

If you want to suppress the rule you just created in the example above, execute this command:

 

Note: Replace "RDesktop-KEK" by the name of your choice

 

 

 

     netsh advfirewall firewall delete rule name ="RDesktop-KEK"

 

 

Related information:  https://www.kekhosting.com/dedicated-servers.html