Previous Section  < Day Day Up >  Next Section

Hack 97 Set Up Your Own beware ircd Server

figs/moderate.gif figs/hack97.gif

If you want a quick and easy IRC server, install and run the beware ircd IRC server on Windows.

beware ircd is a small, powerful IRC server for Windows and Linux. It is very easy to set up, yet it is as powerful as the ircds developed by large networks (such as ircu, developed by Undernet).

15.4.1 Downloading beware ircd

Windows and Linux versions can be downloaded from http://www.bircd.org or http://www.xs4all.nl/~beware3/irc. When you have the ZIP file, decompress it (Windows XP can do this, or you can use a third-party program such as WinZip) to a folder such as c:\bircd\. Figure 15-3 shows bircd being extracted with WinZip.

Figure 15-3. Unzipping bircd
figs/irch_1503.gif


Now browse to the directory and open bircd.ini in a text editor. This contains settings that enable or disable features of the server (similar to F: linesemployed by other servers). Some common settings you may wish to change are:


ChannelMode

These modes are automatically set when a user joins a new channel.


ListSecretChannels

If this is set to 1, IRCops can see secret channels by typing /list S.


MaxBans

This is the maximum number of bans that can be set on each channel.


MaxJoins

Users are allowed to join only this many channels.


MaxNick

Any nickname that is longer than this setting will be truncated (i.e., the maximum nickname length is equal to MaxNick).


NetworkName

When a user connects to the server, it will announce this as the name of the IRC network.


NoDie and NoRestart

Setting these to 1 disables the die and restart commands, respectively.


GlobalOperFailed

This sends a notice to all IRCops if someone attempts to become an IRCop by using the /oper command and fails.


OperGline

This allows IRCops to set g-lines (server/network bans). If it is set to 1, operators can set local g-lines; if set to 2, they can set global g-lines.


HalfOp

This enables the half-op (+h) mode. HalfOp gives a user some rights that a channel operator has, but not as many.


HeadInSand

These settings hide information from users, such as server names in /whois, g-line reasons, and the /map and /links commands. These generally make the network harder to attack.


QnetModes

This enables modes used on Quakenet that block CTCPs, colors, channel notices, and part/quit reasons.

When you have finished editing bircd.ini, save it, and open ircd.conf. This file contains a set of lines. The first letter denotes each line, and colons separate the parameters. The ircd.conf file is the same for most of the available IRC servers. Because of this, numerous web sites—such as http://www.irc.org/tech_docs/ircnet/INSTALL-4.html—explain how to use it.

15.4.2 O:Lines

The final settings that need to be changed before you can get your IRC server fully running are the O:Lines. These control who can use the /oper command to become an IRC operator. Such users can "kill" other users (disconnect them from the server) and even ban them from reconnecting. If you have the settings enabled in bircd.ini, they could even restart or stop the server.

The format of an O:Line is as follows:

O:Host:Password:Nickname::Class

The Host parameter specifies which host the user must be using in order to execute the /oper command successfully. It takes the format of ident@hostname, and you can use wildcards (*) to match parts of it. Valid examples are:

 *@192.168.* - Matches anyone connecting via a LAN

 MD87@* - Matches anyone with the ident 'MD87'

 MD87@192.168.* - Matches anyone with the ident 'MD87' connecting via a LAN

The fewer wildcards used, the better. It is possible to specify *@* for the host, but this is very insecure—anyone who can guess your ID and password could then use it.

The Password parameter tells beware ircd the password that must be used when the authorized user executes the /oper command. This can be plain text, or it can be encrypted using the mkpasswd program that comes with beware ircd.

The Nickname argument tells the ircd what the user's ID will be. This must be sent as the first parameter of the command. If Nickname is set to foo and Password is set to bar, the user can become an IRC operator by typing:

/oper foo bar

The Class defines which class the new IRC operator will belong to. By default, this is 10, which is the same as the client class, except with a higher sendQ. The sendQ determines how much data can be queued for the user before he is kicked from the server. In most circumstances, there is no need to change the class.

A completed O:Line will look something like this:

O:MD87@192.168.0.2:foobar:MD87::10

This will allow anyone connecting from 192.168.0.2 with the ident "MD87" to execute the /oper command with the ID "MD87" and password "foobar".

Examples for most of the available settings in ircd.conf can be found in the example.conf file, which is distributed with beware ircd.

15.4.3 Running beware ircd

When you have configured beware ircd, you can start it by browsing to the folder you extracted it to and running the bircd.exe file. The server should now start running.

To connect to the server from the same computer that beware ircd is running on, open your IRC client and connect to 127.0.0.1. To connect to it from a different computer or to allow other users to connect, you need to find out the computer's IP address or hostname. If you aren't sure what this is, web sites such as http://www.whatismyip.com will tell you. Note that if you have a firewall or router, you will need to forward port 6667 to the computer that is running the server.

Chris Smith

    Previous Section  < Day Day Up >  Next Section