0
votes

I wrote a C# program that adds IPs to the Windows Server 2008 Firewall rule to block them.

The command looks like this and is executed as description in the accepted answer from this thread here.

pushd advfirewall firewall
set rule name="BlockedIPs" new remoteip="1.2.3.4" action=block protocol=any dir=in
popd

However I'd also like to unblock them again. I have little experience with this. What's the command, please?

1

1 Answers

1
votes

This is probably more of a question for Server Fault. However, to answer your question, the command is called delete. Look here for a complete reference to all the firewall commands.

To delete a rule:

delete rule name="BlockedIPs"