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 or 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

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:


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


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


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


Users are allowed to join only this many channels.


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


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.


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


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.


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


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.


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—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:


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:


This will allow anyone connecting from 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 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 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