mIRC Home    About    Download    Register    News    Help

Print Thread
DCC CHAT times out due to firewall #237442 04/05/12 11:39 PM
Joined: Dec 2002
Posts: 145
G
gemeau50 Offline OP
Vogon poet
OP Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
Hi,

When establishing a DCC CHAT connection without my firewall activated, the connection remains stable until I close it.

But when my firewall is on duty, the connection times out after a while, usually between 25 to 55 minutes.

I am using F-Secure Internet security.

Anyone has a clue as to why such connection would time out?

Tx in advance

Re: DCC CHAT times out due to firewall [Re: gemeau50] #237444 05/05/12 02:28 AM
Joined: Mar 2004
Posts: 526
HorseC Offline
Fjord artisan
Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
'the connection times out after a while, usually between 25 to 55 minutes.'

thats a long time for direct client to client chats..

are you connecting to another mIRC users, or a bot. If your connecting to a bot (for example eggdrop) the other side could be forcing the timeout..


Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Re: DCC CHAT times out due to firewall [Re: gemeau50] #237445 05/05/12 08:36 AM
Joined: Aug 2006
Posts: 167
P
pishposh Offline
Vogon poet
Offline
Vogon poet
P
Joined: Aug 2006
Posts: 167
gemeau50: do the connections which time out when your firewall is active involve continuous activity throughout those 25-55 minutes, or do they time out only after they have been idle for those 25-55 minutes?

Anyway, since you asked for an explanation, here it is. (This explanation assumes your problem is that timeouts happen after lengthy idling periods.)

IRC, DCC Chat, and most other internet connections use the TCP protocol.

But TCP connections are not "physical." With a TCP connection, when data isn't being sent in either direction, there is nothing else "there" to indicate that the connection still technically exists.

If you make a TCP connection and then stop sending data, it's like calling a phone number, listening to the person at the other end for a few seconds, and then being put on hold by him. Once you're put on hold, there's just silence, and you have no way to know if you're still truly connected -- except for the presumption that you are.

And that presumption is the basis of TCP connections. When a TCP connection is made, the two computers/clients at each end merely "agree" that the connection exists. When a TCP connection is closed, those two computers/clients conversely make a new agreement that the connection no longer exists. And that's basically all there is to it: the presumption of an agreement, or the presumption of no agreement.

The problem with this is that if one computer dies or loses power or loses its internet connection (and therefore can't participate in a future agreement that the connection no longer exists), the other side is "left waiting on hold" forever. It thinks the connection still exists.

Normally, if the TCP protocol itself had a pinging mechanism built-in, this wouldn't be a problem. But the TCP protocol does not have a built-in pinging mechanism.

That's why other protocols which use the TCP protocol -- like the IRC server protocol -- have their own pinging mechanisms.

Anyway, DCC Chat is a separate protocol from the IRC protocol, and it does not have a built-in pinging mechanism. So with a DCC Chat connection, there is no pinging involved at all (neither at the TCP protocol level, nor at the DCC Chat protocol level).

With all that in mind, every firewall continuously maintains a list (in memory) of every connection that currently exists, so it knows which connections were previously authorized (and thus which weren't). But because a firewall can't your softwares' minds, it has no way to tell the difference between a very idle authorized connection that still exists, and a very idle authorized connection that's technically become invalid/closed (because of the computer at the other end silently losing power or its internet connection etc.).

So most firewalls are engineered to remove (from their lists) any TCP connections which show no activity after x minutes/hours, on the presumption they have silently died. If your DCC Chat connections are dying after being idle for a very long time, this is probably what's happening to you.

If so, there are two possible solutions:

1) Review your firewall's settings carefully for anything which seems related to connection timeouts. For example, you might find a setting that says something like "presume a connection is inactive/dead if it is idle for more than [ 55] minutes." If you find a setting like that, you could adjust it so the firewall only assumes connections have died after 6-7 hours. Be careful not to set this too high though. If the firewall is forced to remember too many hours' (or days') worth of possibly-dead connections, it could consume lots of your computer's memory, especially if you do lots of P2P/torrenting.

2) You could write a mIRC script which, once per minute, sends a "(keep-alive ping: ignore)" message to every DCC Chat window that has been idle for more than 15 minutes. (The $chat(=$nick).idle identifier can be used to determine how long each DCC Chat window has been idle.) If you don't know how to do this, you'll have to ask for help in the scripts & popups section of the forum (and there's always the possibility that if your DCC Chat windows are to bots, they might react undesirably to receiving such messages).

Re: DCC CHAT times out due to firewall [Re: pishposh] #237460 06/05/12 04:19 PM
Joined: Dec 2002
Posts: 145
G
gemeau50 Offline OP
Vogon poet
OP Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
Tx for the insight. I simply switched firewall. It is fine now.

Tx again