Installing and Configuring UnrealIRCd on Windows

From SwiftIRC Wiki
Jump to: navigation, search

This article will demonstrate an UnrealIRCd [v3.2.8.1 - SSL] setup on a Windows [32-bit] system.

What is UnrealIRCd?

UnrealIRCd is an open-source irc server daemon (ircd) that allows users to run their own IRC server from their system. Unreal is just one of the many ircds out there for use. It created and is edited daily by their own support staff, who can be found at irc.unrealircd.com. The development of Unreal started in 1999. Unreal can be ran and configured on both Windows and Linux, however, this guide was written specifically for the installation of Unreal on Windows.

Note: Even though this configuration of UnrealIRCd was designed for Windows, the configuration file is interchangeable between the Windows and Linux versions of UnrealIRCd.

Contents


Installation

Navigate to the UnrealIRCd downloads page and select the 3.2.8.1 Win32 SSL version, select your desired download mirror and download the file.

Navigate to the download destination on your computer and run the file named "Unreal3.2.8.1-SSL.exe".
(Vista/7 users: You should run the installer as administrator to prevent problems. If a User Account Control window opens, click Yes.).

Running UnrealIRCd installer


Move through the installer by pressing Next, I accept the agreement and then click Next again.
The installer will let you choose the location that UnrealIRCd will be installed in. For this demonstration, we will be using the default. C:\Program Files\Unreal3.2


UnrealIRCd install location


When you're finished choosing, you will then have to choose the name and location for the UnrealIRCd shortcuts. You may choose not to have a Start Menu folder created. After clicking Next, you'll come to a screen where you can select some options. We will be creating a desktop icon, a SSL certificate and encrypting the SSL certificate.


UnrealIRCd install additional tasks


Click Next. If you haven't already got the Microsoft Visual C++ Redistributable package installed, it will now be installed. Simply click Next, check the box that indicates that you have read the terms and then click Install. When it's done, click Finish.


Microsoft Visual C++ Redistributable Setup


UnrealIRCd will now automatically finish installing. The final window should look like this:


Finishing UnrealIRCd install


Click Finish and a command-prompt style window should now pop up. Answer the questions. After that window, another should pop up. Enter a passphrase and remember it.
If no command-prompt style windows pop up, or they're only up for a split second, do not worry. We will fix this later.

Configuring Unreal

We will now need to configure UnrealIRCd. We have created an example configuration file that we will be using for the rest of this article. Download it here.
After downloading our unrealircd.conf, copy or move it to the main Unreal3.2 directory. (C:\Program Files\Unreal3.2 by default)

When you've done that, open up unrealircd.conf with your favourite text editor. (Note: You should not use a word processor, such as Microsoft Word. It will add its own formatting codes into the conf file and possibly make the conf file unusable. Use something else, such as Notepad, Notepad2 or Notepad++).

We will now be configuring UnrealIRCd. This is a basic configuration; there are many other advanced options available that are not within the scope of this article.

Necessary Modules

Locate the Linux and Windows module section near the top of the configuration file. Uncomment (Remove the two slashes in front of the lines) the two "loadmodule" lines for your server's respective operating system.

Me Block

After opening unrealircd.conf, locate the me {} block. Edit the name and the info lines with the server name and description that you want.

Admin Block

Locate the admin {} block and add in some information about the server admin (you). You can have as many or as little lines as you want here.

Oper Block

Locate the oper {} block. Edit "YourName" in the first line of the block to what you want your oper login to be. You'll also have to change the host in the "userhost" line to your own host. To find your own host, connect to a network (SwiftIRC) and type /whois <Your-Nickname>. Find the line that says something along the lines of:

 <nickname> is connecting from *@adsl-043-120-021-030.sip.jax.bellsouth.net 43.120.21.30

Take the long host that you see (the one in bold) and edit it into the userhost line.
You'll also want to edit in your password that you'll use to oper up with to the password line.

Services Link Block

Next, move down to the services link block. (Note: Do not uncomment (remove the /* and */) the link block until you set up your services.)
In the services link block, change "services.TestIRC.net" to your network's name, e.g. "services.CoolIRC.net".
Change the connect and receive passwords. It is best for both of them to be the same.
Locate the ulines block and, once again, change "services.TestIRC.net" to your network's name.

Ban Blocks

Next are the ban blocks. Use the default examples given to add your own bans. It is also worth noting that bans can be made within the IRC network.

vHost Block

Next is the vHost block. Editing this block is optional, so feel free to skip this section.

Go to the vhost line and change the vhost to whatever you like.
Copy the userhost used in the oper block and replace the default *@* host with your own.
Change the login name and password for your vHost.

Network Settings Block

Find the network settings block and change "TestIRC" in the network-name, default-server, services-server and stats-server lines to your own network name.
Change the hidden-host prefix to your network name also. The hidden-host prefix is what you see in place of a user's IP address. For example, on SwiftIRC you will see someone's host as ~ident@Swift-FD75464.cable.telstraclear.net. In this case, "Swift" is the hidden-host prefix.
Next you'll have to change all three cloak keys to three random strings of numbers and letters.
After that, change "TestIRC.net" in the host block within the network settings block to your own network name.
The host-on-oper-up value can be either 'yes' or 'no'. Setting it to yes will automatically give people, when they oper up, the host specified for their position.

Server Settings Block

Next is the server settings block.
Change the kline-address to a working email address so that people who get banned can contact you.

If you are an advanced user, feel free to change the remaining blocks and values that have not been mentioned.

You have now finished configuring UnrealIRCd.

Running UnrealIRCd

After confirming that unrealircd.conf is in the main Unreal3.2 directory, run UnrealIRCd either from the Start Menu or Desktop shortcuts.

If you are a Windows Vista or 7 user and you get a "Permission Denied" error, go to the Unreal3.2 directory and right-click unreal.exe and wircd.exe, click Properties, go to the Compatibility tab, and check the box for "Run this program as an administrator".


Compatibility - Running as administrator


If UnrealIRCd fails to start, check the ircd.log file in the Unreal3.2 directory. If there is an entry that looks like this:

 [Fri Mar 26 19:14:12 2010] - Failed to load SSL certificate server.cert.pem

then the server's SSL certificate was not created. This means that the certificate creation in the installation section failed. If UnrealIRCd starts without a problem, ignore the next paragraph.


To rectify this SSL certificate problem, go to the directory that the Unreal3.2 directory is in. Locate the Unreal3.2 folder and right-click on it.
Click Properties, and go to the Security tab.
Click Edit.
One by one, click the SYSTEM, Administrators, Users, and, if available, TrustedInstaller names and allow them to read and write, using the check boxes.


Permissions for Unreal3.2


After that is done, go into the Unreal3.2 directory and run "makecert.bat". Answer the questions. After that window closes, run "encpem.bat".
After that finishes, run UnrealIRCd again. You should not get the error this time.


After running Unreal, a box will pop up, asking you for your SSL Private Key password. Enter the pass phrase that you made up earlier when you created the certificate in the installation section.
If all goes well, the UnrealIRCd window will pop up:


Unreal3.2.8.1


Congratulations, you have just set up an IRC server! If it is running on your computer, you can type:

 /server 127.0.0.1

or

 /server localhost

to connect to your server.


If it is not being hosted on your computer, obtain the IP address of the system it is running on and connect with:

 /server <IP Address>


Note: If you want other people to connect, you may need to set up port forwarding. This is not covered in this article.

Have fun!

Some configuration extras

Message of the Day

You can create a Message of the Day (MotD) that will be displayed to all users that connect to your server. It can also be read by typing /motd.
Create a file named 'ircd.motd' in your Unreal3.2 directory and edit it with a text editor. Write in your MotD, save the file, and rehash Unreal. (You can rehash it by clicking the rehash button on the Unreal3.2.8.1 program window).

Network rules

You can create a rules file that can be read by typing /rules.
Create a file named 'ircd.rules' in your Unreal3.2 directory and edit it with a text editor. Write in your rules, save the file, and rehash Unreal.

Oper Message of the Day

You can create a Message of the Day just for IRC operators on your server.
Create a file named 'oper.motd' in your Unreal3.2 directory and edit it with a text editor. Write in your oper MotD, save the file, and rehash Unreal.

IRC bot Message of the Day

You can create a Message of the Day for IRC bots that connect to your server.
Create a file named 'bot.motd' in your Unreal3.2 directory and edit it with a text editor. Write in your bot MotD, save the file, and rehash Unreal.


Have fun (again)!



   This tutorial has been created by SwiftIRC user Mp5shooter