Adding a Port Range to Windows XP Firewall

Started by Bulau, January 19, 2011, 11:10:28 AM

Previous topic - Next topic

Bulau

I notice in the Help, that it says:
QuoteUnfortunately the Windows XP firewall doesn't support port range exceptions, so just setup an exception for the first 5 (or so) ports in the range you need (2300-2400 or 2302-2400, depending on FS2002 or FS2004/FSX).  Fortunately, Flight Simulator tends to use the first few ports when it uses that range, so you can usually get by with just adding a few of them.

Which is true, however, I found a script and edited it to add the hundred or so port exceptions for the 2302-2400 range

FOR /L %I IN (2302,1,2400) DO netsh firewall add portopening UDP %I "FSHost"%I

Running that from a cmd window will add the port exceptions from 2302-2400 to the Windows Firewall, and name them "FSHost####", where "####" is a number from 2302 to 2400. Takes about a second or two for each one, but in a few minutes, it's done.

me1900

Hi i sorry to reply to an old topic but I am curious how would we put it into a bat files to add all the ranges to the firewall?