Defcon1-Header
Tool-BarfreeBSD ArticlesSearch Our SiteHOMEfreeBSD LinksContribute to FreeBSD HelpFreeBSD FilesFreeBSD Script Corner

Using Direct X Through Your Firewall

Use: To Play DirectX games such as:

Microsoft Age of Empires, version 1.0
Microsoft Age of Empires Expansion: The Rise of Rome, version 1.0
Microsoft Age of Empires II: The Age of Kings, version 2.0
Microsoft Age of Empires II Expansion: The Conquerors
Microsoft CART Precision Racing, version 1.0
Microsoft Close Combat for Windows 1.0
Microsoft Close Combat: A Bridge Too Far, version 2.0
Microsoft Close Combat III: The Russian Front
Microsoft Combat Flight Simulator: WWII Europe Series, version 1.0
Microsoft Combat Flight Simulator 2: WWII Pacific Theater, version 1.0
Microsoft Flight Simulator 98
Microsoft Flight Simulator 2000
Microsoft Golf 1998 Edition, version 1.0
Microsoft Golf 1999 Edition
Microsoft Golf 2001 Edition
Microsoft Links LS 2000
Microsoft Links 2001
Microsoft MechCommander 2.0, version 1.0
Microsoft MechWarrior 4: Vengeance
Microsoft Midtown Madness 2, version 2.0
Microsoft Monster Truck Madness, version 1.0
Microsoft Monster Truck Madness 2, version 2.0
Microsoft Motocross Madness, version 1.0
Microsoft Motocross Madness 2, version 2.0
Microsoft StarLancer, version 1.0
Microsoft Urban Assault, version 1.0
Microsoft Zone.com
Microsoft Allegiance, version 1.0

1.Make sure you are running the latest DirectX it needs to be a newer version. (versions before 5.2a will not work)

Upon writing this Howto DirectX is into version 8.1 and that is what I use on my boxes. To figure out what version you are running

Click Start , and then click Run .

In the Open box, type dxdiag , and then click OK .

You will see the version on the front page of the application.

 

2.The problems with DirectX are that it needs several ports to flow information freely. Depending on what version of DirectX you are using these ports will vary. Here is a link directly to Microsofts page on DirectX ports http://support.microsoft.com/default.aspx?scid=kb;EN-US;q240429

 

3.As I said before the version I am using is 8.1, so here are the ports that we need to work with

 

Connection:              Client Configuration:     Host Configuration: 
Initial UDP Connection       6073 Outbound         6073 Inbound 
Subsequent UDP Inbound    2302-2400            2302-2400 
Subsequent UDP Outbound   2302-2400            2302-2400

4.Now also make sure your firewall has these ports open. There are many different ways to setup your firewall and I am, hoping you know how to open these ports if you don't already have them open. I am using the open configuration of the standard BSD 4.4 Firewall and adding these lines: (This may be different in your configuration)

#DirectX Problems

${fwcmd} add 60 allow tcp from any to any 6073

${fwcmd} add 61 allow tcp from any to any 2302-2400

${fwcmd} add 62 allow udp from any to any 2302-2400

 

5.I am assuming at this point that you already have setup natd and that you also have a line in rc.conf that looks something like this without the brackets (natd_flags="-f /etc/natd.cf"). The –f flag allows you to use a configuration file instead of putting all your natd flags on one line. (Mine is named natd.cf)

 

5.You will need to put these configuration parameters in the equivalent of your natd.cf file

 

#Some configuration Paramaters (You may or may not want these you can man #natd to find out)

same_ports

use_sockets

dynamic

 

#Direct X (192.168.0.2 needs to be the machine you are trying to play a #DirectX game on; man natd and look for redirect_port if you have more #questions)

redirect_port tcp 192.168.0.2:6073 6073

redirect_port tcp 192.168.0.2:2302-2400 2302-2400

redirect_port udp 192.168.0.2:2302-2400 2302-2400

6.After adding these lines to your natd.cf file, either reboot or run ( killall -9 natd && /sbin/natd -f /etc/natd.cf -n fxp0 ).

With any modifactions of the command for your system (i.e. fxp0 being my internet interface).

 

Now your DirectX box should be able to communicate with the outside world. If it doesn't here are some URL's that helped me wade through the problem:

 

http://support.microsoft.com/default.ahttp://support.microsoft.com/default.aspx?scid=kb;en-us;Q190900spx?scid=kb;EN-US;q240429

http://artho.com/age/faq.html

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q159031

© 1997 - 20013 Defcon1, www.defcon1.org , Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of www.defcon1.org and the content's original author.

Defcon1-Header2
Tool-Bar-2Defcon1  Webmail