Port Redirect when connection refused?

These are old archives. They are kept for historic purposes only.
Post Reply
pete212
Posts: 80
Joined: Mon Jul 12, 2004 1:56 am

Port Redirect when connection refused?

Post by pete212 »

I've been told that the server give the client a
* Unable to connect (Connection refused)
when the port is being used too much at once.. is there a way to get the server to redirect the client to a diffrent port instead of giving a
* Unable to connect (Connection refused)
?
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight »

Nope :P . "Connection refused" is handled by the operating system - IRCd doesn't ever get a chance to see it (though MSDN says there are things called "conditional accepts"...) .

As to redirecting, just set up multiple ports, and put a note in your MOTD what ports you have available to clients for IRCing, that way they can try other ports if one is being a problem :) .
Syzop
UnrealIRCd head coder
Posts: 2179
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post by Syzop »

Did you actually experience it? (which OS? what system specs cpu&memory]? how many users? when did it happen? just curious...)
Anyway, yes, it could happen when a lot of connects are coming in and the ircd is unable to accept them fast enough.
There's a "backlog" (kind of incomming connections queue) that is set by default to 5 because some OS's might have problems with higher values.
This is an actual ./Config question on *NIX, if you are using Linux or FreeBSD then you should be safe to increase this quite a bit (eg: to 20, 50).
For windows it seems unspecified, making it also default to 5 (due to LISTEN_SIZE never being specified anywhere), perhaps that could be increased a bit... (see include/config.h, the LISTEN_SIZE define).

Oh and.. in case of an actual attack this might not help much if your ircd is too 'slow' to catch up. But otherwise, for being able to deal with peaks.. it will certainly help.
pete212
Posts: 80
Joined: Mon Jul 12, 2004 1:56 am

Post by pete212 »

Windows 2000 Advanced Server, its a 800 mhz 512 ram and about 200 users.. and i think if i play with the LISTEN_SIZE it just might fix this problem.. :D
Post Reply