The recent flurry of NAT and peer-to-peer gaming information rekindled my
interest in trying to get starcraft working through a masquerading host.
For those of you curious here are the problems I was having:

1) incredibly slow game when playing against more than 1 human opponent
   when you're not hosting the game.  When I say slow, I mean _SLOW_.  This
   goes beyond normal lag.
2) fine game when against any # of human opponents when you are hosting the
   game.
3) fine game against 1 human opponent no matter who hosts.
4) # of computer opponents doesn't matter.

If you've been having symptoms like that, then I may just have the solution
for you.  If your masquerading host is running a 2.1.* series kernel, check
out http://www.alumni.caltech.edu/~dank/peer-nat.html for a 2.1.130 kernel
patch.  If you're running 2.0.36, get
ftp://ftp.netcom.com/pub/mu/mumford/loose-udp-2.0.36.patch.gz
Another option for those 2.1.*'ers of you out there.  One of the most recent
Alan Cox 2.1 patches includes this stuff by default.  I think it is version
2.1.131ac11, but I'm not sure.

For starcraft to work, you will also need port forwarding in your kernel.
It comes standard in recent 2.1 series, but you have to get a patch for
2.0.36 from http://www.monmouth.demon.co.uk/ipsubs/portforwarding.html
This patch will apply almost cleanly to a 2.0.36 kernel that has been
patched with loose-udp.  The one patch that doesn't make it is a comment
in one of the source files, so it won't impact functionality.  Note that
auto-forwarding is not good enough, at least for me anyway.  I had to
compile in port-forwarding to get this to work.

Patch your kernel, run 'make oldconfig' or whatever, turn on the option
CONFIG_IP_MASQ_LOOSE_UDP in the network settings subsection (be sure to
have CONFIG_EXPERIMENTAL on as well).

When you have rebooted into your new kernel, turn on port forwarding with
commands such as the following:

(for 2.0.*)
ipportfw -A -t x.x.x.x/6112 -R y.y.y.y/6112
ipportfw -A -u x.x.x.x/6112 -R y.y.y.y/6112
(I can't remember where I got ipportfw originally, so you can grab it from
 my ftp directory if you need it)
(for 2.1.*)
ipmasqadm portfw -a -P tcp -L x.x.x.x 6112 -R y.y.y.y 6112
ipmasqadm portfw -a -P udp -L x.x.x.x 6112 -R y.y.y.y 6112

where x.x.x.x is the INTERNET address of the gateway host, and y.y.y.y is
the INTERNAL address of the host you play starcraft from.  Note that you
*cannot* play starcraft from two machines inside your network at the same
time... at least not with this setup.  A starcraft specific masquerading
module like the one for quake would be the only way to do that, AFAIK.

Some disclaimers:  I offer no guarrantees that it will work for you.  The
patch that I'm providing is not originally mine, and I only partially under-
stand it.  All I have done is take an existing 2.1 patch and backport it to
2.0.  It works for me.  If it doesn't work for you, there's not much I can
do in the way of fixing out your problem, but I'll certainly try.

Glenn Lamb - [EMAIL PROTECTED]  Finger for my PGP Key.
Email to me must have my address in either the To: or Cc: field.  All other
mail will be bounced automatically as spam.
PGPprint = E3 0F DE CC 94 72 D1 1A  2D 2E A9 08 6B A0 CD 82

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For daily digest info, email [EMAIL PROTECTED]

Reply via email to