/* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! */
Gregory Leblanc wrote:
>
> > -----Original Message-----
> [snip]
> > Here's an example: The server's internal address is 192.168.0.1, and
> > the external interface is, say, 222.222.222.222. There are two
> > masqeraded machines: 192.168.0.100 and 192.168.0.101. If I send a UDP
> > packet from 192.168.0.100 to 222.222.222.222, I would expect
> > the source
> > address to be translated to 222.222.222.222, but it's not.
>
> How do you know that it's not? And if it isn't masq'ed to that, then what
> does the IP show up as?
Tcpdump. The packet does not appear to be modified at all. It shows up
as 192.168.0.100.
>
> > This might seem trivial, but it has an effect on some games, such as
> > Starcraft, which prevents two computers behind the same
> > masqerade server
> > from joining the same internet game.
>
> This one there isn't an easy fix to, AFAIK. You would have to look at what
> the packets that the game sends, and write a specific module for it, since
> starcraft uses it's own unique connection protocol. If microsoft had done a
> good job writing DirectX, it would be possible to have multiple "Direct
> Play" games behind the server, but as it is, I don't think it's possible at
> all.
This is the only problem that impedes Starcraft, at long as it's the
latest version of the game and LooseUDP is enabled. (Starcraft works
fine, as long as two computers behind the same masqerade server are not
in the same Starcraft game.) The problem is that the Battle.net server
tells the the clients the addresses and ports of all the other players
in the game, and then the game proceeds with client to client
communication. If one client (192.168.0.100) sees a packet with a
source address of 192.168.0.101, it will reject it, because the server
has told the client that 222.222.222.222 is the correct address for that
player. (Since 192.168.0.101 is sending packets to 222.222.222.222, the
source address ought to be translated.)
Maybe this will be clearer:
Machine A connects to Battle.net, and sends a UDP packet:
192.168.0.100:6112->111.111.111.111:6112
This is translated to:
222.222.222.222:65000->111.111.111.111:6112
(This creates a port forwarding entry automatically, if I understand
LooseUDP correctly: 65000->192.168.0.100:6112)
Machine B connects to Battle.net, and sends:
192.168.0.101:6112->111.111.111.111:6112
(Translated to 222.222.222.222:65001->111.111.111.111:6112)
Now if they both join the same game, the server reports the members of
the game as:
222.222.222.222:65000
222.222.222.222:65001
(plus whoever else is in the game)
This is all good so far. Now, the game starts, and Machine A tries to
send a packet to Machine B:
192.168.0.100:6112->222.222.222.222:65001
This gets translated to:
192.168.0.100:6112->192.168.0.101:6112
This is where things go wrong. Machine B sees the packet, but notices
it's not from the address of anyone in the game. It ignores the
packet. That's bad. Instead, the packet should have been translated
to:
222.222.222.222:65000->192.168.0.101:6112
With that one change, everything should work fine.
Hope this made some sense. It's not very easy to explain. Anyway, this
seems like a bug to me. Am I missing something?
-Mark
--
Mark Baysinger
[EMAIL PROTECTED]
_______________________________________________
Masq maillist - [EMAIL PROTECTED]
Admin requests can be handled at http://www.indyramp.com/masq-list/ -- THIS INCLUDES
UNSUBSCRIBING!
or email to [EMAIL PROTECTED]
PLEASE read the HOWTO and search the archives before posting.
You can start your search at http://www.indyramp.com/masq/
Please keep general linux/unix/pc/internet questions off the list.