ICQ prior to ICQ2000 (which uses the AIM protocol) uses UDP with the
server, this is for all the keepalive messages, status, offline messages,
and all that. By default ICQ will open direct TCP connections with people
on the first event (read message) with that person, then it will keep that
connection open for the rest of the session (until one of the two involved
signs off.)
So ICQ opens up a port to listen on (usually a random port between like
4000 and 10000 or something, there are exact numbers that the official
clients use, but I forget them, some linux clients will let you choose
what range you want to set it to. ) I'm not sure how this works out behind
NAT without special rules, usually I suspect it doesn't. Plain old
messages will almost always work, they can resort to sending through the
server, or usually if someone else sends you a message it will be sent
through the server, if you initiate the session you can usually connect ok
to them as that is an outbound connection, which is just like a web
browser or any other internet thing that you would use. The things that
don't work reliably are file transfers, and ICQ chat, and those things
that absolutely require a direct connection.
ICQ 2000 and AIM BTW use an all TCP connection to the server, and send all
messages through the server. File transfer in both cases still requires a
direct connection. AIM file transfer in case anyone is curious uses HTTP.
-Dan
On Tue, 22 May 2001, Bob Miller wrote:
> Rob Hudson wrote:
>
> > If more than one person is on ICQ behind the firewall, how does the
> > firewall know which message goes to who?
>
> Each TCP connection (ICQ or anything else) has a host IP address and a
> port number (1 to 65535). The NAT gateway remembers how to translate
> between port numbers on the outside and host+port pairs on the inside.
>
> Same thing happens if two people are browsing the same web site.
>
> (Feel free to laugh at me if ICQ doesn't use TCP.)
>
>