Hi...
I'm trying to get the Macintosh net-game Avara working through IP
Masquerading. I've figured out the problem using a sniffer, and I'm not
sure what the solution should be. Here's the way the game works:
Lets assume a 3 player game. We have a host and two clients. The
masqueraded box will be one of the clients (call it client1). The masq
box we'll call masq.
client1:xxxxx --> host:19567
Client connects to udp port 19567. It has a source address
assigned by macos (like IN_ADDR_ANY, I guess... it usually starts
around 32860, and goes up from there each game)
At this point, Masquerading has established a mapping for the
tuple (client1,xxxxx,host,19567) to a new port (masq:61102 in the
sniff I have) So, the server thinks we're sending on port 61102,
and can communicate properly.
host:19567 --> masq:61102 --> client1:xxxxx
in this packet, I'm assuming the host tells us who else is in the
game, and on which ports. Lets assume it tells us client2:yyyyy
[assumption here: the host must also be telling client2 the same thing
about us... so this next packet is my guess - obviously I don't have a
sniff of it]
host:19567 --> client2:yyyyy
host tells client2 that masq exists, and is sending on port
61102.
client1:xxxxx --> client2:yyyyy
Local machine contacts the other client, creating the tuple
(client1,xxxxx, client2,yyyyy) and mapping it to masq:61103.
client2:yyyyy --> masq:61102
client2 tries to contact client1, based on what the host told it.
masq isn't expecting this tuple.
masq:61102 --> client2:yyyyy ICMP Port Unrch.
>From then on, the local machine can't see any other players besides the
host. What we need to do is to force IP Masquerading to not masquerade
the port... client1 needs to be able to send and receive on the same udp
port to different hosts. The way I see it is this:
client1:xxxxx --> host:19567
this can be treated like the control connection for ipautofw.
Whenever the masq box sees a connection to 19567, it should masq
client1:xxxxx to masq:61zzz, and keep a note of it. From then on, (for
some timeout) any packet from client1:xxxxx -> *:* should get masqed to
masq:61zzz.
It seems to me that this is slightly too complicated to do with the normal
IP Masq tools (ipfwadm, ipportfw, ipautofw) but writing a module would be
overkill. All the example modules have to know information about the
packet format, whereas I don't think we need to know the packet formats
for this game.
I'm a fairly competent programmer, and I've done kernel work before, so if
writing the module is the only option, I'm going to try to do that. I'd
just like some feedback from the more experienced people about whether
that is the only choice or not.
Thanks,
Scott Lipcon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For daily digest info, email [EMAIL PROTECTED]