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

I'm trying to fix up my friend's remote Windows Server 2003 R2 machine.

I have Remote Desktop access at the moment. However, I notice that Windows Firewall/Internet Connection Sharing service of the remote machine is disabled, which seems to be a bad idea. If I enable and start the service now, I may lose my Remote Desktop access in case the exception rule for Remode Desktop has not been defined in Windows Firewall.

So I need a way to inspect and modify exception rules even as the Windows Firewall/ICS service is stopped and disabled.

Does anybody know how?

share|improve this question

migrated from stackoverflow.com Feb 12 '11 at 4:49

This question came from our site for professional and enthusiast programmers.

1 Answer 1

You can use the netsh utility.

For example, I used this batch file to allow incoming connections on a specific port:

netsh routing ip nat add portmapping name="Internet" proto=TCP publicip=0.0.0.0 publicport=%1 privateip=127.0.0.1 privateport=%1

Note that the above command adds an Inbound Filter rule, which is not the same as Windows Firewall rules. It's an additional mechanism (part of Routing and Remote Access) to filter packets at a lower level.

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.