From dd742856b5f8c781da5b672db51c457fe5f3c1a0 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 24 Jan 2012 23:20:59 -0500 Subject: [PATCH] Add local IRC server post. --- posts/Local_IRC_server.mdwn | 81 +++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 posts/Local_IRC_server.mdwn diff --git a/posts/Local_IRC_server.mdwn b/posts/Local_IRC_server.mdwn new file mode 100644 index 0000000..58ebb38 --- /dev/null +++ b/posts/Local_IRC_server.mdwn @@ -0,0 +1,81 @@ +Tonight I've been looking into ways to set up a local chat system for +students in one of my courses. My initial thought was to use the +NetKit `talk` at `talkd` programs, but I couldn't find an active +homepage. Maybe they are so mature that noone needs to touch the +code, but I expect they are actually just quietly dying in the corners +of assorted harddrives, without any users to love them. + +Since part of the goal of my course is to get the students up to speed +on common open source development tools, my next thought was to go +with a local [IRC][] server. I know that there many wonderful public +IRC servers (e.g. [freenode][]), but why use a free service when you +can run the service locally? Anyhow, here's my setup. + +Local IRC server +================ + +There seem to be a number of these out there. I chose [ngIRCd][], +because it's packaged for Gentoo (`net-irc/ngircd`), and it seems to +be both cleanly coded and actively maintained (in [[Git]] ☺). +Installation was a simple: + + # emerge -av ngircd + # emacs /etc/ngircd/ngircd.conf + # cat /etc/ngircd/ngircd.conf + [Global] + Name = irc.example.com + AdminInfo1 = John Doe + AdminInfo2 = 123 Street Rd. + AdminEMail = jdoe@example.com + Info = bla bla bla + ServerGID = nogroup + ServerUID = ngircd + [Options] + PAM = no + # /etc/init.d/ngircd restart + +I didn't add `ngircd` to the default runlevel. I'll just start it by +hand whenever I want to use it. + +Local connections +================= + +Using the excellent [irssi][] client (`net-irc/irssi` on Gentoo): + + $ irssi -c localhost + +When you specify a server on the command line with `-c server`, +`irssi` won't connect to any other servers for which you've configured +automatic connection. In my case, this is what I want. + +Exposing the IRC server on a remote host +======================================== + +Alright, I've got an IRC server running on my laptop, but I'm behind a +firewall. I can expose my IRC server to the students by forwarding +the IRC port to our department server, where the students all have +shell accounts. + + $ ssh -R localhost:6667:localhost:6667 physics.uni.edu + +If someone else is already using port 6667 on the department server, +it's easy to use another one: + + $ ssh -R localhost:6668:localhost:6667 physics.uni.edu + +Students can then connect by [[SSHing|SSH]] into the department server +and running `irssi` there: + + student@home $ ssh physics.uni.edu + student@physics $ irssi -c localhost -p 6668 + +And that's all there is too it! An easy way to introduce people to a +popular tool. + +[IRC]: http://en.wikipedia.org/wiki/Internet_Relay_Chat +[freenode]: http://freenode.net/ +[ngIRCd]: http://ngircd.barton.de/ +[irssi]: http://irssi.org/ + +[[!tag tags/web]] +[[!tag tags/tools]] -- 2.26.2