Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I think there is command with netsh .... But not sure about the exact command.

share|improve this question
up vote 2 down vote accepted

You can do something like this in Windows 2003 or newer OS's to add a policy, a filter list, and an entry to that filter list:

netsh ipsec static add policy name="Prevent TELNET Servers" description="Prevents running TELNET servers"
netsh ipsec static add filter filterlist="My filter list" srcaddr=any srcport=0 dstaddr=me dstport=23 protocol=tcp mirrored=yes

You can use "dstmask" and "srcmask" to specify ranges of IP addresses. Bear in mind that you'll have to actually assign that policy if you want it to do anything.

Some background on using NETSH and IPSEC is available at Microsoft at:

On XP machines you'll use the IPSECCMD.EXE utility, available from the Windows 2000 resource kit.

share|improve this answer

Your Answer


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.