jump to navigation

IRC chat from behind a firewall December 2, 2005

Posted by Carthik in guides, snippets, ubuntu.
trackback

Stuck at school/work behind a firewall which does not allow you to chat on IRC (Internet Relay Chat)? That happens to me all the time. But now, I still can chat at #ubuntu or wherever else I want on IRC networks, by using ssh port forwarding.

Essentials for doing this are:
1. A login at some ssh server — You can set up an ssh server at home, or use one provided by your hosting provider, or a geeky friend.

Now, to forward port 6667, which is the port used for connecting to IRC chat networks, you should execute the following command:

ssh -L 6667:irc.freenode.net:6667 example.com -p 8888 -l username

That commands reads in English as follows:
Open an ssh connection to example.com (replace with your ssh server URL), on port 8888 (replace with whatever port your ssh server uses, if it is the default port then leave out the “-p 8888” part), as the user “username” (the -l is a “minus ell”), forward the local port 6667 to the port 6667 on irc.freenode.net.

Now, fire up Xchat to connect to the IRC network, and then type “/server localhost” as it tries to connect. Cool, now you can connect to the IRC network even though youa re behind a firewall.

Digg this articleDigg This!

Comments»

1. Pascal Klein - December 2, 2005

Mhh. Might actually set up an ssh server for this. There’s been the odd lunchtime that I wouldn’t mind using Kubuntu livecd and irssi to chat…

Thanks for this. 🙂

2. Brian Oosterhouse - December 2, 2005

Very nice blog. Keep up the good work.

http://oosterhouse.wordpress.com/

3. David Russell - December 3, 2005

This might be a really stupid suggestion, but why not just use a web-based client configured to use port 80?

jazz - August 5, 2010

web based clients can be annoying especially if you’ve tricked out your own IRC client to do fancy things, like shortcuts to identify you at login, and so on. Or shorten those long URLs, or get me the wiki’s first entry, whatever. The web-based client can come in handy but gets old fast.

4. Slapshot - December 4, 2005

towsonu2003, thank you for useful link! It’s actual for me.
In my work PC I can’t install any CHAT programs like Xchat or mirc.

5. Rob - December 7, 2005

thank you for useful link! It’s actual for me.
In my work PC I can’t install any CHAT programs like Xchat or mirc also.

6. Patricia Stanton - December 7, 2005

Very useful article, you know… I think it will be great to chat at work =).

7. Adam - December 7, 2005

The only problem with this is many schools/businesses who have a firewall that blocks ports like IRC will also block ports like SSH. This would be a perfect solution at my school, but the firewall is so restrictive I can’t even open an SSH connection through it.

8. Sencer - December 9, 2005

If ssh is available, personally I prefer the use of screen+irssi(+bitlbee). You can connect to the ssh-server, re-attach an older screen-session in which you have your irssi running. Fire up the away-log to see if you missed stuff. And then Bitlbee also allows you to use yahoo, jabber etc. via irssi.

9. incy wincy2k - January 24, 2006

also if your having problems with firewalls you might want to set your ssh to run on port 80 (http) or 443 (https) as most school / work firewalls will not hav that blocked

10. Wasim - September 3, 2006

Hi! i want to instal some programes and chat softwares on my work P.C but i cant as i dont have sufficiant rights, how can i do, please explain me in an e mail to me in very simple way.
Kind regards

11. John - July 24, 2007

Leave to it Ms Lohan

12. My Home - August 17, 2007

Thanks for sharing this information. Really is pack with new knowledge. Keep them coming.

13. Stefan Offermann - September 19, 2007

Works fine with putty for me. Another way would be to join a Jabber/XMPP-Server who supports IRC-Transport.

14. renzen - June 22, 2008

hey i tried this but the server asks for password.And i used the one we use to access net in college [we get net through a firewalled proxy ].But it is not accepting that password , nut it works for net.Any idea ???

15. Leonardo - June 22, 2008

Works like charm, thanks a lot! 🙂

@renzen.. you have to provide the password(and username) of the host your connecting to, the ones for “example.com”…

16. Leonardo - June 22, 2008

@renzen, sorry, I’ve misread your post before. So I don’t know what might be your problem :S

17. mc0r3 - July 1, 2008

the reason to this over a web client is for transparency’s sake. the same client setup can connect regardless of location, provided the tunnel is used in all locations, or a script is used to switch between them.

for restrictive firewalls, have the ssh server listen on 443. all modern firewalls allow this end port, because it would be stupid not to allow SSL connections. most firewalls refuse an SSL connection over a non standard SSL port eg. 80

cheers

18. eto vi mirka s mnogo dobra mreja - June 5, 2010
19. porno sikiş - September 27, 2010

The only problem with this is many schools/businesses who have a firewall that blocks ports like IRC will also block ports like SSH. This would be a perfect solution at my school, but the firewall is so restrictive I can’t even open an SSH connection through it.

20. sex sikiş - September 28, 2010

If ssh is available, personally I prefer the use of screen+irssi(+bitlbee). You can connect to the ssh-server, re-attach an older screen-session in which you have your irssi running. Fire up the away-log to see if you missed stuff. And then Bitlbee also allows you to use yahoo, jabber etc. via irssi.

21. men's christian louboutin shoes - August 14, 2011

My spouse and i were really contented when John could deal with his inquiry by way of the ideas he came across from your web site. It is now and again perplexing just to possibly be making a gift of methods which most people might have been trying to sell. So we see we now have the website owner to thank for that. These explanations you have made, the easy website navigation, the friendships you will help instill – it is most fabulous, and it is making our son in addition to us recognize that that subject is exciting, which is certainly truly serious. Thank you for all!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: