netsh advfirewall firewall add rule name="Open Port 3389" dir=in action=allow protocol=TCP localport=3389 In order to block remote access to a particular service(say mssql, port 1433) from an ip 22.75.175.213 , use the following from command line. netsh advfirewall firewall add rule name="Block mssql attack ips" dir=in action=block protocol=TCP localport=1433 remoteip=22.75.175.213 Filed under: Windows
