Setting
up your own IRC server}
By
Anurag Phadke
Want
to setup an IRC server for your website? Here's how
<alsie>
Hi there max, hw r u?
<max>
fine ty, gtg catch u l8r.
Is that proper English? Not for my High School English
Teacher perhaps. But for millions of chat fans, this
is a perfect statement with no grammatical mistakes,
the new chat lingo.
Before Instant Messengers (IM's) became popular, IRC
(Internet Relay Chat) was the most preferred mode
of real time communication on the Internet. Companies
like Talkcity use IRC services for hosting chat/celebrity
events, discussing hot topics and latest technology
with one another. Furthermore you can customize it
as per your preferences.
UnrealIRCd (Unreal server) is one of the most popular
IRC server that is available for free. It runs on
both Windows and Linux, and is highly configurable.
Setting up UnrealIRCd is relatively simple; just follow
the steps below to get started.
Setting up UnrealIRCD on Windows
Let's first install it on a UnrealIRCd Windows box.
For installing UnrealIRCd on Windows, download it
from unrealircd.com/download/Unreal3.2-beta2.zip.Window
users should skip the ./Config and other sections
and just read the UnrealIRCd configuration section.
It's pretty much the same for both the operating systems.
Just copy the example.conf from /doc directory to
your main directory. Rename this directory as unrealircd.conf
and double click on wircd.
Setting up UnrealIRCD on Linux
For setting up UnrealIRCD on Linux download the 1096
KB file from unrealircd.com/download/Unreal3.2-beta2.tar.gz.
Install the Unreal IRC server using the following
commands:
cp /location/of/downloaded/file / 'Copies the Unreal
file from the downloaded directory to /
tar xzvf Unreal3-2-beta2.tar.gz 'Untars the Unreal
file
cd Unreal3.2 'Changes directory to Unreal3.2
./Config 'command to configure the IRCD server
The config tool shall ask you a few. If you are installing
the server for the first time, we suggest stick to
the following alternatives.
Do you have an insecure operating system and therefore
want to use the server anti-spoof protection?
[No] -> Yes
What directory are all the server configuration
files in?
[/Unreal3.2] -> {Press Enter}
Pressing Enter shall use the value inside the bracket.
ie. /Unreal3.2 in this case.
What is the path to the ircd binary including the
name of the binary?
[/Unreal3.2/src/ircd] -> {Press Enter}
Would you like to compile as a hub or as a leaf?
[Hub] -> Leaf
A Hub is used to provide multiple links to other IRC
servers at your own network. Since we are installing
as a single server on our network, option Leaf is
used.
What is the hostname of the server running your
IRCd?
[localhost.localdomain] -> {Press Enter}
If you want to use any other hostname like foo.com,
make sure that you have proper setup for the same
and entry has been made in /etc/hosts file.
What should the default permissions for your configuration
files be?
[0600] -> {Press Enter}
This is similar to the permissions option that we
use in UNIX. Setting it to 0777 shall allow read/write/exec
privileges for any person to read the configuration
file. The configuration files should be considered
as a classified piece of data and therefore care should
be taken to avoid unauthorized read privilege. The
0600 mode prevents unwanted reading of files.
Do you want to support SSL connections?
[No] -> {Press Enter}
Secure Sockets Layer provides secured connections
over the network. Though this makes the connections
a bit slow, it is highly recommended for people who
care utmost about security and privacy. Enabling SSL
ensures privacy for users. You need to use self signed
certificates (not trusted by everyone) or get them
signed at sici.ircsystems.net. This service is free
of cost you only need to convince the administrators
that the server really belongs to you.
Do you want to use encrypted oper {} passwords?
[No] -> {Press Enter}
This uses the crypt() library which is an Operating
System's feature. Press Enter for the remaining encrypt
options if you don't want to encrypt the passwords.
Type yes to use encryption techniques.
Do you want to enable IPv6 support?
[No] -> {Press Enter}
IPv6 support for Unreal IRC is under testing. Most
of the systems use IPv4. Unless your system specifically
uses IPv6, we recommend you blindly press enter for
the above option.
For the next few questions, just press enter to make
use of the default options. Standard values are listed
and should be changed only to fine tune the server.
Once the questionnaire has been answered, compilation
shall config UnrealIRCd. Changes made to the system
shall be mailed to you on your root email account.
Keep this email as a reference.
Just type make on your shell and unrealircd shall
now compile your IRC server.
Only compilation is achieved by the above command.
You still need to configure the IRC server in accordance
to your needs.
UnrealIRCd configuration
Type the following:
#cp doc/example.conf unrealircd.conf 'copies doc/example.conf
to the parent directory as unrealircd.conf
Now open your favorite editor to edit the unrealircd.conf
file and make the following changes. Unlike previous
Unreal configuration files, the unrealircd.conf contains
all the required information. The file is coded in
C/C++ format and is not compatible with previous versions.
One doesn't need additional knowledge of C/C++ to
get the server working; editing/replacing some of
the parts of the config file shall do the trick.
me
{
name "irc.chitchat.com"; /*Name by which
the server should be recognized */
info "Chatter Box Server"; /*Description
of the server */
numeric 1; /*Sends server token instead of server
name to save bandwidth when linked to other IRC servers*/
};
admin {"Chit Chatter"; /* Name of the admin
*/
"chitchat";
/* Nick name of the admin */
"chatter@chitchat.com";
/* email id. of the admin */
};
Worried about unauthorized access to your server?
You can assign a default password such "f00Ness"
(0=zero) so every user needs to know the password
before logging onto the server. This is a cumbersome
method and tends to drive away more users than attract
them. Just delete the password line that appears in
the allow class.
Starting IRC
In /*Server specific configuration */, you need to
change the kline-address value to a valid email id.
kline-address "chatisgood@goody.com";
Change the DNS entry to the one that corresponds to
your machine.
dns {
nameserver 127.0.0.1; /*IP address of the server to
connect to */
timeout 2s; /* Timeout if it cannot resolve address
of the server within 2 secs. */
retires 2s; /* Retry connecting to the server after
2 secs. */
};
Now that we are finished making the configuration
file, let's start our IRC server. It's not recommended
to run IRCd as root. So create another user id "cbca"
using linuxconf utility. You can even use 'adduser'
for adding users.
We need to assign the ownership of "Unreal"
directory to "cbca"
#chown -R cbca.cbca /Unreal3.2
Login to "cbca" and goto Unreal3.2 directory.
#./src/ircd
Above command shall open the unrealircd.conf file
and check it for errors. If none are found, it shall
only prepare to boot IRCd and not actually boot it.
To boot/start IRCd, type
#./ircd 'Starts ircd process
#ps -ux 'Checks whether IRCd service has been started
or not
There might be a distinct possibility, that port 6667
may be used by some other service. In such a case,
edit unrealircd.conf and remove all lines that have
port 6667 written against them. If you follow the
instructions in this article, then you can connect
to 127.0.0.1, port 8067.
Save the file and rehash it using the following command:
#./rehash
Once you make changes to the configuration file, you
need to reload it. With Unreal, you can use the rehash
command to reload the configuration file only and
not the entire service.
You can now invite your friends/family members as
you can kick/ban and k-line them on your own server.
Try connecting using BitchX or Kirc, the free forum
of speech awaits you.
Guess that's pretty much it!. See you @ IRC soon :)
Anurag Phadke can be reached
at cbca@mantraonline.com