< Day Day Up > |
Hack 97 Set Up Your Own beware ircd Server
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 ircdWindows 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 bircdNow 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:
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:LinesThe 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 ircdWhen 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 |
< Day Day Up > |