Can I change TCP/IP Filetering from batch file?

B

Brett Chapman

Does anyone know if there is a way from the command line
or from and API to change the TCP/IP Filtering settings?
Ideally, I would like to open/close ports on an as needed
basis.
 
T

Tim Rains [MSFT]

Hi Brett. Thank-you for your post.

I believe that the filter settings for the "advanced TCP/IP filters" are
kept in the registry. So you should be able to manipulate them
programmatically one way or another. The drawback to using this approach
is that when you make changes to these filters, the system always has to be
rebooted before the changes take affect.

I recommend using IPSec filters instead. Changes to these filters can be
made via a script and changes take affect without rebooting the system.

These article will help you do this:

813878 How to Block Specific Network Protocols and Ports by Using IPSec
http://support.microsoft.com/?id=813878

I hope that helps.

Tim Rains
Product Support Services
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top