Skip to content

Avian Bone Syndrome

An exercise in futility by Daniele Nicolucci

Menu
  • About ABS
Menu

Speed up connections to IRC servers

Posted on 2010-07-192010-08-17 by Daniele Nicolucci

I have recently gone back to IRC — specifically Freenode — and among the delicious problems of the old days, such as the inability to easily establish DCC transfers (more on that later), I have been presented with the inevitable ident check delay during the connection to server. Ident is essentially a protocol that lets the server know what user is effectively connecting from the client machine. It can be very handy, but most people are behind NAT and/or do not run any ident daemon. This translates to a delay while the server patiently waits for an ident reply before giving up and adding a tilde to the username in the hostmask, which effectively means “this user claims to be called foobar, but I could not verify it.” In practice, this doesn’t change anything at all.

The ident check timeout depends on how the IRC server is configured. Freenode takes a very conservative approach, using a timeout of 15 seconds. This is what happens:
[08:43:08] --- Looking up irc.freenode.net..
[08:43:08] --- Connecting to chat.freenode.net (2001:6b0:e:2018::172) port 6667..
[08:43:08] --- Connected. Now logging in..
[08:43:08] --- *** Looking up your hostname...
[08:43:08] --- *** Checking Ident
[08:43:08] --- *** Couldn't look up your hostname
[08:43:23] --- *** No Ident response
[08:43:23] --- Welcome to the freenode Internet Relay Chat Network Jollino
...etc...

Not exactly the fastest thing. The problem here is not that I lack an ident daemon; it’s that my router filters all ports by default. A filtered port is neither open or closed, so a remote party trying to connect to it is left waiting indefinitely. After all, the lack of an immediate response might be due to a congested network. Indeed, when I tried connecting to port 113 (ident) from a remote shell, here is what happened:
[cyclops]$ time telnet 151.64.126.29 113
Trying 151.64.126.29...
telnet: Unable to connect to remote host: Connection timed out

real 0m21.003s
user 0m0.000s
sys 0m0.000s

Linux’s telnet in this case seems to have a timeout of 21 seconds. Freenode’s IRC deamon waits 15. It’s still too much. Compare to what happens with a closed port:
[cyclops]$ time telnet 151.64.126.29 6870
Trying 151.64.126.29...
telnet: Unable to connect to remote host: Connection refused

real 0m0.266s
user 0m0.000s
sys 0m0.004s

Much better, isn’t it? The solution is straightforward: unfiltering port 113. My router however only does that by forwarding a port to an internal machine (that is, I have to selectively pierce the NAT so that incoming connections to port X are forwarded to internal machine a.b.c.d on port Y — X and Y can be the same, of course). Is that a problem? Not really, but the recipient machine has to be active, otherwise you will incur into another connection timeout and you’re back to square one. Interestingly enough, it turns out that my router is perfectly fine with redirecting ports to itself, so I simply had connections to (external) port 113 to port 113 on itself. Here is the result from the shell:
[cyclops]$ time telnet 151.64.126.29 113
Trying 151.64.126.29...
telnet: Unable to connect to remote host: Connection refused

real 0m0.234s
user 0m0.000s
sys 0m0.000s

And here is how it works when connecting to IRC:
[10:59:03] --- Looking up irc.freenode.net..
[10:59:03] --- Connecting to chat.freenode.net (2001:6b0:5:1688::10) port 6667..
[10:59:03] --- Connected. Now logging in..
[10:59:03] --- *** Looking up your hostname...
[10:59:04] --- *** Checking Ident
[10:59:04] --- *** Couldn't look up your hostname
[10:59:04] --- *** No Ident response
[10:59:04] --- Jollino already in use. Retrying with Jollino_..
[10:59:04] --- Welcome to the freenode Internet Relay Chat Network Jollino_
...etc...

Much better, isn’t it?

As for DCC, the situation is more complex. The protocol works with the recipient connecting to the sender, so opening up specific ports on the router (and redirecting them to the machine where the IRC client is running) and telling the client to use such ports should work. That’s how I used to work it around years ago. However, it’s not working anymore. I can connect to myself from a remote shell, but the actual recipient won’t. In this time and age, though, it‘s much faster to just upload things to Dropbox and share the link, so I’m not going to investigate that further.

Post navigation

← The only problem with Blu-ray is BD-J
USB ports vs. cigarette lighters in cars →

5 thoughts on “Speed up connections to IRC servers”

  1. Martijn Dekker says:
    2010-08-27 at 18:11

    NAT has killed the peer-to-peer, everyone-is-equal internet as we used to know it. It’s really sad.

  2. pain says:
    2011-04-15 at 07:30

    man,
    im using 1 trivia eggdrop with same IRCD. do this make my server slow ?

  3. Daniele Nicolucci says:
    2011-04-19 at 13:44

    No, unless the server has very little RAM or a very slow CPU it won’t affect the speed.

  4. Tim says:
    2011-06-02 at 13:29

    Why do IRC servers even bother with the ident check anyway? Virtually no-one uses it, and it doesn’t mean anything anyway.

  5. Daniele Nicolucci says:
    2011-06-02 at 13:34

    Well, back in the day IRC was born it was meaningful, as you would normally come out of a shared box with your own actual user account. Nowadays it’s pretty much pointless and most newer IRC daemons allow you to skip ident check entirely as to not waste resources on the server, but some big networks keep up with the tradition because a “properly configured client” (ie. one that provides an ident reply) is less likely to be a spambot. In fact, some networks have stricter I-lines for clients without ident.

Comments are closed.

Written by a human

All text in this blog was written the old-fashioned way, without going through an AI / LLM. Any typos, mistakes and inconsistencies are proudly mine.

If you like this…

Did you enjoy reading this post without ads? If so, you may consider supporting this blog via Ko-fi!

Where was that?

Time travel

  • June 2026 (1)
  • May 2026 (1)
  • April 2026 (1)
  • November 2022 (1)
  • March 2022 (1)
  • December 2021 (1)
  • October 2020 (1)
  • August 2020 (1)
  • May 2020 (1)
  • March 2020 (3)
  • February 2020 (1)
  • April 2019 (1)
  • March 2016 (1)
  • July 2015 (1)
  • May 2015 (3)
  • April 2015 (2)
  • November 2014 (1)
  • August 2014 (2)
  • September 2013 (2)
  • April 2013 (1)
  • March 2013 (1)
  • October 2012 (1)
  • June 2012 (1)
  • March 2012 (1)
  • December 2011 (1)
  • November 2011 (3)
  • October 2011 (2)
  • July 2011 (1)
  • April 2011 (1)
  • January 2011 (1)
  • December 2010 (2)
  • November 2010 (1)
  • October 2010 (3)
  • September 2010 (16)
  • August 2010 (12)
  • July 2010 (10)
  • June 2010 (1)
  • May 2010 (7)
  • April 2010 (3)

Categories

  • Business (2)
  • Culture (13)
  • Electronics (4)
  • Huh? (1)
  • iOS (4)
  • Linguistics (11)
  • Music (8)
  • Personal (5)
  • Photography (10)
  • Podcast (5)
  • Science (7)
  • Society (28)
  • Technology (50)
  • Travel (2)
  • Tutorials (13)
  • TV (7)
  • Video games (6)

Tags

1984 (3) absp (3) apple (11) bluray (3) camera (4) communication (3) coronavirus (5) covid19 (5) culture (4) death (3) dream theater (4) ebooks (5) english (4) facebook (3) ios (8) ipad (4) iphone (10) iphone os (4) italian (3) italy (6) james labrie (3) jordan rudess (3) language (6) languages (3) linguistics (6) lockdown (5) mac (6) memories (3) mike portnoy (3) opus (4) orwell (3) os x (6) personal (4) photography (10) podcast (6) projects (3) rant (4) reading (4) spanish (3) the big bang theory (3) tutorial (12) tv (5) twitter (3) video games (6) work (3)
© 2026 Avian Bone Syndrome | Powered by Minimalist Blog WordPress Theme
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
SettingsAccept
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT