Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

The last time I stepped into the GUI to block a 'intrusion-attempting' IP I mucked up my remote access due to a misclick. Would like to avoid that again.

Looking for either a direct-from-cmd command or powershell script that will block all incoming attempts from a given IP.

thx

share|improve this question

2 Answers 2

up vote 2 down vote accepted

In newer version of Windows (Server 2012 R2 or Windows 8+) you should use Powershell as netsh is deprecated:

http://technet.microsoft.com/en-us/library/hh831755.aspx

share|improve this answer

try "netsh advfirewall firewall". The displayed help-text will fill you up with what you are looking for.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.