Tip of the day: You can exempt users dynamically from server bans, spamfilter, maxperip and other restrictions with the ELINE command on IRC.
|
Linking UnrealIRCd with anope
UnrealIRCd is often used with the Services package called Anope. Below we guide setting up and linking anope to UnrealIRCd.
Anope is not the only services that you can use with UnrealIRCd. Other services software is mentioned in the Services article, including Atheme.
Install UnrealIRCd
If you have not done yet, install UnrealIRCd. Either through Installing from source or Installing (Windows). In this article we assume your UnrealIRCd is up and running and you know how to become IRCOp.
Set up linking in UnrealIRCd
Normally you will install anope on the same machine as one of your UnrealIRCd servers. If you have a hub, then install anope on the hub. Otherwise, just choose any IRC server that is stable.
When UnrealIRCd and anope are installed on the same machine, they can link over localhost (IP 127.0.0.1), which makes things easy because you don't have to worry about SSL/TLS. This is what we will assume in this article.
Copy-paste the following link block to your unrealircd.conf
:
link services.example.net { incoming { mask { ip 127.0.0.1; } }; password "mypassword"; class servers; }; ulines { services.example.net; };
Now make two changes:
- Change the name
services.example.net
to services + dot + the domain name used by your network. For example if your IRC server is calledirc1.xyz.net
then usually you will name your services asservices.xyz.net
- Change
mypassword
to some random password you will use
Now save the unrealircd.conf file and rehash UnrealIRCd.
IMPORTANT: You will need both the services name and the password again in later steps, so write them down somewhere.
Install anope
IMPORTANT: Below we install anope 2.0.x series. There is also the 2.1.x series but they are development series (not necessarily stable). The 2.1.x series use slightly different configuration file names and directives. We only document 2.0.x below.
- Download latest stable release of anope 2.0.xx from https://anope.org.
- Extract the tar.gz
- Change to the extracted directory. For example if you extracted 2.0.12.tar.gz then you now need to
cd anope-2.0.12
Now that you are in the anope-X.Y.Z directory you run:
./Config
which asks a few questions, the defaults are usually fine (press ENTER each time)cd build
make
make install
Configure anope
Your anope will be installed in /home/yourusername/services
(unless you changed the installation path during ./Config
)
cd ~/services cp conf/example.conf conf/services.conf
Now open the services.conf
with an editor (eg: nano services.conf
) and walk through it while following the instructions below (see next):
services.host
The file starts with:
define { name = "services.host" value = "services.example.com" }
Change services.example.com
to the name of services that you chose earlier in Set up linking in UnrealIRCd.
uplink
Then a few lines later you arrive at the ircd config / uplink block, for UnrealIRCd you need this in anope:
uplink { /* * The IP or hostname of the IRC server you wish to connect Services to. * Usually, you will want to connect Services over 127.0.0.1 (aka localhost). * * NOTE: On some shell providers, this will not be an option. */ host = "127.0.0.1" /* * Enable if Services should connect using IPv6. */ ipv6 = no /* * Enable if Services should connect using SSL. * You must have an SSL module loaded for this to work. */ ssl = no /* * The port to connect to. * The IRCd *MUST* be configured to listen on this port, and to accept * server connections. * * Refer to your IRCd documentation for how this is to be done. */ port = 6667 /* * The password to send to the IRC server for authentication. * This must match the link block on your IRCd. * * Refer to your IRCd documentation for more information on link blocks. */ password = "mypassword" }
So compared to the default example conf that anope ships you need to edit:
- Change
port = 7000
toport = 6667
- In the line
password = "mypassword"
change mypassword to the password that you configured earlier in the Set up linking in UnrealIRCd step.
serverinfo
Now you arrive at the serverinfo block:
- Edit the
name = "services.example.com"
. Change theservices.example.com
to the name of services that you chose earlier in Set up linking in UnrealIRCd. - Optionally change the line with
description = "Services for IRC Networks"
- Change the line
#id = "00A"
toid = "00A"
. If you wonder what this is: it defines the unique sid for the services server (similar to me::sid in UnrealIRCd).00A
should be fine, but you can configure another value, as long as it is unique on your IRC network.
The rest of the serverinfo block is fine.
protocol module
Next comes a section that looks like:
module { name = "inspircd3"
Change that to:
module { name = "unreal4"
This makes anope use the protocol module for UnrealIRCd 4 and later (yes, unreal4 is correct even if you are using UnrealIRCd 6).
rest of the file
Now continue with the rest of the services file. The anope README says the following about this:
Edit services.conf. The Anope wiki is also a good source of information. Anope's support channel is located at #anope
on irc.anope.org.
Note that the example configuration file includes other example configuration files. If you want to modify the other example configuration files, copy them (e.g. modules.example.conf
to modules.conf
and modify the include
directive in services.conf
to include the new file.
Start anope
Before you start anope, make sure you are connected to IRC as an IRCOp at the server that services will link to. This way you can see any verbose error messages on the UnrealIRCd-side if something goes wrong with linking services.
Now start anope:
cd ~/services bin/anoperc start
On the UnrealIRCd side you should see that services linked successfully. You can use the MAP
command on IRC as an IRCOp to see that services shows in the network map of servers. You should also be able to see NickServ if you do WHOIS NickServ
. See next if you have any problems or questions.
Help and support
- If you have trouble linking services to UnrealIRCd then you can ask in the UnrealIRCd support channel: irc.unrealircd.org / #unreal-support, but other than that:
- If you have any anope questions:
- then check out the Anope wiki, and
- use their support channel:
#anope
on irc.anope.org.
Anope is NOT our software. We didn't make it and we are no Anope experts. You should really ask any anope questions at anope.org and not in #unreal-support.