|
Installing ngIRCd on WRT54G
INSTALLING
an IRC Server
(Internet Relay Chat)
on your WRT54G,GS,GL
Version 0.9
October 4, 2011
Rusty Haddock/AE5AE
- WHAT THIS DOCUMENT IS NOT.
This document will attempt to describe how to install and
minimally configure an IRC server on a WRT54G, GS, & GL HSMM-MESH node.
This server program is called ngircd -- Next Generation
IRC daemon (or server). This document is written to get you
started and will require some effort on YOUR part. It is not
written for dummies -- just near dummies. You will need to know
how to edit plain text files on your mesh node with the 'vi'
editor.
This document will NOT even START to tell you how to
administer or control said server program because there are plenty
of help files and tutorials on the Internet. Hint: Google is your friend.
Second hint: http://www.irchelp.org
- WHAT IS AN IRC SERVER?
An Internet Relay Chat (IRC) Server is a program that facilitates
realtime, keyboard-to-keyboard chat sessions, not only between two people,
but between many people simulataneously. Conversations are
held in channels (which are synonymous with 'rooms') and new
channels can (usually) be created as needed by the users with the
/join command. The users make use of an IRC client program to
connect to an IRC server and make use of the channels available.
- WHY WOULD I WANT TO USE AN IRC SERVER?
An IRC server will permit simple text messaging between any users
of a mesh with an IRC client program. A multitude of client
software packages are available for just about any computer
system whether it be running a Windows, Unix/Linux, or Mac
operating system. These servers can be configured to connect
to IRC servers off mesh as well. Private messages can also be
sent from station to station or messages can be exchanged in a
chat room or channel with many people connected simultaneously.
Having a chat server running on a mesh node precludes the use
of an external server (say "off mesh", on the Internet) as well
as needing another PC to hang off a mesh node to act as a server.
That's one less piece (or pieces) of hardware to lug around to
an event, a gathering, or a club meeting.
Without IRC software the usual communications between hams on
an HSMM Mesh network entailed using a cellphone, an HT, or yelling
across a field. Voice over IP is a nice solution too but usually
requires more hardware like a digital telephone and some sort of
PBX or SIP server on the mesh.
Another use for IRC I have found is to make a server available
during a club meeting. Many attendees can connect to a channel
and post to a channel relevant text that's been mentioned during
the meeting. Now everyone on the channel has a unamibigious copy
of that URL or other information that was spoken or displayed
(e.g. street address, telephone number, directions to the local
bakery for donuts, etc). Those attending without a computer
or smartphone can be emailed the information with a simple cut
and paste. A log could be kept of the channel conversations
and posted on a website or emailed at a later time as well.
- WHAT CLIENT SOFTWARE DO I NEED TO USE AN IRC SERVER?
There is a plethora of client programs that will talk to an IRC
server. On Linux there is XChat, mIRCii while on Windows there
is mIRC, XiRCON, and a Windows port of XChat.
Keep in mind that most of the Instant Messanger type programs that
support multiple IM protocols will generally support IRC communications
as well. Some of these programs would include the likes of Pidgin
and Trillian. A good list of client software is available here:
http://www.ircreviews.org/clients
When the IRC service is advertised around a mesh, the "irc:"
protocol can be used to provide a URL for the IRC server.
With this, most browsers can start up an appropriate plugin or
external program. The Opera browser (at least version 10+)
has an IRC client built in! This is quite handy. Firefox and
Mozilla permit plugins/addons to be used, such as ChatZilla.
Even Internet Explorer can be told to start an external program
to use with a URL starting with "irc:".
If you've never used IRC before it would be best to get together
with a friend that has. Your friend can show you some of the
subtleties of using an IRC server as well as any particular IRC
client program because this document will not.
- WHAT DO I NEED TO INSTALL AN IRC SERVER ON A MESH NODE?
- ngircd_18_mipsel.ipk - An IPKG file I created that contains the
executable program for your WRT54G, a sample configuration
file, and a startup script so the server program can be run at boot time.
- A terminal program that can use the SSH protocol.
- Know how to edit text files in OpenWRT.
NOTE: ngircd does NOT need one of the "bigger memory" WRT54G's to run.
A unit with 16-Meg of RAM/4-Meg of FLASH will do just fine. I currently have
it running on an old version 1.0 WRT54G in my garage.
- UPLOADING THE CONFIGURATION AND THE EXECUTABLE FILES.
- From the Node Status webpage for the target node, press the Setup button.
- Next click on the Administration link.
- In the Package Management section, press the Choose button
and use the Open File window to find and select the file
'ngircd_18_mipsel.ipk' on your computer.
- Press the Upload button to send the selected file up to the
node and install the contents.
- Wait for the message:
Installing ngircd (18) to root...
Configuring ngircd
Done.
- POPPING HOLES IN THE FIREWALL.
From the Setup webpage click on the link for Port Forwarding,
DHCP, and Services. Under Port Forwarding select the following:
| Interface: | WiFi |
| Type: | Both |
| IP Address: | localnode |
For the following entry boxes enter:
| Outside Port: | 6667 |
| Lan Port: | 6667 |
Now press the ADD button and wait for an additional input
form appears underneath the one you just filled in.
If you'd like to advertise this IRC server on the mesh enter
the following data into the corresponding boxes:
| Name: | My IRC Server | [Whatever is informative] |
| Link: | irc | [and click the checkbox] |
| URL: | 6667 | [in the box after :] |
| | mesh | [in the box after /] |
Now press the ADD button and wait for an additional input
form appears underneath the one you just filled in.
Once this happens, and everything looks correct, press the
Save Changes button near the top center of the page and
wait for the following message to appear:
Configuration saved and is now active.
Now you should have popped the correct holes in the router's
firewall for the IRC server.
The link created, irc://yournode:6667/mesh, points to the
persistent IRC channel we created in the configuration file.
This is link is intended for browsers that understand, or can be
made to understand, the irc: protocol or scheme name. Some web
browsers have an IRC chat client built-in (e.g. Opera), others
may need a plugin (e.g. FireFox can use the ChatZilla plugin),
and others (e.g. Internet Explorer) may need to be instructed
to execute an external program with the given URL to start an
IRC client.
- CONFIGURING YOUR IRC SERVER.
Before too long we should have a webpage to configure the IRC
server but until then... login to your mesh node via 'ssh'.
Edit the ngIRCd configuration file with the following shell command:
vi /etc/ngircd.conf
In the [Global] section edit the following settings
Name
Info
MotdPhrase
by replacing the default values with something appropriate.
The comments in the configuration file should give you a clue
as to what to enter. For the Name just used your node's hostname
followed by the ubiquitous .austin.tx.us.mesh domain name.
The MotdPhrase is displayed when you first connect to an IRC server.
(MOTD == Message Of The Day). No, you won't have to change it every
day but it's a quick message to those who connect to your IRC server
as to what they've connected into.
In the [Operator] section change the Name and Password settings.
The Mask setting can limit the nickname, the user, and hostname
from which the /OPER command can be sent.
The /OPER command, when used in a client program with the correct
arguments allows a user to become the server's operator. This is
different from a channel operator (someone who creates and/or
operates a particular channel).
After saving the file and exiting the editor, the command
ngircd -t
can tell you if there's anything wrong with your config file. If
so, edit the file, as above, and make the necessary corrections.
HINT: It wouldn't be a bad idea to save the ngircd.conf file onto
a USB flash drive or PC in the event that you update or reflash the
firmware in your mesh node and want to restore your IRC server settings.
- HOW TO HAVE THE IRC SERVER START ON POWERUP.
Type the following shell command on your mesh node:
/etc/init.d/ngircd enable
This creates a link in the /etc/rc.d directory to the ngircd
script in /etc/init.d. This allows the ngircd script to start
the server.
- HOW TO START THE IRC SERVER WITHOUT REBOOTING.
Type the following shell command on your mesh node:
/etc/init.d/ngircd start
At this point you should be able to point your IRC client
program at your node and enter the #mesh channel.
There will be no need to issue this command any further.
It only serves to start the program without the need of
rebooting your mesh node.
- A SINGLE SERVER OR MULTIPLE SERVERS ON A MESH?
This is a question you will eventually need to answer if you plan
to use IRC on your mesh. Initially, a single server should do just
fine until you can get more familiar with the configuration file
and be able to configure the necessary information to connect with
other IRC servers on your mesh.
|