Chocolate Software Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Adding a Port Range to Windows XP Firewall  (Read 12939 times)


  • Newbie
  • *
  • Offline Offline
  • Posts: 4
Adding a Port Range to Windows XP Firewall
« on: January 19, 2011, 11:10:28 AM »

I notice in the Help, that it says:
Unfortunately 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

Code: [Select]
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.


  • Junior Member
  • **
  • Offline Offline
  • Posts: 10
Re: Adding a Port Range to Windows XP Firewall
« Reply #1 on: October 27, 2013, 01:05:03 PM »

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?
Pages: [1]   Go Up