UnrealIRCD Configuration
This contains all information on the UnrealIRCd configuration file (unrealircd.conf and other *.conf files). Be sure to read the #Configuration file syntax. Other than that, it is mostly meant for reference as reading everything would be too long to read.
Configuration file syntax[edit]
UnrealIRCd configuration files use a block-based format. Each entry or block has a specific format. The format works like:
<block-name> <block-value> { <block-directive> <directive-value>; }
<block-name> is the type of block, such as me for the Me block, or admin for the Admin block.
<block-value> may not always be present, but if it is then it may have two meanings: 1) sometimes it specifies a value, such as bobsmith in oper bobsmith {, 2) other times it defines a sub-type, like with deny dcc {.
<block-directive> is an individual variable specific to the block. <directive-value> is the associated value (if any). If <directive-value> contains spaces or characters that represents a comment it must be contained in double quotes like somevar "some value with spaces in it";. (By the way, if you want to use a quote character inside a quoted string then use \" and it will be understood as a quote character).
Finally, a <block-directive> may also have directives in it, and so on and so on.
Note: the configuration file is currently case sensitive so BLOCK-NAME is not the same as block-name.
IMPORTANT: You must terminate each line with a ; and terminate each block with a }. Only the start and end of the block (eg: me {) has no terminating ; character. If you forget a } or ; somewhere then UnrealIRCd will fail to read your configuration file correctly and will not boot!
Examples (correct):
me { name "irc.something.net"; sid 001; info "Some nice server"; }
log ircd.log { flags { errors; } }
set { maxchannelsperuser 10; options { hide-ulines; } anti-flood { connect-flood 3:60; nick-flood 3:60; } }
Important: there is a special notation used to talk about entries in the config file and we use it throughout the UnrealIRCd documentation. Take the first example from above (the me block), the name is set to irc.something.net, we call this variable me::name. Similarly, in the last example we would refer to the connect-flood directive as set::anti-flood::connect-flood, and we call that block the set::anti-flood block.
You can also put comments in the configuration file. Comments are text that isn't interpreted by UnrealIRCd and it's entirely up to you if you use it and what you write. UnrealIRCd supports 3 types of comments:
# This is a single line comment (type 1) // This is also a single line comment (type 2) /* This is a multi line comment */
Now that you know how the configuration file works in principle, copy conf/examples/example.conf to conf/ and rename it to unrealircd.conf. Walk through it block per block, line by line. If you want to know more about a specific section then see the top of the Configuration article for all the available blocks and directives.
Sharing settings between servers[edit]
When you run multiple IRC servers (in the same IRC network) then it makes sense to put these "shared settings" in a separate configuration file(s) and only put server-specific settings directly in the unrealircd.conf directly.
For example, you could put all the shared settings in a file called network.conf, copy it to all your servers and include it from your unrealircd.conf. Or maybe you want to split them up like link.conf, class.conf, settings.conf, etc.
Even better: use Remote includes so your servers fetch a copy of it by HTTP(S) upon start and /REHASH.. then you only have to update one file, rehash your servers, and the settings are active network-wide.
Many settings can be shared among servers. Only the Me block and possibly the Listen block and some other settings are unique for each server.
Me block[edit]
The me block defines the identity of the server.
Syntax:
me { name <name-of-server>; info "<server-description>"; sid <server-id>; };
The item name specifies the name of the server, info specifies the server's info line, sid is an unique server id which is a digit followed by two digits/letters in uppercase. This is an unique server value meaning NO other servers on the network may have the same sid.
Example:
me { name "irc.foonet.com"; info "FooNet Server"; sid 001; };
Admin block[edit]
The admin block defines the text displayed in a /admin request. You can specify as many lines as you want and they can contain whatever information you choose, but it is standard to include the admins nickname and email address at a minimum. Other information may include any other contact information you wish to give.
Syntax:
admin { <text-line>; <text-line>; };
Example:
admin { "Bob Smith"; "bob"; "[email protected]"; };
Class block[edit]
Class blocks are classes in which connections will be placed, for example clients from allow blocks and servers from link blocks. You generally have multiple class blocks: one for servers, one for regular clients and one for IRCOps (the latter is optional).
Syntax:
class <name> { pingfreq <ping-frequency>; connfreq <connect-frequency>; maxclients <maximum-clients>; sendq <send-queue>; recvq <recv-queue>; //options { nofakelag; }; };
name is the descriptive name, like "clients" or "servers", this name is used for referring to this class from allow/link/oper/etc blocks
pingfreq is the number of seconds between PINGs from the server (something between 90 and 180 is recommended).
connfreq is used only for servers and is the number of seconds between connection attempts if autoconnect is enabled
maxclients specifies the maximum (total) number of clients/servers which can be in this class
sendq specifies the amount of data which can be in the send queue (very high for servers with low bandwidth, medium for clients)
recvq specifies the amount of data which can be in the receive queue and is used for flood control (this only applies to normal users, try experimenting with values 3000-8000, 8000 is the default).
options::nofakelag allows this particular class to bypass the fake lag protection, it is almost never used. Read the FAQ on fake lag first before you try using this!
Examples:
class clients { pingfreq 90; maxclients 1000; sendq 200k; recvq 8000; };
class servers { pingfreq 60; connfreq 15; /* try to connect every 15 seconds */ maxclients 10; /* max servers */ sendq 20M; };
class opers { pingfreq 90; maxclients 50; sendq 1M; recvq 8000; };
Allow block[edit]
Allow blocks specify who may connect to this server and what class to put the user in. You can have multiple allow blocks.
Syntax[edit]
allow { /* UnrealIRCd 5.2.1 and later require this: */ mask <mask>; /* UnrealIRCd versions of 5.2.0 and older require either 'ip' or 'hostname', but not both: */ ip <user@ip-connection-mask>; hostname <user@host-connection-mask>; /* Other mandatory options: */ class <connection-class>; maxperip <max-connections-per-ip-locally>; /* All the rest is optional: */ global-maxperip <max-connections-per-ip-globally>; password <connection-password> { <auth-type>; }; /* OPTIONAL */ ipv6-clone-mask <number-of-bits>; /* OPTIONAL */ redirect-server <server-to-forward-to>; /* OPTIONAL */ redirect-port <port-to-forward-to>; /* OPTIONAL */ options { <option>; <option>; ... }; };
Do you have multiple allow blocks? Then note that they will be read upside down, so you need specific host/ip allow blocks AFTER your general *@* allow blocks.
If a client does not match any allow block then the client is rejected with the message from set::reject-message.
required items[edit]
mask/ip/hostname[edit]
In UnrealIRCd 5.2.1 and later you must specify a mask such as mask *;
. Advanced users may wish to look at Mask item to see a lot more options that can be used for masks, such as lists, negative matching, matching SASL users, certificate fingerprints, etc.
In UnrealIRCd 5.2.0(.1) and older:
You need to specify either ip or hostname which will be matched against the IP or hostname (DNS) of the user who is connecting. For example ip *; will match everyone and hostname *.uk; will match only people with a host ending in ".uk".
class[edit]
Specifies the class name that connections using this allow block will be placed into.
maxperip[edit]
With maxperip you specify how many local connections may come from each IP. For example maxperip 4; means that only 4 clients may connect per-IP to this server.
global-maxperip[edit]
This setting only exists in UnrealIRCd 5.0.9 and later
This specifies the global maximum number of connections from each IP (network-wide). If you don't have this, then it will default to maxperip+1.
optional items[edit]
password[edit]
The server password or another authentication method that the user authenticates with.
In UnrealIRCd 5 we have two behaviors for password control:
optional password to get extra rights[edit]
The default behavior in 5.x is to continue matching next allow block if the password is incorrect:
allow { ip *@*; class clients; maxperip 2; } allow { ip *@*; password "iwantmore"; class clients; maxperip 10; }
If a user connects with the password iwantmore then they will get a maxperip of 10. If the user does not connect with that password (either wrong or no password) then the user will get a maxperip of 2.
mandatory password[edit]
On the other hand, you may want to use passwords to keep other users out. In this case you need to use allow::options::reject-on-auth-failure as described below:
allow { ip *@*; class clients; maxperip 2; } allow { ip *@*.nl; password "tehdutch"; class clients; maxperip 2; options { reject-on-auth-failure; } }
In this case anyone with a hostname of *.nl must provide the password tehdutch. If they don't, they will be rejected access and cannot connect to the server.
NOTE: This option is only available in UnrealIRCd 5.0.8 and later.
ipv6-clone-mask[edit]
This option controls clone detection and is basically IPv6's variant of maxperip. If you don't have IPv6 enabled then this option has no effect. If two clients connect from different IPv6 addresses but only the last few bits are different, there is almost a guarantee that both clients are really one person. This option only affects the enforcement of allow::maxperip. For example, if you set this option to 128, then each IPv6 address will be considered unique. Because of current IP allocation policies, it is recommended that your most general allow block use a value of 64. Since 64 is already the default in set::default-ipv6-clone-mask you probably don't need to change this.
redirect-server & redirect-port[edit]
When the class is full (class::maxclients) we will redirect new users to this server. This requires support from the IRC client side, popular clients like mIRC support this but this feature is broken in case of SSL/TLS so is likely of little use in the modern world.
redirect-server specifies the server name and redirect-port the port (6667 by default).
options[edit]
One option gives you additional flexibility for matching:
- ssl: Only match if this client is connected via SSL.
Meaning, if this doesn't match, UnrealIRCd jumps to next allow block.
There are also two other options that don't have anything to do with matching but will affect the user/host:
- useip: Always display IP instead of hostname.
- noident: Don't use ident but use username specified by client.
And, finally, there's one special option that is rarely used:
- reject-on-auth-failure: Reject the user if the password is not provided or does not match. See also #password above for a longer explanation.
Example[edit]
Example 1: generic block and specific block[edit]
allow { ip *; class clients; maxperip 3; }; allow { ip 1.2.3.*; class clients; maxperip 25; };
Example 2: match by services account and more[edit]
NOTE: This example is for UnrealIRCd 5.2.1 and later
allow { mask *; class clients; maxperip 3; }; allow { mask 1.2.3.*; class clients; maxperip 25; }; allow { mask { ~a:TrustedUser1; ~a:TrustedUser2; } class clients; maxperip 25; };
This will:
- Grant any user in the IP range 1.2.3.* a high maximum connections per IP of 25
- Grant TrustedUser1 and TrustedUser2, if he identifies to services using SASL, also a maxperip of 25
- All the other clients get a maxperip of 3
Listen block[edit]
The listen block defines the TCP/IP ports that the IRCd will listen on.
Syntax[edit]
listen { ip <ip>; port <port>; options { <option>; <option>; ... }; tls-options { ... }; };
ip[edit]
Simply set ip to * (an asterisk) to bind to all available IP's on the machine, OR specify an IP to only bind to that IP address (this latter is usually required at shell providers).
port[edit]
This is the port you want to listen on, like 6667. You can also specify a port range, like 6667-6669.
options block (optional)[edit]
You can specify options for the port. Valid options are:
- tls: SSL/TLS encrypted port
- clientsonly: port is only for clients
- serversonly: port is only for servers
- websocket: in UnrealIRCd 5 you open up a port for WebSocket support via this. You also need to specify a type, like:
options { websocket { type text; } }
tls-options block (optional)[edit]
Valid options are all the SSL/TLS settings that also exist in set::tls. For example you may want to use an Lets Encrypt certificate/key on all normal client ports (via set::tls::certificate). But for this port you want to use another SSL certificate/key:
listen { ... tls-options { certificate "ssl/server.cert.pem"; key "ssl/server.key.pem"; }; };
Example[edit]
listen { ip *; port 6667; };
listen { ip *; port 6697; options { tls; }; };
Oper block[edit]
In oper blocks you define all the IRC Operators accounts. Once defined you use the /OPER command on IRC to become IRCOp.
Syntax[edit]
oper <name> { /* Required items: */ mask <hostmask>; password <password>; class <class-name>; operclass <operclass-name>; /* Optional items to further limit who can /OPER */ require-modes <modes> maxlogins <num>; /* Optional items to define what will be set upon successful /OPER */ vhost <new virtual hostname>; swhois <whois info>; modes <modes>; snomask <snomask>; };
Required items[edit]
name[edit]
The name in the oper name { block defines which name to use in the OPER command on IRC (/OPER name password). This name is case sensitive!
Most people use their nick name here. You can use latin characters (A-Z a-z), numbers and _-[]. Do not use special characters like � (as in Bj�rn) or Arabic/Greek/etc. Such characters may cause you problems with /OPER'ing due to character set differences.
password[edit]
The password item defines the password to use. Passwords are case sensitive. Instead of using a plaintext password here, we highly recommend you to use Hashed passwords or SSL certificate fingerprints, see Authentication types.
mask[edit]
The mask defines from which host/IP this oper block may be used, this can be used for increased security. Set this to mask *;
if you want to permit any IP.
You may also use multiple masks, in which case the syntax becomes like: mask { 1.2.3.*; 55.66.*; 11.22.*; *.co.uk; };
. See also Mask item for more complex masks.
class[edit]
After a successful /OPER attempt the user will be put in the class you specify here. It's recommended to use a special class you created for opers (eg: class opers;) that typically has higher flood limits than ordinary users.
operclass[edit]
This defines which Operclass block to use. The operclass block configures which privileges this IRCOp will have (which IRCOp commands you may use, etc..).
Optional items[edit]
require-modes[edit]
This lets one specify modes (such as 'z') that a user must have acquired before being allowed to OPER. This can be used, for example, to require opers to be on secure connections (user mode +z) before being able to become operators.
maxlogins[edit]
This allows you to restrict the number of concurrent oper logins from this host, for example if you set it to 1 then only 1 person can be oper'ed via this block at any time.
vhost[edit]
This hostname (virtual host) will be set after you successfully oper up.
swhois[edit]
Allows you to add one or more extra lines to the /WHOIS information for this oper. For example:
swhois "a Network Administrator";
modes[edit]
Set these user modes after successful oper up.
snomask[edit]
By default an IRCOp gets the Snomasks from set::snomask-on-oper. You can use this oper::snomask to specify a different set of snomasks. See Snomasks for a full list.
Example[edit]
oper bobsmith { class opers; mask { smithco.com; *.somedialupisp.com; }; password "f00"; operclass netadmin; swhois "a Network Administrator"; snomask cFfkoSsqNG; };
Some little information about OperOverride[edit]
OperOverride are things like: joining a +ikl channel and going through bans, op'ing yourself in a channel, etc. See the OperOverride article for all information on this.
Operclass block[edit]
The operclass block is used to define ircop permissions. It is referred to from oper::operclass in the Oper block.
The operclass block allows you to define permissions in a very fine-grained manner. If you just want to use some good defaults, then see the default oper classses at the end of this article.
Syntax & Examples[edit]
operclass name { parent xyz; /* OPTIONAL: can be used to inherit permissions from another operclass block */ permissions { .....permissions to grant to this oper class...... }; };
Each operclass has a name. You define the privileges in operclass::permissions. Optionally you can use operclass::parent to have this operclass inherit all permissions from another operclass.
How permissions work[edit]
By default the oper using an operclass does not have special powers (this is not entirely true, actually). You must grant each privilege via operclass::permissions.
For example to grant the right to /KILL users:
operclass name { permissions { kill;
This would be the same as:
operclass name { permissions { kill { allow; };
Many permissions allow you to define even more options, which go in a sub-block, like:
operclass name { permissions { kill { allow { local yes; }; /* only allow KILL on local users, not remote */ };
You can also have multiple allow blocks. The following would permit SPAMFILTER, but only in a limited matter:
operclass name { permissions { spamfilter { /* May delete ANY spamfilter */ allow { what del; }; /* May add spamfilter with action 'block' */ allow { action block; }; /* (all the rest is denied) */ };
Permissions list[edit]
See the Operclass permissions article for an overview and the full list of 100+ permissions that are available.
Default oper classes[edit]
UnrealIRCd ships with a number of operclass blocks, these are in the file operclass.default.conf. You can use these for inspiration or just use them directly from your Oper block.
The default operclass blocks consist of:
- locop: this has the least amount of privileges. The powers of this IRCOp type are (mostly) limited to the local server, for example it can /KILL and /KLINE local users but not remote users. This IRCOp does not have any special privileges in channels nor can it "see" much additional information of users. For example, they can see the IP of users (so they can /KLINE properly) but they cannot see if a user is in a secret channel (+s).
- globop: Global IRC Operator. Has a good set of privileges. Can for example /KILL and /GLINE users on all servers. Can "see" extra things (override::see) such as secret channels in /LIST and /WHOIS.
- admin: Server administrator. Similar to globop but includes the ability to use a few more potentially dangerous but powerful commands such as /SPAMFILTER.
- services-admin: This level adds the ability to use /SAJOIN, /SAPART and /SAMODE.
- netadmin: This is the highest level. Compared to services-admin it also includes the ability to deop or kill services bots and some other unusual things.
In addition to the above we also have globop-with-override, admin-with-override, services-admin-with-override and netadmin-with-override: these operclasses are the same as above but add the ability to use OperOverride. In other words: to walk through bans, changes modes without being op'ed, and so on. See OperOverride for more information.
Customizing oper classes[edit]
If you want to tweak an operclass, change a few permissions, then you can do so in two ways:
- By copy-pasting the block(s) from operclass.default.conf
- By creating a new operclass and using 'inheritance'. You set operclass::parent to an operclass to use as a base and then extend the operclass by adding / removing permissions.
We highly suggest you read below about both methods and only after that decide which one to use.
Copy-pasting[edit]
NOTE: You should never edit operclass.default.conf directly as it will be overwritten upon each upgrade! (hence the name operclass.default.conf)
This method is easy:
- Copy the relevant block(s) to your own configuration file
- Give the operclass block(s) a different name
- Edit the block to add/remove permissions
The downside of this method is that when we add new permissions in later UnrealIRCd versions then your (custom) IRCOp classes won't have these rights by default. You would have to edit your operclass and add the new permissions manually (or not). This can happen when we move existing permissions that are currently granted to all IRCOps to a new privilege flag, or when we split existing permissions into 2 separate permissions. Since the operclass system is relatively new this is likely to happen (almost) every UnrealIRCd release. Of course, if you understand this downside and find it acceptable, then it's perfectly fine if you use this method.
Using inheritance[edit]
Inheritance works better than copy-paste (for small changes, anyway) and requires less maintenance on your side. This is because when we add new rights in UnrealIRCd in later versions we will add them to the default blocks and your customized block would automatically inherit them.
Inheritance should work well in the majority of the cases. However if you have a lot of changes then it may be better to just go for the copy-pasting method explained earlier.
Example 1: limit rights[edit]
Say you like the locop operclass but want a few things changed:
- You want the ircop to be able to 'see' extra things such as secret channels.
- The locop class allows /ZLINE and /KLINE, but you want to only allow /KLINE.
operclass special { parent locop; /* we inherit the settings from 'locop' and then tweak them below.. */ permissions { /* we add a 'tkl' block with only 'kline', this means: only allow kline (and not zline too) */ tkl { kline; }; override { see; }; /* add the override::see capability */ /* all the other permissions are inherited from the 'locop' operclass */ }; };
Example 2: super-netadmin[edit]
In this example we will extend the netadmin IRCOp to also restart the server (via the /RESTART command).
The restart privilege is called server::restart. So we need to override the server privilege. First, you should have a look at which server permissions are there in the netadmin class. You should check out operclass.default.conf, but at the time of writing this article it is:
server { opermotd; info; close; remote; module; dns; addline; rehash; description; addmotd; addomotd; tsctl; };
So we will need to add restart; to that.
This is the complete block you will use:
operclass super-netadmin { parent netadmin; /* we inherit the settings from 'netadmin' and then tweak them below.. */ permissions { /* we are going to change the 'server' block. We need to copy the rights from * the 'netadmin' operclass and add 'restart' to it: */ server { opermotd; info; close; remote; module; dns; addline; rehash; description; addmotd; addomotd; tsctl; restart; }; /* all the other permissions are inherited from the 'netadmin' operclass */ }; };
DRpass block[edit]
IRCOp's who have restart/die rights can restart the IRC Server through /RESTART and kill the server with the /DIE command.
This block allows you to set a password for these commands so IRCOp's need to use /DIE password and /RESTART password.
Please use encrypted password in this block (especially here). See Authentication types.
Syntax[edit]
drpass { restart <restart-password>; die <die-password>; };
Example[edit]
drpass { restart "I-love-to-restart"; die "die-you-stupid"; };
Include directive[edit]
The include directive allows you to include other configuration files. This way you can split up your configuration instead of having one large unrealircd.conf.
Syntax[edit]
include "<file-name-or-URL>";
You can use:
- A relative file name, such as
include "modules.default.conf";
this will be read from yourconf
directory in UnrealIRCd. - A full path, such as
include "/var/opt/whatever.conf";
orinclude "C:\\something\\xyz.conf";
- An URL using Remote includes, such as:
include "https://user:[email protected]/restricted/opers.conf";
Commonly included files[edit]
UnrealIRCd ships with a number of configuration files out-of-the-box that you can choose to include:
modules.default.conf
: these contain all the modules, you almost always want to load this filebadwords.conf
: needed to make channel mode +G and user mode +G work ("bad words filter")spamfilter.conf
: spamfilter (example) configurationaliases/anope.conf
: recommended if you use anope services. This provides aliases such as the/NS
and/IDENTIFY
commands.aliases/atheme.conf
: same but for atheme services
Example[edit]
include "modules.default.conf"; /* Load all modules */ include "operclass.default.conf"; /* Default operclass blocks */ include "spamfilter.conf"; /* Spamfilter configuration */ include "badwords.conf"; include "help.conf";
/* CUSTOM example */ include "opers.conf"; /* Oper blocks are all in this file*/ include "links.conf"; /* All link blocks */
If you have enabled "Remote includes" (this is the default on Windows) then you can also use URL's:
include "https://www.example.com/network/links.conf"; /* HTTP example */ include "https://user:[email protected]/network/opers.conf"; /* HTTPS example WITH username/password (HTTP Basic Auth) */
If you use remote includes then we recommend to use https for security. Do not use http, as http allows 3rd parties to (theoretically) intercept/see your configuration file with all its secrets and sensitive information.
Loadmodule directive[edit]
With loadmodule you tell UnrealIRCd to load a particular module. See Modules for more information.
Normally you put include "modules.default.conf"; in your unrealircd.conf and only use loadmodule directly for loading 3rd party modules (if any).
Syntax[edit]
loadmodule <file-name-without-suffix>;
UnrealIRCd automatically adds the correct suffix (.DLL or .so) and will also automatically deal with modules/ vs src/modules/ directories.
Example[edit]
/* Just load all of UnrealIRCd's functionality (all 150+ modules) */ include "modules.default.conf";
/* If you want to load modules\m_something.dll */ loadmodule "m_something";
/* If you want to load modules/whatever.so */ loadmodule "whatever";
Note that for both examples UnrealIRCd will take care of any prefixing of the modules directory (modules/) and suffixing (.so or .dll).
/* If you want to load modules/third/something.so */ loadmodule "third/something";
Disabling modules[edit]
To disable certain functionality that is automatically loaded by modules.default.conf you could manually edit that file and comment the modules out (or delete the lines). However, these changes are overwritten on each upgrade!
A better option is to use the Blacklist-module directive which allows you to disable specific modules (any loadmodule lines for the module are ignored).
Blacklist-module directive[edit]
NOTE: Do not confuse this with the Blacklist block, which allows you to ban users based on DNSBL (DNS Blacklists)
With blacklist-module you can tell UnrealIRCd to never load a particular module. Any loadmodule lines for the module are ignored.
This can be used by advanced users to selectively disable modules that would otherwise be automatically loaded through conf/modules.default.conf. See under Example below for more information.
Syntax[edit]
blacklist-module <file-name-without-suffix>;
UnrealIRCd automatically adds the correct suffix (.DLL or .so) and will also automatically deal with modules/ vs src/modules/ directories.
Example[edit]
/* Just load all of UnrealIRCd's functionality (all 150+ modules) */ include "modules.default.conf"; /* Now selectively disable /ADMIN (admin) and usermode +B (usermodes/bot) */ blacklist-module "admin"; blacklist-module "usermodes/bot";
Note that disabling certain basic modules can have undesired effects. Carefully read the comments in conf/modules.default.conf. As an example, it would not be wise to disable m_quit.
See also[edit]
- Loadmodule directive - the way you load modules
- Modules - generic information about modules
- Deny module block - a feature to deny other servers from loading certain modules
Log block[edit]
NOTE: This explains the log block for UnrealIRCd 5. For UnrealIRCd 6 see here
The log block allows you to configure log files. You may have multiple log blocks.
If you have no log block at all then UnrealIRCd will use a default log block that only logs errors to ircd.log.
Syntax[edit]
log "<filename>" { flags { <flag>; <flag>; ... }; maxsize <max-file-size>; /* OPTIONAL */ };
filename[edit]
The filename specifies where to log to. Examples:
ircd.log
: a literal filenameircd.%Y-%m-%d.log
: a filename with strftime formatting. This example will give you a new log file for every day such as: ircd.2020-01-31.log. This requires UnrealIRCd 5.0.9 or newer.syslog
: if you want to write to *NIX syslog./var/log/unrealircd/ircd.log
: a full path (NOTE: be sure UnrealIRCd can write to the directory)
flags[edit]
The log::flags specifies which types of information will be in this log.
- errors: errors, but also lots of other information
- flood: users triggering food limits (New in UnrealIRCd 5.2.0+)
- kills: logs /kill notices
- tkl: logs info on *lines (/kline, /zline, etc), shuns and spamfilters (adding/removing/expire)
- connects: logs user connects/disconnects
- server-connects: logs server connects/squits
- oper: logs oper attempts (both failed and successful)
- sadmin-commands: logs /sa* (samode, sajoin, sapart, etc.) usage
- chg-commands: logs /chg* (chghost, chgname, chgident, etc.) usage
- oper-override: logs operoverride usage
- spamfilter: logs spamfilter matches
maxsize (Optional)[edit]
When the log file reaches a file size of maxsize the log file will be renamed to name-of-log-file.old (overwriting any previous such .old file). You can use K/M/G to specify kilobytes/megabytes/gigabytes.
Example[edit]
log ircd.log { flags { errors; kills; oper; tkl; }; maxsize 10M; }; log users.log { flags { connects; }; maxsize 10M; };
TLD block[edit]
By default everyone gets to see the same MOTD (ircd.motd file), rules (ircd.rules file), opermotd, etc... With the tld block you can show different files to a user depending on their hostname or IP. This is for example useful if you want different motds for different languages.
Syntax[edit]
tld { mask <hostmask>; motd <motd-file>; rules <rules-file>; shortmotd <shortmotd-file>; opermotd <opermotd-file>; botmotd <botmotd-file>; channel <channel-name>; options { ssl; }; };
The tld::mask is a user@host mask that the user's username and hostname must match. The tld::motd, tld::shortmotd, tld::opermotd, tld::botmotd, and tld::rules specify the motd, shortmotd, opermotd, botmotd, and rules file, respectively, to be displayed to this hostmask. The tld::shortmotd, tld::opermotd, and tld::botmotd are optional. tld::channel is optional as well, it allows you to specify a channel that this user will be forced to join on connect. If this exists it will override the default auto join channel. The tld::options block allows you to define additional requirements, currently only tld::options::ssl which only displays the file for SSL users, and tld::options::remote which only displays the file for remote users, exists.
TLD entries are matched upside down
Example[edit]
tld { mask *@*.fr; motd "ircd.motd.fr"; rules "ircd.rules.fr"; };
Ban nick block[edit]
The ban nick block allows you to disable use of a nickname on the server.
Syntax[edit]
ban nick { mask <nickname>; reason <reason-for-ban>; };
The ban::mask allows wildcard masks to match multiple nicks, and ban::reason allows you to specify the reason for which this ban is placed. Most commonly these blocks are used to ban usage of the nicknames commonly used for network services.
Example[edit]
ban nick { mask "*C*h*a*n*S*e*r*v*"; reason "Reserved for Services"; };
Ban user block[edit]
This block allows you to ban a user@host mask from connecting to the server. This is the same as adding a /KLINE on IRC.
Syntax[edit]
ban user { mask <hostmask>; reason <reason-for-ban>; };
The mask is a wildcard string of a user@ip or user@host to ban, it can also be an Extended server ban. The reason is the reason for a ban being placed.
IMPORTANT: A ban user { } block (and a KLINE) is only a local ban, therefore the user may still connect to other servers on the network.
Example[edit]
ban user { mask *tirc@*.saturn.bbn.com; reason "Idiot"; };
Ban IP block[edit]
This block bans an IP from accessing the server. This is the same as adding a /ZLINE on IRC.
Syntax[edit]
ban ip { mask <ipmask>; reason <reason-for-ban>; };
The mask parameter is an IP which may contain wildcard characters, and reason is the reason why this ban is being placed.
Important points[edit]
All ban ip { } blocks and ZLINEs are processed very early. When the TCP/IP connection is accepted it is immediately closed with the ban reason sent as an error to the user. All this is done before DNS lookups, ident lookups, and before any TLS handshake.
Therefore:
- You can only use IP addresses to place bans on
- Clients using SSL/TLS almost always won't display the actual error message
- Servers trying to link in to this server are also affected by ZLINEs
In many cases it is better to use the ban user { } block or KLINE instead. The reason ban ip { } and ZLINE exist is because it can be helpful if you are under very heavy drone/flood attacks where the server has to reject tens of thousands of connections per second.
Example[edit]
ban ip { mask 192.168.1.*; reason "Get a real ip u lamer!"; };
Ban server block[edit]
This block disables a server's ability to connect to the network. If the server links directly to your server, the link is denied. If the server links to a remote server, the local server will disconnect from the network.
Syntax[edit]
ban server { mask <server-name>; reason <reason-for-ban>; };
The ban::mask field specifies a wildcard mask to match against the server attempting to connect's name, and ban::reason specifies the reason for which this ban has been placed.
Example[edit]
ban server { mask broken.server.my.network.com; reason "Its broken!"; };
Ban realname block[edit]
The ban realname block allows you to ban a client based on the GECOS (realname) field. This is useful to stop clone floods because often clone bots use the same realname.
Syntax[edit]
ban realname { mask <realname-mask>; reason <reason-for-ban>; };
The ban::mask specifies the realname which should be banned. The mask may contain wildcards. The ban::reason specifies the reason why this ban is being placed.
Example[edit]
ban realname { mask "Bob*"; reason "Bob sucks!"; };
Ban version block[edit]
The ban version block allows you to ban a client based on the IRC client software they use. This makes use of the clients CTCP version reply. Therefore if a client does not send out a CTCP version, the ban will not work. This feature is intended to allow you to block malicious scripts.
Syntax[edit]
ban version { mask <version-mask>; reason <reason-for-ban>; action [kill|tempshun|shun|kline|zline|gline|gzline]; };
The ban::mask specifies the version which should be banned. The mask may contain wildcards. The ban::reason specifies the reason why this ban is being placed. You can also specify ban::action, kill is the default, tempshun will shun the specific user connection only and would work very effective against zombies/bots at dynamic IPs because it won't affect innocent users. shun/kline/zline/gline/gzline will place a ban of that type on the ip (*@IPADDR), the duration of these bans can be configured with set::ban-version-tkl-time and defaults to 1 day.
Example[edit]
ban version { mask "*SomeLameScript*"; reason "SomeLameScript contains backdoors"; };
ban version { mask "*w00tZombie*"; reason "I hate those hundreds of zombies"; action zline; };
Except ban block[edit]
The except ban block allows you to exempt users from things like GLINEs, blacklists, spamfilter restrictions, etc. This is useful when you want an ISP banned, but still want specific users to be able to connect. IRCOps also often exempt their own IP to make sure they are never accidentally banned.
You can also use the /ELINE
command on IRC to add/remove exemptions dynamically (which are stored in a permanent database, tkldb).
Syntax[edit]
except ban { mask <host-or-ipmask>; type { .... }; /* this is optional */ };
The mask specifies the mask to be exempt from banning. It is recommended to use IP addresses in the mask if possible (eg: *@192.168.*) rather than hostnames (eg: *@*.someisp.xx).
In the mask you can use a hostname, or even Extended server bans, but then the except ban { } will be ineffective against exempting from ZLINE and GZLINE for technical reasons (when bans and except ban { } blocks are processed no DNS lookup and no ident lookup has been done yet).
Valid types are:
Type | Meaning |
---|---|
kline | Exempt from K-Line (KLINE) |
gline | Exempt from G-Line (GLINE) |
zline | Exempt from Z-Line (ZLINE) |
gzline | Exempt from Global Z-Line (GZLINE) |
shun | Exempt from Shun (SHUN) |
spamfilter | Can bypass spamfilters |
qline | Can bypass banned nick restrictions (QLINE) |
blacklist | Don't do any blacklist checking |
connect-flood | Exempt from set::anti-flood::connect-flood |
handshake-data-flood | Do not place ZLINE when client is flooding before registration phase |
antirandom | Bypass antirandom module |
antimixedutf8 | Bypass antimixedutf8 module |
ban-version | Bypass ban version { } blocks |
all | All of the above, except qline |
If you do not specify any type, then the exception defaults to: kline + gline + zline + gzline + shun.
Example[edit]
except ban { mask *@192.168.*; mask *@192.0.2.5; } except ban { mask { *@192.168.*; *@10.*; *@127.*; } }
Except TKL block[edit]
The except tkl block allows you to specify a user@host that will override a tkl ban placed on a broader host. This is useful when you want an ISP banned, but still want specific users to be able to connect.
NOTE: In UnrealIRCd 5 this block no longer exists, see Except ban block instead
Syntax[edit]
except tkl { mask <hostmask>; type <type>; type { <type>; <type>; ... }; };
The except::mask directive specifies the user@host mask of the client who will be allowed to connect. The except::type specifies which type of ban this should override. Valid types are gline, gzline, qline, gqline, shun, and all, which make an exception from Glines, Global Zlines, Qlines, Global Qlines, shuns, and all bans except KLINE/ZLINE. If the type {} format is used, multiple types may be specified.
NOTE: If you want to exempt a host completely from all possible bans (except spamfilter), then you need both an 'except ban' and an 'except tkl' block
Example[edit]
except tkl { mask [email protected]; type gline; };
Except throttle block[edit]
The except throttle block allows you to specify an IP mask that will not be affected by set::anti-flood::connect-flood (the throttling system).
Note that connection throttling is an important security measure. It provides primary and secondary protection against DoS, flood and brute force attacks, both for handshake and fully registered connections. If you exempt connections from this then you severely degrade these protections. You should only do so for IP's you trust.
Syntax[edit]
except throttle { mask <ipmask>; };
The except::mask specifies an IP mask that will not be banned because of throttling.
Example[edit]
except throttle { mask 192.168.1.*; } except throttle { mask { 192.168.*; 10.*; 127.*; } }
Require authentication block[edit]
The require authentication block allows you to specify IP/hosts of users that need to authenticate to a valid services account during connecting. This could, for example, be used to ban an ISP that is known for troublemakers, while still allowing legit users in from that IP if they have a valid account. Or, it can be used to simply require authentication for all users.
Authentication by the user is done either by using SASL (the recommended method) or via authprompt that will ask non-SASL users to authenticate interactively by typing /AUTH nickname:password
.
Syntax[edit]
require authentication { mask <hostmask>; reason <reason-for-ban>; };
The mask is a wildcard string of a user@host to ban and the reason is the reason for the requirement. The reason is shown when the user is trying to connect without authentication.
Note that require authentication blocks configures a local requirement. The user may still connect to other servers on the network.
Example[edit]
require authentication { mask *@*.tld; reason "Too many abusers from this country, please authenticate"; };
Similar functionality[edit]
The same can be achieved online (on IRC) by adding a "soft kline":
/KLINE %*@*.tld Too many abusers from this country, please authenticate
The % prefix (percent symbol) will make it only ban unauthenticated users.
See also the Authentication article for all the different ways and possibilities to force authentication.
Deny DCC block[edit]
The deny dcc block allows you to specify a filename which will not be allowed to be sent via DCC over the server. This can be useful in helping stop distribution of trojans and viruses.
Syntax[edit]
deny dcc { filename <file-to-block>; reason <reason-for-ban>; soft [yes|no]; };
The deny::filename parameter specifies a wildcard mask of the filename to reject sends of, and deny::reason specifies the reason why this file is blocked.
There's also a deny::soft option, if set to 'yes' the dcc is blocked unless the user explicitly allows it via /DCCALLOW +nickname-trying-to-send. See dccallow.conf for a good example configuration for dccallow.
Example[edit]
deny dcc { filename virus.exe; reason "This is a GD Virus"; };
deny dcc { filename "*.exe"; reason "Executable content"; soft yes; };
Allow DCC block[edit]
The allow dcc blocks allows you to specify exceptions over the Deny DCC block.
Syntax[edit]
allow dcc { filename "<filename-mask>"; soft [yes|no]; };
The filename specifies the name of the file, wildcards are permitted. If allow dcc::soft is set to 'yes' it applies to 'soft dcc bans' list, if set to 'no' it applies to the normal ('hard') dcc bans.
Example[edit]
allow dcc { filename "*.jpg"; /* Images are usually safe */ soft yes; };
Deny version block[edit]
This block allows you to deny a server from linking in, based on the version of Unreal it is running and what compile time options it has.
Not to be confused with the Ban version block (which bans clients based on their CTCP VERSION reply!)
Syntax[edit]
deny version { mask <server-name>; version <version-number>; flags <compile-flags>; };
The format for this block is somewhat complex but isn't too hard to figure out. The deny::mask directive specifies a wildcard mask of the server name this applies to. The deny::version specifies the protocol number of the version this refers to.
For example, 3.0 is 2301, 3.1.1/3.1.2 is 2302, 3.2 is 2303. The first character of this parameter can be one of the following >, <, =, !. This character tells the IRCd how to interpret the version. If the first character is a > then all version greater than the specified version are denied, if it is a < all versions lower are denied, if it is an = only that version is denied, and if it is a ! then all versions except the specified are denied. The deny::flags directive allows you to specify what compile time flags the server may or may not have. The flags are arranged one after the other with no separation between, if a character is prefixed by a ! then it means the server may not have this flag compiled into it, if it does not have a ! prefix, then it means the server must have this flag compiled.
Deny link block[edit]
This block allows you to use specific rules to deny a server from linking. It's slightly complex and typically only used on networks with 3 or more servers.
Syntax[edit]
deny link { mask <server-name> rule <crule-expression> type <type-of-denial> }
The mask specifies a wildcard mask of the server name to apply this rule to.
The rule directive is very complex. A crule expression allows you to control the link in great detail, and it is set up like a programming expression. Four operators are supported, connected(<servermask>), returns true if a server matching servermask is connected, directcon(<servermask>), returns true if the server matching servermask is directly connected to this server, via(<viamask>,<servermask>), returns true if a server matching servermask is connected by a server matching viamask, and directop(), which returns true if the operator issuing a /connect is directly connected to this server. These operators can be combined using && (and) and || (or), items may also be enclosed in parenthesis to allow grouping. In addition, an operator preceded with a ! checks if the operator returned false. If the entire expression evaluates to true, then the link is denied.
The type allows two different values: auto (only applies to autoconnects, /connect will still work), and all (applies to all connection attempts).
Example[edit]
NOTE: This example is for UnrealIRCd 5.2.1 and later
deny link { mask { * !foobar.hub } rule !connected(foobar.hub) type all }
Deny channel block[edit]
The deny channel block allows you to disallow users from joining specific channels.
Syntax[edit]
deny channel { channel "<channel-mask>"; reason <reason-for-ban>; redirect "<channel-name>"; // optional mask "<ip/hostmask>"; // optional warn [on|off]; // optional };
There are two required items: channel is a wildcard mask matching channels the users may not join and reason specifies the reason why the channel may not be joined.
Optionally, you may specify redirect. If this is specified, when a user tries to join a channel that matches deny::channel, he/she will be redirected to the redirect channel.
mask makes this deny channel block only apply to users matching the specified ip/hostmask (eg: 192.168.*).
Finally, there is warn which defaults to off. When set to on an opernotice will be generated (to the EYES snomask) if the user tries to join the denied channel.
Example[edit]
deny channel { channel "#unrealsucks"; reason "No it doesn't!"; }; deny channel { channel "#*teen*sex*"; reason "You == dead"; warn on; }; deny channel { channel "#operhelp"; reason "Our network help channel is #help, not #operhelp"; redirect "#help"; };
Allow channel block[edit]
The allow channel block allows you to specify specific channels that users may join. It is used to exempt channels that were banned through the Deny channel block.
Syntax[edit]
allow channel { channel "<channel-mask>"; mask "ip/hostmask"; // optional! };
channel specifies the wildcard mask of the channels which may be joined.
The optional mask makes it possibly to apply this block only to certain users. It's rarely used since bans are a better method of handling channel access.
Example[edit]
/* Deny joining all channels with 'help' in it */ deny channel { channel "#*help*"; reason "We only have one official help channel. Please join #help instead."; }; /* Allow #help */ allow channel { channel "#help"; }; /* Allow #lanhelp only to 192.168.* users */ allow channel { channel "#lanhelp"; mask 192.168.*; };
Vhost block[edit]
The vhost block allows you to specify a login/password that can be used with the /VHOST command on IRC to obtain a fake hostname.
NOTE: Most people use Services instead, which often provide a HostServ bot or capability. This basically allows you to centrally manage vhosts.
Syntax[edit]
vhost { vhost <vhost>; mask { <hostmask>; <hostmask>; ... }; login <login-name>; password <password>; swhois "<swhois info>"; };
The vhost::vhost parameter can be either a user@host or just a host that the user will receive upon successful /vhost. The vhost::mask block contains a user@host that the user must match to be eligible for the vhost, see Mask item for more information. The vhost::login in the login name the user must enter and vhost::password is the password that must be entered. The vhost::password allows you to specify a password or other authentication type. Lastly vhost::swhois allows you to add an extra line to a users whois, exactly as it does in the Oper Block oper::swhois.
Example[edit]
vhost { vhost my.own.personal.vhost.com; mask { *.isp.com; 192.168.*; 127.*; }; login mynick; password mypassword; swhois "Im Special"; };
Badword block[edit]
The badword block allows you to manipulate the list used for user and channel mode +G to strip "bad words".
Syntax[edit]
badword <type> { word <text-to-match>; replace <replace-with>; action <replace|block>; };
The badword:: specifies the type, which decides what messages this badword filter applies to. The valid types are:
- channel: applies to channels with mode +G.
- message: applies to private messages (not in-channel messages) sent by a user with the +G usermode.
- all: applies to both channel and message
The badword::word can be a simple word or a regular expression we should search for. The badword::replace is what we should replace this match with. If badword::replace is left out, the word is replaced with <censored>. The badword::action defines what action should be taken if this badword is found. If you specify replace, then the badword is replaced, if you specify block, then the entire message is blocked. If you do not specify a badword::action, replace is assumed.
Example[edit]
badword channel { word shit; replace shoot; };
ULines block[edit]
The ulines block lets you define certain servers as having extra abilities. This should only be used for servers such as services and should never match a regular UnrealIRCd server (otherwise you'll create security issues).
Syntax[edit]
ulines { <server-name>; <server-name>; ... };
Each entry is the name of the server which will receive the extra abilities.
Example[edit]
ulines { services.mynetwork.com; stats.mynetwork.com; };
Link block[edit]
If you are linking servers we recommend you to follow our Tutorial: Linking servers instead. The link block is, however, shown below for reference.
Syntax[edit]
link <server-name> { /* Below, often you will have both an incoming { } and outcoming { } sub-block. * However you may also choose to have only 1 of them if you always link in the same direction. */ incoming { mask 1.2.3.*; }; outgoing { bind-ip <ip-to-bind-to>; /* optional now */ hostname irc1.some.net; /* may also be an IP */ port 6697; options { tls; autoconnect; }; /* optional, but recommended */ tls-options { protocols "TLSv1.2"; }; /* optional, only set this if you know what you are doing. */ }; password "some-password"; /* either a plaintext password that's the same for both sides or an SSL fingerprint (or certificate) */ verify-certificate [yes|no]; /* optional, default is 'no' but is less secure */ hub <hub-mask>; /* optional */ leaf <leaf-mask>; /* optional */ leaf-depth <depth>; /* optional */ class <class-name>; ciphers <ssl-ciphers>; /* optional */ options { quarantine; /* is a generic option. optional. */ }; };
Required items[edit]
Note that you need link::incoming and/or link::outgoing. So at least one of them is required.
server-name[edit]
The server-name in your link <server-name> { block specifies the name of the server, that is the name you have specified in me::name on the other side of the link.
incoming[edit]
incoming::mask[edit]
Only servers matching this (IP) mask may use this link block.
outgoing[edit]
outgoing::hostname[edit]
Hostname of the server to connect. This could be the same as the server-name, but it may also be an IP or a different DNS name.
outgoing::port[edit]
Port of the other server to connect to
outgoing::options (optional)[edit]
The following two options are available:
- tls: connect to an SSL/TLS-only-port. If you use this, then be sure that the outgoing::port you specify is in fact a SSL/TLS-only port. Meaning: the server on the other side of the link must have listen::options::tls turned on for that port.
- autoconnect: automatically connect to the server (or try to every XX seconds, anyway)
- insecure: by default UnrealIRCd will attempt to 'upgrade' a connection to use SSL/TLS in order to get encrypted server links. This disables that functionality. Not recommended!
outgoing::tls-options (optional)[edit]
Valid options are all the SSL settings that also exist in set::tls. For example you can set the permitted SSL protocols and ciphers:
link xyz { ... outgoing { tls-options { protocols "TLSv1.2"; ciphers "AES256"; }; }; };
outgoing::bind-ip (optional)[edit]
Bind to this IP before connecting to the other server. The IP to bind to must be available on the machine (must not be an IP of another machine).
password[edit]
Password or other method to use to verify the authenticity of the link. This must be either: 1) a plaintext password that must be the same on both sides of the link, OR 2) an SSL/TLS fingerprint, which is our recommended and safest way to link, see our Tutorial.
verify-certificate[edit]
When set to 'yes' this will enable SSL/TLS certificate checking to make sure that:
- The SSL/TLS certificate of the server you are linking with is valid and issued by a trusted Certificate Authority (eg: Let's Encrypt or some bought certificate)
- The name in the link block matches the name(s) in the certificate (eg: if you're linking with irc1.test.net and it presents a certificate for irc2.someotherdomain.org it will fail)
Enable this if you (can) meet these criteria. It will protect you from active traffic interception attacks.
hub[edit]
The value is a mask of what servers this hub may connect (ex: *.my.net).
leaf[edit]
The value is a mask of what servers this hub may not connect.
leaf-depth[edit]
The value specifies the depth (number of hops) this server may have beneath it. For example, 1 means the server can't have any links under it (a leaf), 2 means it can link servers but those servers can't link anything under them (that is, this hub can only link leaves). A value of 0 means no limit, and is the default.
class[edit]
The class this server is put into (see Class block), often a separate server class is used for this.
options[edit]
There's only one generic option:
- quarantine: This link may have no IRC Operators on it. If someone attempts te become OPER on the link they are de-oper'ed. Note that this does not provide true security: a person controlling a server can still modify the source and load any modules they want, thus still 'be able to do anything' if they have bad intentions.
For other link options see the link::outgoing block.
Example[edit]
Alias block[edit]
Syntax[edit]
Standard alias[edit]
alias <name> { target <nick-to-forward-to>; type <type-of-alias>; spamfilter <yes|no>; };
(Note that <name> is referred to using "alias::")
(Note: see a description of the standard alias files UnrealIRCd has)
The alias block [standard alias] allows you to forward a command to a user, for example /chanserv sends a message to the user chanserv.
alias:: specifies the name of the command that will be the alias (eg: chanserv)
alias::target is the nickname or channel it will forward to. If alias:: would be the same as the target, alias::target may be left out.
alias::type specifies the type of alias, valid types are
- services (the user is on the services server),
- stats (the user is on the stats server),
- normal (the user is a normal user on any server),
- channel (the target is a channel name), and
- command (this is not a "standard alias", see below).
alias::spamfilter (optional) causes the spamfilters will be checked if set to "yes" (default is 'no').
Command alias[edit]
alias <name> { /* For aliases to be sent to users/channels */ format <regex-expression> { target <nick-to-forward-to>; type <type-of-alias>; parameters <parameter-string>; }; /* For 'real aliases' */ format <regex-expression> { command <command>; type real; parameters <parameter-string>; }; /* Etc... You can have as many format blocks as you wish.. */ format <regex-expression> { ... }; type command; spamfilter <yes|no>; };
When an alias block has alias::type set to command, as shown above, it becomes a command alias. When the alias block is used in this format, it is much more flexible. For example, you could create an /identify alias.
alias:: is the name of the alias command as in standard alias block form (above).
alias::format specifies a regular expression which is matched against the text sent to the alias command. The sub-entries of the first matching alias::format will be used. Thus, you may have multiple alias::formats to make a command do different things depending on the text sent to it.
alias::format::target is the target to forward this alias to. This value is not used if alias::format::type is "real".
alias::format::type specifies the type of the alias that the message should be forwarded to. In addition to the types mentioned previously in "Syntax [standard alias]", "real" may be specified here for a "real alias" (a "real alias" is an alias that may be rewritten to something other than a PRIVMSG).
alias::format::parameters (for "real aliases") is what will be sent as the parameters to this alias. To specify one of the parameters given to the command alias specify % followed by a number. For example, %1 is the first parameter. To specify all parameters from a given parameter to the end, use % followed by the number and a -. For example, %2- returns all parameters from the second through the last. Additionally, you may specify %n which will be replaced by the nickname of the user who executed the command.
For examples of using the alias block in the command format, see aliases/*.conf.
Help block[edit]
The help block allows you to create entries for use with the /HELPOP command.
Syntax[edit]
help <name> { <text-line>; <text-line>; ... };
The help:: is the value that must be passed to /helpop as a parameter, if the help:: is left out, then it will be used when no parameter is passed to /helpop. The entries for the help block are the text that will be displayed to the user when requesting the /helpop.
Default help[edit]
Pretty much everyone would want to just include the help.conf included in UnrealIRCd:
include "help.conf";
Example[edit]
help something { "This is some really useful text."; "I don't know what to say..."; };
Official-channels block[edit]
Official channels are shown in /LIST even if no users are in the channel.
IMPORTANT: This feature is DEPRECATED. Instead, you should set channel mode +P
(Permanent channel). This allows you to dynamically add and remove channels including all settings such as: topic, modes (regular modes and bans/exempts/invex), etc. All this information is stored in a database by the channeldb module (loaded by default).
Syntax[edit]
official-channels { "#channel" { topic "The default topic"; }; };
The topic is optional and is only shown in /LIST if the channel has 0 users.
Example[edit]
official-channels { "#Help" { topic "The official help channel, if nobody is present type /helpop helpme"; }; "#Home"; "#Main" { topic "The main channel"; }; };
Spamfilter block[edit]
The spamfilter block allows you to add local spam filters (not network-wide). See the Spamfilter article for more information about spamfilters.
Syntax[edit]
spamfilter { match-type [simple|regex|posix]; match <text>; target { <target(s)> }; action <action>; reason <reason>; ban-time <time>; };
Please see the Spamfilter article for an explanation on all these fields. They are exactly the same as the /SPAMFILTER command. See also the examples in the same article.
For even more examples have a look at spamfilter.conf in UnrealIRCd.
Blacklist block[edit]
<translate> The blacklist block allows you to use a DNS blacklist (DNSBL). Every user that connects to your server will be checked against the blacklists specified.
Syntax[edit]
blacklist <name> { dns { name <blacklist hostname>; type <record|bitmask>; reply { <permitted replies> }; }; action <action>; reason <reason>; ban-time <time>; };
First of all, each blacklist has a <name>, which is just a short name for the blacklist block.
Currently the only supported type of blacklists are DNS blacklists. This is configured via blacklist::dns which consists of three items: blacklist::dns::name specifies the blacklist to use (eg: rbl.efnetrbl.org). blacklist::dns::type defines if the blacklist is of type record or bitmask, your blacklist should provide this info, if in doubts then use record. Finally, blacklist::dns::reply configures which DNS replies are considered a 'match'. Consult the documentation of the blacklist you use, as they are blacklist-specific!
The remainder of the blacklist block defines what should be done upon a match: blacklist::action specifies an action, such as kline (see Actions for a full list). blacklist::ban-time defines after how much time the *LINE (if any) should be removed. blacklist::reason specifies the kill/ban reason shown to the user. You can use the variables $ip and $server in this field, which will be replaced with the IP address of the banned user and the name of the IRC server respectively.
Example[edit]
These are the two most common blacklists that users use:
blacklist efnetrbl { dns { name rbl.efnetrbl.org; type record; reply { 1; 4; 5; }; }; action gline; ban-time 24h; reason "Proxy/Drone/TOR detected. Check https://rbl.efnetrbl.org/?i=$ip for details."; }; <!--T:7--> blacklist dronebl { dns { name dnsbl.dronebl.org; type record; reply { 3; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; }; }; action gline; ban-time 24h; reason "Proxy/Drone detected. Check https://dronebl.org/lookup?ip=$ip for details."; };
See also[edit]
- Except blacklist block - to exempt an IP from blacklist checks
</translate>
Secret block[edit]
The secret { } block is used to define passwords (or ways to retrieve them) for encrypted database storage.
You refer to these secrets block(s) from the ::db-secret configuration item of the modules that use it.
This feature only exists in UnrealIRCd 5.2.0+
Modules that support encrypted database storage[edit]
The following modules support encrypted database storage and can be used to refer to secret { } blocks:
- history module via set::history::channel::db-secret (includes a full example)
- reputation module via set::reputation::db-secret
- tkldb module via set::tkldb::db-secret
- channeldb module via set::channeldb::db-secret
Password requirements[edit]
All passwords must conform to the following password complexity requirements:
- must be 10 characters or longer
- must contain at least one lowercase letter
- must contain at least one uppercase letter
- must contain at least one digit
Why the password needs to be known[edit]
By definition, the password (key) to encrypt and decrypt needs to be known somehow. It is impossible to encrypt/decrypt data if you don't have the correct key, as that is the whole point of encryption. This is not an UnrealIRCd limitation but true for any system that uses symmetric encryption like AES. There is no way around this.
You can put your password directly in the configuration file but that provides only marginal security. You don't have to do this! UnrealIRCd provides multiple options for the secret blocks, including an option where you have to type the password and it is never stored in plaintext in any file. All options are explained below with their pros and cons. Just go through them and make a decision on what you find the most suitable option for your network.
Syntax & Examples[edit]
The password can be specified directly in the configuration file or fetched from elsewhere.
Each secret block has a name:
secret name-of-secret {
This name is referred to from other places in the configuration file.
You can use a single secret block and use that same secret block from multiple places (channeldb, tkldb, etc), OR you can have multiple secret blocks (one for each purpose). It's up to you to decide.
Directly in the configuration file[edit]
This is the easiest, but the least secure method:
secret channeldb { password "somepassword"; }
From an external file[edit]
This way you can store the password in a text file in a different place, eg on a different disk, USB stick, etc.. something that isn't stored or backed up altogether with the rest of your unrealircd data.
The file only needs to exist during booting UnrealIRCd, so you could for example connect an USB stick when booting UnrealIRCd and then pull it out once booted. You can rehash the IRCd without the file being needed.
secret channeldb { password-file "/home/xyz/secret.txt"; }
The file (secret.txt in this example) should then contain 1 single line with the password.
Entering on-boot in a terminal[edit]
This is the most secure method. It requires you to type the password every time UnrealIRCd is (re)started. After that, you can rehash the IRCd without having to re-enter the key.
The downside is that you can no longer start UnrealIRCd automatically via cron or automatic boot scripts. You will ALWAYS need to start UnrealIRCd manually on a terminal (eg via SSH).
secret channeldb { password-prompt; }
WebIRC block[edit]
The webirc block allows you to configure host spoofing for WebIRC / CGI:IRC gateways you trust, see WebIRC Support
Syntax[edit]
webirc { mask 1.2.3.4; /* ip or host mask */ password <password>; };
mask is checked against the client (the WebIRC or CGI:IRC gateway) that is trying to connect.
password is the webirc password
How to configure with method 'webirc' (recommended method)[edit]
In both your web IRC client software and UnrealIRCd you have to set the same webirc password.
Example with KiwiIRC[edit]
The example below configures KiwiIRC and UnrealIRCd. Note that this is just an example, if you use something other than KiwiIRC you edit that instead of the KiwiIRC-side.
KiwiIRC-side (old and outdated)[edit]
Edit kiwiirc's config.js as follows (note: this is NOT a complete configuration file, it just shows 3 important sections):
// WebIRC passwords enabled for this server conf.webirc_pass = { "irc1.yournetwork.org": "ThisIsMySecretWebIRCPassword" }; // Default settings for the client. These may be changed in the browser conf.client = { server: 'irc1.yournetwork.org', port: 6697, ssl: true, channel: '#test', nick: 'kiwi_?' }; // or use conf.restrict_server etc... to achieve the same effect (see example config.js file). // What matters is that the server name in conf.client or conf.restrict_server // match the server name in conf.webirc_pass (and use the right password). // So be sure to replace BOTH the irc1.yournetwork.org instances with the same server name. // Now something else... "send ip as username".... // Be sure *NOT* to list your server here !!!! // If you add it here, then the IP will show up in the ident. This is NOT what you want // as the IP is already sent via WEBIRC. Doing so would reveal the users' IP to everyone which is bad. conf.ip_as_username = [ "xxxx" ];
KiwiIRC-side (new aka nextclient)[edit]
Edit kiwiirc's webircgateway config.conf as follows (note: this is NOT a complete configuration file):
// WebIRC passwords enabled for this server [upstream.1] webirc = "xxxx"
UnrealIRCd-side[edit]
Then, in your unrealircd.conf you add a webirc block:
webirc { mask 127.0.0.1; password "ThisIsMySecretWebIRCPassword"; }; except ban { mask 127.0.0.1; type { connect-flood; handshake-data-flood; blacklist; }; };
The Except ban block block is highly recommended. This will ensure your webirc gateway is not seen as connection flooding and the blacklist exception will make it connect faster. If you don't have an except ban block for your webirc gateway then users will not be able to connect during peak hours or after a server restart.
Set block[edit]
<translate> The set block is used to tweak and configure the server settings.
Sharing settings[edit]
If you (already) run multiple IRC servers then have a look at Sharing settings between servers to ease the burden when updating settings. The set block is an ideal candidate to be shared.
Syntax used in this documentation[edit]
As described in Configuration file syntax we will refer to settings like set::options::hide-ulines or set::auto-join. You should NOT write set::options::hide-ulines
in the configuration file! It's just a shorthand, an abbreviation. What we actually mean is that you should write them out like this:
set { options { hide-ulines; }; auto-join "#something"; };
Or you could put them in separate set blocks like this:
set { auto-join "#something"; }; <!--T:228--> set { options { hide-ulines; }; };
Or even just:
set { options { hide-ulines; }; }; set { auto-join "#something"; };
If the above is unclear, then maybe have another read at the Configuration file syntax article.
It is perfectly fine to have multiple set { } blocks! In fact it's quite normal to have one block with network-wide settings, and another set block with server-specific settings. We generally don't recommend having more than 2 set blocks because then it is too easy to loose track of them ("what settings is where?"), but technically it is perfectly possible and permitted.
Available settings[edit]
set::kline-address[edit]
Syntax: set::kline-address <email-address>
The email address that K:line questions should be sent to. This value must be specified. See also set::reject-message::kline if you want a more custom disconnect message on KLINE/ZLINE.
set::gline-address[edit]
Syntax: set::gline-address <email-address>
The email address that G:line questions should be sent to. See also set::reject-message::gline if you want a more custom disconnect message on GLINE/GZLINE.
set::modes-on-connect[edit]
Syntax: set::modes-on-connect <+modes>
The modes that will be set on a user at connection.
set::modes-on-oper[edit]
Syntax: set::modes-on-oper <+modes>
The modes that will be set on a user when they /oper.
set::snomask-on-oper[edit]
Syntax: set::snomask-on-oper <+modes>
The snomask (server notice mask) that will be set on a user when they /OPER. The default value is +kscfvGqobS
. See Snomasks for the full list.
set::modes-on-join[edit]
Syntax: set::modes-on-join <+modes>
The modes that will be set on a channel when it is first created. Not all modes can be set using this command.
set::level-on-join[edit]
Syntax: set::level-on-join <none|voice|halfop|op|protect|owner>
The mode that a user will get when he's the first to join a channel. The default is 'op' (channel operator).
set::restrict-usermodes[edit]
Syntax: set::restrict-usermodes <modes>
Restrict users to set/unset the modes listed here (don't use + or -). For example you can set +G in modes-on-connect and G in restrict-usermodes, that way you can force all users to be +G and unable to do -G.
set::restrict-channelmodes[edit]
Syntax: set::restrict-channelmodes <modes>
Restrict users to set/unset the channelmodes listed here (don't use + or -).
For example you can set +G in modes-on-join and G in restrict-channelmodes, that way you can force all (new) channels to be +G and unable to do -G.
IMPORTANT: Users may evade these restrictions via the MLOCK
command from Services. If you use anope, we suggest you restrict the modes there too via anope's nomlock feature, see the example below.
Example to force and restrict channel modes[edit]
This will make it so all channels are always +ntG
and that users cannot set +L
:
In UnrealIRCd:
set { modes-on-join "+ntG"; restrict-channelmodes "ntGL"; }
In anope, in the module chanserv block:
nomlock = "L" require = "ntG"
Remember that the channel modes on the Anope side will only be applied to newly registered channels.
set::restrict-extendedbans[edit]
Syntax: set::restrict-extendedbans <types|*>
Don't allow users to use any extended bans ("*") or disallow only certain ones (eg: "qc").
set::restrict-commands[edit]
This allows you to restrict a certain command to users depending on: how long they are connected, if they are identified to Services or if they are using WebIRC block, and their reputation score. IRCOps can always bypass any restrictions.
You can restrict any command, simply by specifying the command. There are also 4 special types: private-message, private-notice, channel-message and channel-notice (that under the hood will restrict PRIVMSG and NOTICE).
Example configuration:
set { restrict-commands { /* completely disable this command: */ somecommand { } <!--T:325--> /* only allow this for identified users: */ links { exempt-identified yes; } <!--T:326--> /* only allow this for webirc users: */ join { exempt-webirc yes; } <!--T:327--> /* impose a connect-delay restriction, but with exemptions */ list { connect-delay 60; exempt-webirc yes; exempt-identified yes; exempt-reputation-score 24; } <!--T:328--> /* impose a connect-delay restriction with no exemptions (except ircops) */ invite { connect-delay 120; } private-message { connect-delay 10; } } }
The option connect-delay will impose the restriction for the specified time (eg: 60 meaning 60 seconds). This can be useful against spammers since they usually spam quickly after connecting (before they are catched by opers or channel operators). If you don't set a connect-delay then the command will be disabled for all users, unless you specified any exemptions (see next). The value must be between 1 and 3600 seconds.
The option exempt-identified will exempt the restrictions to users who are identified to Services, in other words: are authenticated users. These users normally went through a registration procedure that provides sufficient (but minimal) trust that they can use the command straight away, without any connect delay restrictions.
The option exempt-webirc will exempt the restrictions to users who are connecting via a WebIRC block. If you set this option, then you trust such users enough, that they can use the command straight away, without any connect delay restrictions.
The option exempt-tls will exempt the restrictions to users who are connecting via a SSL/TLS. If you set this option, then you trust such users enough, that they can use the command straight away, without any connect delay restrictions.
The option exempt-reputation-score means that if the reputation score is equal or above this number then the user bypasses this restriction.
set::auto-join[edit]
Syntax: set::auto-join "<channels>"
The channel(s) a user will be forced to join at connection. To specify more than one channel use a comma separated list. [Note: don't forget to add quotes, like: auto-join "#chan"]
set::oper-auto-join[edit]
Syntax: set::oper-auto-join "<channels>"
The channel(s) a user will be forced to join when they /oper. To specify more than one channel use a comma separated list. [Note: don't forget to add quotes, like: oper-auto-join "#chan"]
set::anti-spam-quit-message-time[edit]
Syntax: set::anti-spam-quit-message-time <timevalue>
A time value specifying the length of time a user must be connected for before a /quit message will be displayed. Used to prevent spam. A time value is a numeric string with d meaning days, h meaning hours, m meaning minutes, and s meaning seconds, for example 1d2h3m means 1 day, 2 hours, 3 minutes.
set::prefix-quit[edit]
Syntax: set::prefix-quit <text-to-prefix-quit>
Sets the text that will be used to prefix a quit message. If this value is set to 0 then the standard "Quit:" is used.
set::static-quit[edit]
Syntax: set::static-quit <quit message>
Sets a static quit message that will be sent whenever a client logs off the network. This eliminates the need for anti-spam-quit-message-time, as well as the set::prefix-quit. It will NOT replace ERRORS with the static-quit message.
set::static-part[edit]
Syntax: set::static-part <no|yes|part message>
A value of 'yes' strips all part comments, a value of 'no' makes part just work as usual, anything else will be used as a part comment (eg: static-part "Bye!") but this can be quite annoying, so use with care.
set::who-limit[edit]
Syntax: set::who-limit <limit>
Sets the limit for the maximum number of matches that will be returned for a /WHO, the default is 100.
This limit does not apply for WHO requests for a specific channel, eg WHO #channel
. The limit also does not apply to IRCOps.
set::silence-limit[edit]
Syntax: set::silence-limit <limit>
Sets the limit on the maximum SILENCE list entries. If this directive is not specified, a limit of 15 is set.
set::maxbans[edit]
Syntax: set::maxbans <limit>
Sets the limit on the maximum amount of bans (+b) allowed per channel. The default is 60. The same limit is applied to exempts (+e) and invex (+I) as well. If you change this, be sure to also take a look at maxbanlength (see next)!
set::maxbanlength[edit]
Syntax: set::maxbanlength <limit>
Similar to above, but sets the maximum amount of characters for all bans added up together, so basically this puts up a limit on the (semi-)maximum amount of memory all channel bans on a channel can take. The default is 2048 (bytes). With the default set::maxbans of 60 this allows 2048:60=34 characters per ban on average. Note that if you change this, the same limit is also applied to excepts (+e) and invex (+I).
set::allow-user-stats[edit]
Syntax 1: set::allow-user-stats <stats-list-in-letters>
Syntax 2: set::allow-user-stats {<long-stats-flag1> <long-stats-flag2>}
Specifies a list of /STATS flags that users may also see (non-IRCOps). The default is "" (empty), which means regular users may not see any /STATS.
Be careful if you tweak this, some stats are not meant to be exposed to regular users and the information contained in them will often aid attackers / "bad guys".
set::max-stats-matches[edit]
Syntax: set::max-stats-matches <count>
Only available in UnrealIRCd 5.0.8 and above
If, as an IRCOp, you do STATS gline
and there are thousands of glines then in the past the oper would be disconnected due to flooding ("Max SendQ exceeded"). With max-stats-matches you limit the number of *LINE entries that are outputted. The default is 1000 entries which should be sufficient protection (assuming your oper class has a sendq of 500K or more). You can set this limit higher or lower, or to zero to disable the protection (no limit).
set::min-nick-length[edit]
Syntax: set::min-nick-length <length>
Specifies the minimum required length of a nick name. This defaults to 0 which means there's no minimum. The maximum is 30 (NICKLEN) but it should still be smaller than (or equal to) set::nick-length.
set::nick-length[edit]
Syntax: set::nick-length <length>
Specifies the maximum length of a nick name. This default and maximum is 30 (NICKLEN). This setting can only be used to impose a shorter nick length than that.
set::topic-length[edit]
Syntax: set::topic-length <length>
Specifies the maximum length of a channel topic. This default and maximum is 360, or 340 if set::topic-setter is set to 'nick-user-host'. This setting can only be used to impose a shorter length.
set::away-length[edit]
Syntax: set::away-length <length>
Specifies the maximum length of the away reason in /AWAY
. The default is 307 and the maximum is 360.
set::quit-length[edit]
Syntax: set::quit-length <length>
Specifies the maximum length of the quit reason in /QUIT
. The default is 307 and the maximum is 395.
set::kick-length[edit]
Syntax: set::kick-length <length>
Specifies the maximum length of the kick reason in /KICK
. The default is 307 and the maximum is 360.
set::maxchannelsperuser[edit]
Syntax: set::maxchannelsperuser <amount-of-channels>
Specifies the number of channels a single user may be in at any one time. IRCOps are exempt from this restriction.
set::maxdccallow[edit]
Syntax: set::maxdccallow <amount-of-entries>
Specifies the maximum number of entries a user can have on his/her DCCALLOW list.
set::channel-command-prefix[edit]
Syntax: set::channel-command-prefix <command-prefixes>
Specifies the prefix characters for services "in channel commands". Messages starting with any of the specified characters will still be sent even if the client is +d ("deaf"). The default value is "`!." which is normally a good setting.
set::allowed-nickchars[edit]
Syntax: set::allowed-nickchars { <list> }
Character sets / languages to allow in nick names, see Nick Character Sets.
set::allowed-channelchars[edit]
Syntax: set::allowed-channelchars [utf8|ascii|any]
Which characters to allow in channel names. This setting must be the same on all servers.
There are 3 possible settings (utf8, ascii and any):
Setting | Allowed characters | Comment |
---|---|---|
utf8 | All valid UTF8 characters | This is the default as of UnrealIRCd 5. It should be suitable for nearly everyone since UTF8 is the de-facto standard on IRC nowadays. |
ascii | Only a-z/A-Z/0-9 and a few other ASCII characters | This is a strict setting. It can be used if you don't want any confusion with channel names, no UTF8, etc. Technically this would be safest. Freenode uses this in their software. |
any | Almost all characters are permitted | This is a very loose setting and was the default in UnrealIRCd 4.x. The problem is that this breaks text websocket clients. It is NOT a recommended setting. |
The following characters are ALWAYS REJECTED: ASCII values below 32 (control characters), the space character, comma, colon.
Note that if you mix UnrealIRCd 4 and UnrealIRCd 5 servers on your network, then some channels which are considered illegal by this setting will be unjoinable on the UnrealIRCd 5 side. This will be especially noticeable if you use a strict setting like ascii, but may also happen for some channels if you use utf8. This problem will disappear once all of your servers are on UnrealIRCd 5. The alternative is to run with a setting of any during the transition, and then once everything is on UnrealIRCd 5, switch over to utf8. However, it is easy to forget about that last step.
set::allow-userhost-change[edit]
Syntax: set::allow-userhost-change [never|always|not-on-channels|force-rejoin]
Specifies what happens when the user@host changes (+x/-x/chghost/chgident/setident/vhost/etc). never disables all the commands, always does always allow it even when in channels (may cause client desyncs) [default], not-on-channels means it's only allowed when the user is not on any channel. Finally, force-rejoin will force a rejoin in all channels and re-op/voice/etc if needed, it will do that for all IRC clients without the chghost capability.
set::topic-setter[edit]
Syntax: set::topic-setter [nick|nick-user-host]
You can see who set the TOPIC by doing /TOPIC #channel
. By default this only shows the nick of the person who set the topic. If you set this option to nick-user-host then it will show the nick!user@host instead.
set::ban-setter[edit]
Syntax: set::ban-setter [nick|nick-user-host]
You can see who set a ban/exempt/invex (+beI) by doing /MODE #channel b
(or similar). By default this only shows the nick of the person who set the topic. If you set this option to nick-user-host then it will show the nick!user@host instead.
set::options::hide-ulines[edit]
Syntax: set::options::hide-ulines
If this is present, Ulined servers will be hidden in /MAP and /LINKS for regular users (non-ircops). This is a very common thing to do.
set::options::flat-map[edit]
Syntax: set::options::flat-map
If this is present, all servers will appear as directly linked in /map and /links, thus you can no longer see which server is linked to which. This is a little help against (D)DoS attacks because evil people now no longer can easily see the 'weak points'.
set::options::show-opermotd[edit]
Syntax: set::options::show-opermotd
If present the opermotd will be shown to users once they successfully /oper.
set::options::identd-check[edit]
Syntax: set::options::identd-check
If present the presence of an identd server will be checked and the returned value will be used for the username. If no ident request is returned or the identd server doesn't exist, the user's specified username will be prefixed with a ~. If this value is omitted no such check is made.
set::options::show-connect-info[edit]
Syntax: set::options::show-connect-info
If present notices showing "ident request", "hostname lookup", etc. will be displayed when a user connects.
set::options::dont-resolve[edit]
Syntax: set::options::dont-resolve
Don't do any resolving (DNS lookups) on users that connect. This can be useful if many of your users don't have a host, to speed up connecting. Note that this also means you cannot have host-based allow blocks.
set::options::mkpasswd-for-everyone[edit]
Syntax: set::options::mkpasswd-for-everyone
Makes it so the /mkpasswd can be used by anyone instead of oper-only, usage of the command by non-opers is sent to the EYES snomask.
set::options::allow-part-if-shunned[edit]
Syntax: set::options::allow-part-if-shunned
Allow shunned user to use /part.
set::options::fail-oper-warn[edit]
Syntax: set::options::fail-oper-warn
If present, a user will be notified that his/her failed /oper attempt has been logged.
set::options::allow-insane-bans[edit]
Syntax: set::options::allow-insane-bans
Allow insane broad bans like /GLINE *@*.xx. This makes it very easy to accidentally ban everyone on your network, so use with great care!
set::options::disable-cap[edit]
Syntax: set::options::disable-cap
Disable IRC Client Capabilities Extensions (CAP). Note that this makes SASL and various other features unavailable or harder for clients to use.
set::dns::bind-ip[edit]
Syntax: set::dns::bind-ip <ip>
Specifies the IP to bind to for the resolver, rarely ever needed.
set::network-name[edit]
Syntax: set::network-name <name-of-network>
Specifies the name of the network on which this server is run. This value should be exactly the same on all servers on a network.
set::default-server[edit]
Syntax: set::default-server <server-name>
Defines the name of the default server to tell users to connect to if this server is full.
set::default-ipv6-clone-mask[edit]
Syntax: set::default-ipv6-clone-mask
The default IPv6 clone detection mask. See allow::ipv6-clone-mask. The default value for this setting is 64.
set::services-server[edit]
Syntax: set::services-server <server-name>
Specifies the name of the server that the services bots are connected to. See also Services.
set::stats-server[edit]
Syntax: set::stats-server <server-name>
Sets the name of the server on which the stats bot is located. If stats are not run this value may be left out.
set::sasl-server[edit]
Syntax: set::sasl-server <server-name>
Sets the name of the server to which SASL authenticate messages should be sent.
set::help-channel[edit]
Syntax: set::help-channel <network-help-channel>
Sets the name of the help channel for this network.
set::cloak-method[edit]
Syntax: set::cloak-method [ip|host]
This sets the method to use when cloaking a user. The default is host which will use hostname-based cloaking (and fallback to IP-based if no host is available). The alternative is to set this to ip which will make UnrealIRCd always do IP-based cloaking. This results in a XX.YY.ZZ.IP cloaked host which provides more anonymity. IRCOps can still see the real hostname of the user and GLINEs and such still work as well.
set::cloak-keys[edit]
Syntax: set::cloak-keys { "key1"; "key2"; "key3"; }
UnrealIRCd has a feature called Cloaking. The keys you specify here are used to generate such a +x host. ALL servers on the same network must use the same keys and they must be kept secret.
Each key consists of 50-100 characters, the characters should contain a mixture of: lowercase (a-z), uppercase (A-Z) and digits.
On *NIX you can use ./unrealircd gencloak to generate 3 random keys.
Example:
/* This is just an example, don't actually use these keys yourself!! */ set { cloak-keys { "g5Ea8V0j7gb3t7w8QFmFV7Qoacit6T62eOk3jlIn7Qg0YaGgBqj55"; "mVv4uVw3306We2HvgPWTk1q0Nvnrl6uCr6Bor57c01d4eB5s60eQ3"; "HPXLauAcFF058V4Ian7X1hlt0Yj0MGmooNqs5bALL3um5GwD3O6w0M5L"; }; };
[edit]
Syntax: set::hiddenhost-prefix <prefix-value>
Defines the prefix that will be used on hiddenhosts (+x). This is usually three or four letters representing the network name. Linked servers must have the same hidden-host prefix for channel bans to function properly.
set::tls::certificate[edit]
Syntax: set::tls::certificate <filename>
Specifies the filename where the server's SSL certificate is located. The default is server.cert.pem.
set::tls::key[edit]
Syntax: set::tls::key <filename>
Specifies the filename where the server's SSL private key is located. The default is server.key.pem.
set::tls::trusted-ca-file[edit]
Syntax: set::tls::trusted-ca-file <filename>
Specifies the filename where the certificates of the trusted CAs are located. The default is curl-ca-bundle.crt (shipped with UnrealIRCd)
set::tls::protocols[edit]
Syntax: set::tls::protocols <list-of-protocols>
Specifies which SSL/TLS protocols are permitted. Available options are: All, TLSv1, TLSv1.1, TLSv1.2 and TLSv1.3. Prefix the protocol with a - (minus sign) to remove it.
Example: set { tls { protocols "All,-TLSv1,-TLSv1.1"; /* permit only TLSv1.2 and up */ }; };
See TLS Ciphers and protocols for more information and suggestions on a good setting.
set::tls::ciphers[edit]
Syntax: set::tls::ciphers <cipherlist>
Specifies which ciphers to be allowed for TLSv1.0, TLSv1.1 and TLSv1.2. See TLS Ciphers and protocols for more information and suggestions on a good setting.
set::tls::ciphersuites[edit]
Syntax: set::tls::ciphersuites <ciphersuitelist>
Specifies which ciphersuites to allow for TLSv1.3. See TLS Ciphers and protocols for more information.
set::tls::ecdh-curves[edit]
Syntax: set::tls::ecdh-curves <curvelist>
Specifies which ECDH(E) curves to be allowed. See TLS Ciphers and protocols for more information and suggestions on a good setting.
set::tls::renegotiate-bytes[edit]
Syntax: set::tls::renegotiate-bytes <value>
Specifies after how many bytes an SSL session should be renegotiated (eg: 20m for 20 megabytes).
set::tls::renegotiate-timeout[edit]
Syntax: set::tls::renegotiate-timeout <timevalue>
Specifies after how much time an SSL session should be renegotiated (eg: 1h for 1 hour).
set::tls::options::fail-if-no-clientcert[edit]
Syntax: set::tls::options::fail-if-no-clientcert
Forces clients that do not have a certificate to be denied. This would be an unusual setting to enable.
This option does not provide any security. A user can simply generate a client certificate and use it to connect, no verification is done.
set::tls::options::no-starttls[edit]
Syntax: set::tls::options::no-starttls
Disable STARTTLS. STARTTLS allows clients to use SSL/TLS on regular (non-SSL) ports, which is normally a good thing.
set::tls::outdated-protocols[edit]
This sets the outdated SSL/TLS protocols. It is used for set::outdated-tls-policy.
The default setting is "TLSv1.0,TLSv1.1" which marks TLSv1.0 and TLSv1.1 as outdated. In case you wonder, SSLv3 is not listed here because UnrealIRCd never allows such connections anyway.
set::tls::outdated-ciphers[edit]
This sets the outdated SSL/TLS ciphers. It is used for set::outdated-tls-policy.
The default setting is "AES*" which requires some explanation: This effectively marks all ciphersuites without Forward Secrecy as outdated. It stills allows AES perfectly fine, but only in combination with ECDHE/EECDH, which provides Forward Secrecy. For example AES128-SHA256 would be considered outdated and ECDHE-RSA-AES128-GCM-SHA256 is not.
If you use a weird ::ciphers setting, for example one that allows CAMELLIA, then you may have to tweak ::outdated-ciphers also. This is, however, an extremely uncommon configuration.
set::tls::sts-policy[edit]
This configures Strict Transport Security in UnrealIRCd.
Read SSL/TLS - Strict Transport Security for information on how to deploy this.
Example:
/* Read https://www.unrealircd.org/docs/SSL/TLS#Strict_Transport_Security * before deploying this. */ set { tls { sts-policy { port 6697; duration 5m; }; }; };
IMPORTANT: Invalid/untrusted SSL/TLS certificates or a non-working TLS port WILL LOCK YOUR USERS OUT if you use sts-policy!
set::plaintext-policy[edit]
The plaintext-policy block allows you to configure what UnrealIRCd should do with users/opers/server who are not connected via SSL/TLS.
set { plaintext-policy { user allow; /* must be one of: allow, warn, deny */ oper deny; /* must be one of: allow, warn, deny */ server deny; /* must be one of: allow, warn, deny */ }; };
An action of allow will allow the operation. The warn action will make the server send a warning notice. The deny action will reject the user/oper/server, meaning that the user cannot connect, the IRCOp cannot /OPER and the server may not link.
Optionally you can set a set::plaintext-policy::user-message and set::plaintext-policy::oper-message to change the default UnrealIRCd warn/deny text the user/ircop will receive.
set::outdated-tls-policy[edit]
The outdated-tls-policy block allows you to configure what UnrealIRCd should do with users/opers/server connecting with an outdated SSL/TLS protocol or cipher.
set { outdated-tls-policy { user warn; /* must be one of: allow, warn, deny */ oper deny; /* must be one of: allow, warn, deny */ server deny; /* must be one of: allow, warn, deny */ }; };
An action of allow will allow the operation. The warn action will make the server send a warning notice. The deny action will reject the user/oper/server, meaning that the user cannot connect, the IRCOp cannot /OPER and the server may not link.
To decide which protocol and ciphers are considered outdated, the set::tls::outdated-protocols and set::tls::outdated-ciphers settings are used.
Optionally you can set a set::outdated-tls-policy::user-message and set::outdated-tls-policy::oper-message to change the default UnrealIRCd warn/deny text the user/ircop will receive.
set::ident::connect-timeout[edit]
Syntax: set::ident::connect-timeout <amount>
Amount of seconds after which to give up connecting to the ident server (default: 3s).
set::ident::read-timeout[edit]
Syntax: set::ident::read-timeout <amount>
Amount of seconds after which to give up waiting for a reply (default: 7s).
set::handshake-timeout[edit]
Syntax: set::handshake-timeout <amount>
Amount of seconds that a connection may be in the "handshake state", that is: the period between a TCP/IP connection accept() and the user getting online after NICK/USER have been received and DNS and ident lookups have completed (if those are enabled).
The default is 30 which is a safe value for everyone. Be careful if drastically lower this. DNS lookups, ident lookups and the handshake may take more time than you may think in some cases. You can probably set this to a value like 20 if you like. However, if you set this setting too low then you risk locking everyone out when for example your DNS server is a little slow (eg: under attack).
set::sasl-timeout[edit]
Syntax: set::sasl-timeout <amount>
The maximum time for SASL to take place. Time starts at the AUTHENTICATE command. The default is 15 seconds.
This protects against misbehaving or extremely laggy SASL servers (Services). Otherwise, a misbehaving server could lead to people no longer being able to connect.
set::anti-flood[edit]
The set::anti-flood block is used to configure nearly all anti flood settings in UnrealIRCd.
Because there are so many anti-flood options they are listed on a separate wiki page:
- For UnrealIRCd 5.2.0 and later, see Anti-flood settings
- For earlier versions, see Anti-flood settings (OLD)
set::default-bantime[edit]
Syntax: set::default-bantime
Default bantime when doing /KLINE, /GLINE, /ZLINE, GZLINE, /SHUN, etc without a time parameter (like /GLINE *@some.nasty.isp), the default is permanent (0). Example: default-bantime 90d
set::modef-default-unsettime[edit]
Syntax: set::modef-default-unsettime <value>
For channelmode +f you can specify a default unsettime, if you specify 10 for example then a /MODE #chan +f [5j]:15 will be transformed to [5j#i10]:15. The default is no default unsettime.
set::modef-max-unsettime[edit]
Syntax: set::modef-max-unsettime <value>
The maximum amount of minutes for a mode +f unsettime (in +f [5j#i
set::modef-boot-delay[edit]
Syntax: set::modef-boot-delay
Ignore join flood controls in channel mode +f when the server has just been rebooted. This because users are likely to quickly reconnect in such a case, causing a lot of joins which normally trigger +f, causing channels to end up being +i or +R even if there was no true attack (just a server restart).
The default setting is 75 seconds. You can specify an alternative time in seconds (eg: 120), or by timespec (eg: 2m).
This feature does not take into account users reconnecting to another server in the network if a server dies or is restarted, as is frequently seen in the case of DNS RR. But at least it partially mitigates the server reboot effect.
The downside of this setting is that if a server is restarted in the middle of a drone attack, then when it is booted up again, drones would be able to bypass limits for the specified amount of time. One needs to weigh this against the false positives in channel mode +f that are otherwise caused by server restarts (eg: channels ending up +i due to +f, only because a server has been restarted during scheduled maintenance).
set::ban-version-tkl-time[edit]
Syntax: set::ban-version-tkl-time <value>
If you specify an 'action' like zline/gline/etc in a Ban version block, then you can specify here how long the IP should be banned, the default is 86400 (1 day).
set::spamfilter::ban-time[edit]
Syntax: set::spamfilter::ban-time <value>
Same as above but for *lines/shuns added by spamfilter
set::spamfilter::ban-reason[edit]
Syntax: set::spamfilter::ban-reason <reason>
Default reason to use for entries added by spamfilter
set::spamfilter::virus-help-channel[edit]
Syntax: set::spamfilter::virus-help-channel <channel>
The channel to use for the 'viruschan' action in spamfilter
set::spamfilter::virus-help-channel-deny[edit]
Syntax: set::spamfilter::virus-help-channel-deny <yes|no>
If set to yes (or '1') it replies 'invite only' to any normal users that try to join the virus-help-channel. Only opers, people that match spamfilters and people that are /invite'd can join.
set::spamfilter::except[edit]
Syntax: set::spamfilter::except <target(s)>
These targets are exempt from spam filtering, that is: no action will be taken if you send a message/notice/etc to this target. This can be single target or comma separated list.. Ex: except "#help,#spamreport"
set::spamfilter::detect-slow-warn[edit]
Syntax: set::spamfilter::detect-slow-warn <value>
If a spamfilter takes longer than this amount of milliseconds to execute (1000ms = 1 second), then a warning notice will be sent to all opers (default: 250). See also Spamfilter#Slow Spamfilter Detection
set::spamfilter::detect-slow-fatal[edit]
Syntax: set::spamfilter::detect-slow-fatal <value>
If a spamfilter takes longer than this amount of milliseconds to execute (1000ms = 1 second), then the spamfilter will be removed (default: 500). See also Spamfilter#Slow Spamfilter Detection
set::check-target-nick-bans[edit]
Syntax: set::check-target-nick-bans <yes|no>
Whenever the user changes his/her nick, check if the NEW nick would be banned. If so, do not allow the nickchange. Default is yes.
set::ping-cookie[edit]
Syntax: set::ping-cookie <yes|no>
When a client connects, send a "ping cookie" consisting of a random string that the client should respond with. All clients should cope with this and do so without bothering the user. Ping cookies are a security measure. It helps in preventing blind HTTP-POST attacks and similar security issues. It also helps against TCP spoofing on very old operating systems.
The default is yes (enabled). Changing this to no is a big security risk.
set::watch-away-notification[edit]
Syntax: set::watch-away-notification <yes|no>
Allows you to enable/disable AWAY notification in WATCH. The default is yes (enabled).
set::max-targets-per-command[edit]
This limits the number of targets in a command. For example for PRIVMSG it defaults to 4, which means you can address up to 4 targets via /MSG nick1,nick2,nick3,nick4 hello
. These imposed protocol limits apply to everyone, including opers.
The following are the defaults:
set { max-targets-per-command { privmsg 4; notice 1; tagmsg 1; names 1; whois 1; whowas 1; kick 4; list max; join max; part max; sajoin max; sapart max; kill max; dccallow max; userhost max; userip max; ison max; watch max; }; };
If you are tweaking the settings you should note that:
- The commands NAMES and WHOWAS do not support more than 1
- The setting for the commands USERHOST USERIP ISON WATCH can not be lowered
- Other than the above there is no checking if the command exists or if the command itself allows multiple targets in the first place
set::hide-ban-reason[edit]
Syntax: set::hide-ban-reason <yes|no>
This will hide the *LINE reason to anyone except the user being killed. This allows you to enter a personal message in commands like /GLINE that will not be publicly displayed.
set::antirandom[edit]
This module can automatically kill users that seem to have "random looking nicks".
Note that you need to load this module explicitly (it is not loaded by default):
loadmodule "antirandom"; <!--T:285--> set { antirandom { /* THRESHOLD: * This is pretty much the most important setting of all. * For every randomly looking ident the user gets a certain amount of * 'points', if this value reaches 'threshold' then the appropriate * action is taken (killed, *lined, see later on). * lower = more randomly looking users will be catched (but also more * innocent users) * higher = less chance of innocent users getting killed, but also less * chance on bots getting catched. * <2: DON'T!! * 4: Works good, probably a few more innocent kills but if you got * quite a bot problem then this might be a useful setting. * 5: Works well with few innocent kills, probably good to begin with. * 6: If you want to be a tad more careful * >6: For the paranoid. Module can still be quite effective, though :) */ threshold 5; <!--T:286--> /* BAN-ACTION: * Action to take whenever the user is catched as random, options: * warn, kill, gline, gzline, kline, zline, shun, tempshun */ ban-action kill; <!--T:287--> /* BAN-TIME: * Time to ban the user (irrelevant for tempshun/kill). * Something between 1 hour and 2 days is recommended. * If you set it higher than 3 or 4 days then you get quite a risk * of catching innocent users due to dynamic IP, not to mention * your *line list gets filled up... so choose it wisely. */ ban-time 4h; <!--T:288--> /* BAN-REASON: * The ban (or kill) reason to use. * You might want to put in an entry to a FAQ or an email address * where users can mail if they have been catched and don't know what to do. * NOTE: One of the various reasons that ""innocent users"" are catched is * if they just randomly type in info for their nick, ident, or realname. */ ban-reason "You look like a bot. Be sure to fill in your nick/ident/realname properly."; <!--T:289--> /* CONVERT-TO-LOWERCASE: * Convert nicks, idents, and realnames to lowercase before doing random checks? * This has not been tested extensively for false positives, but might be (very) * helpful to catch GnStA5FYhiTH51TUkf style random nicks as random. * Enabled by default. */ convert-to-lowercase yes; <!--T:291--> /* SHOW-FAILEDCONNECTS: * This will send out a notice whenever a randomly looking user has been catched * during connecting. Obviously this can be pretty noisy. * Especially recommended to enable during the first few days you use this module. */ show-failedconnects yes; <!--T:292--> /* EXCEPT-HOSTS: * Hostmasks on this list are matched against the IP and hostname of the connecting * user. If it matches then we do not check if the nick/ident/realname is random. * NOTE: Use the REAL host or IP here, not any cloaked hosts! */ except-hosts { mask "192.168.0.0/16"; mask "127.0.0.0/8"; }; }; };
set::hide-list[edit]
This allows you to specify which channels should be hidden from list. Right now it only supports one option: deny-channel. This will hide channels that the user cannot join due to deny channel { } restrictions:
set { hide-list { deny-channel; }; };
Note that secret channels (channel mode +s) are always hidden and IRCOps always override restrictions (if they have sufficient access).
set::max-unknown-connections-per-ip[edit]
UnrealIRCd limits the number of connections per IP that are in an "unknown" state, that is: connections that are in a handshake. This is a security setting and it defaults to 3.
Only in very rare circumstances this may need to be adjusted. For example if you have hundreds of users coming from the same IP.
Example: set { max-unknown-connections-per-ip 3; };
set::ban-include-username[edit]
By default UnrealIRCd will place bans from spamfilter (and other automatic bans) on *@ip. You can change this to have bans placed on user@ip. This can be useful if you have some unusual amount of trust in idents ;). Note that this doesn't help against zlines/gzlines since ident requests and handshakes (including receiving the username) don't take place for (G)ZLINE's.
Example (this is the default setting): set { ban-include-username no; };
set::handshake-delay[edit]
Syntax: set { handshake-delay 2; };
This defines the MINIMUM time it should take for a user to get connected (finish the initial handshake).
This can be very useful if you have blacklist blocks, so DNSBL checking can finish before allowing the user in.
The default is 2 seconds if you have any blacklist { } block. You could set it slightly higher if your DNSBL checking is slow but for most people the default should be perfectly fine. Values of 10 or more are not permitted.
If you don't have any blacklist { } blocks then the delay defaults to 0 seconds (no delay) since it would not be useful.
set::reject-message[edit]
This allows you to change the messages that are sent to a user when their connection is rejected. This shows the defaults:
set { reject-message { password-mismatch "Password mismatch"; too-many-connections "Too many connections from your IP"; server-full "This server is full."; unauthorized "You are not authorized to connect to this server"; kline "You are not welcome on this server. $bantype: $banreason. Email $klineaddr for more information."; gline "You are not welcome on this network. $bantype: $banreason. Email $glineaddr for more information."; }; };
The set::reject-message::kline message is sent to the user when disconnecting them due to a KLINE or ZLINE. The set::reject-message::gline message is sent to the user upon GLINE or GZLINE. The message is only sent to the affected user and is not seen by other users or IRCOps. In both of these configuration items (::kline and ::gline) the following variables are available:
Variable | Description | Example |
---|---|---|
$bantype | type of the ban (past tense) | K-lined |
$banreason | reason of the ban (*LINE reason) | Stop spamming users |
$klineaddr | set::kline-address | [email protected] |
$glineaddr | set::gline-address (or, if not set, then set::kline-address) | [email protected] |
$ip | IP address of the user | 203.0.113.12 |
set::antimixedutf8[edit]
The antimixedutf8 module will detect and stop spam containing of characters of mixed "scripts", where (for example) some characters are in Latin script and other characters are in Cyrillic script.
Note that you need to load this module explicitly (it is not loaded by default).
loadmodule "antimixedutf8"; set { antimixedutf8 { /* Take action at this 'score' (lower = more sensitive) * * A score of 2 or 3 will catch a lot but also * catch innocent users who are not using a pure * Latin script, such as Russian people who * commonly use a mix of Latin and Cyrillic. * * A score of 8 is a safe default. */ score 8; /* Action to take, see: * https://www.unrealircd.org/docs/Actions */ ban-action block; /* Block/kill/ban reason (sent to user) */ ban-reason "Mixed character spam"; /* Duration of ban (does not apply to block/kill) */ ban-time 4h; // For other types } }
set::authentication-prompt[edit]
This will ask users to type /AUTH user:pass
if they need to authenticate, for example if the user matches a soft ban or require authentication { } block. Technically, it does this by simulating a SASL session to Services.
The module is loaded by default with the following default settings:
loadmodule "authprompt"; set { authentication-prompt { /* Enabled or not? */ enabled yes; <!--T:316--> message "The server requires clients from this IP address to authenticate with a registered nickname and password."; message "Please reconnect using SASL, or authenticate now by typing: /QUOTE AUTH nick:password"; /* As you can see you can have multiple 'message' items. * It may be useful to refer to a webpage for more * information and/or where users can register their nick. */ <!--T:317--> fail-message "Authentication failed"; /* Multiple fail-message lines are also supported */ unconfirmed-message "You are trying to use an unconfirmed services account."; unconfirmed-message "This services account can only be used after it has been activated/confirmed."; }; }; // If you use the authprompt module then you may want to raise the // timeout in which users must complete the handshake. // By uncommenting the following, you can raise it from 30 to 60 seconds: // set { handshake-timeout 60s; };
set::reputation[edit]
The reputation module provides reputation scores of users. This score can then be used by various modules to counter abuse.
The default settings are:
set { reputation { database "reputation.db"; /* this file will be in the 'data' subdirectory */ } }
In UnrealIRCd 5.2.0+ it is also possible to encrypt all data in the reputation database, to do so you have to create a secret { } block and then refer to that secret block. In this example we refer to a secret block called reputationdb:
set { reputation { db-secret "reputationdb"; } }
set::tkldb[edit]
The tkldb module saves all TKLs (kline, gline, spamfilter, etc) to a database file so these are preserved accross server restarts.
The default settings are:
set { tkldb { database "tkl.db"; /* this file will be in the 'data' subdirectory */ } }
In UnrealIRCd 5.2.0+ it is also possible to encrypt all data in the database, to do so you have to create a secret { } block and then refer to that secret block. In this example we refer to a secret block called tkldb:
set { tkldb { db-secret "tkldb"; } }
set::channeldb[edit]
The channeldb module saves all channel settings for channels that have mode +P ("permanent") set. For these channels it saves: channel creation time, topic, topic setter (name), topic timestamp, channel modes, channel list modes (+b/+e/+I lists). These are all stored in a database file so these are preserved accross server restarts.
The default settings are:
set { channeldb { database "channel.db"; /* this file will be in the 'data' subdirectory */ } }
In UnrealIRCd 5.2.0+ it is also possible to encrypt all data in the database, to do so you have to create a secret { } block and then refer to that secret block. In this example we refer to a secret block called channeldb:
set { channeldb { db-secret "channeldb"; } }
set::connthrottle[edit]
The set::connthrottle settings are documented at the Connthrottle page.
set::broadcast-channel-messages[edit]
Syntax: set::broadcast-channel-messages [auto|always|never]
There are 3 possible settings:
- always: always send all channel messages to all servers, regardless of whether they have channel members or not.
- auto (the default): don't send messages to servers if they have no channel members, except for when the channel mode +H (history) is set. In case of +H we broadcast all messages to all servers.
- never: never broadcast channel messages to all servers, only send to servers that have channel members.
set::history[edit]
Configure settings related to Channel history.
The set::history::channel::playback-on-join block describes the behavior when a user joins a +H channel. The set::history::channel::max-storage-per-channel block sets limits on what can be set via /MODE #chan +H. Note that these are separate things: only a few lines of history are shown on-join, many more lines can be fetched via the HISTORY
command (and possibly other commands in the future).
This shows the default settings in UnrealIRCd 5.2.0:
set { history { channel { /* How many lines to playback on join? */ playback-on-join { lines 15; time 1d; } /* How much history to keep. These are the * upper maximums for channel mode +H lines:time */ max-storage-per-channel { /* +r channels have larger maximums: */ registered { lines 5000; time 31d; } /* -r channels have less: */ unregistered { lines 200; time 31d; } } } } }
NOTE: If you want to tweak maximum storage per channel in UnrealIRCd 5.0.9.1 and lower then be aware that the 'registered' and 'unregistered' split did not exist in those versions yet. In 5.0.9.1 and older you will have to edit set::history::channel::max-storage-per-channel::lines and set::history::channel::max-storage-per-channel::time (so without being in a "registered" or "unregistered" block).
Persistent channel history[edit]
In UnrealIRCd 5.2.0+ you can also store channel history encrypted on disk. This means channel history is preserved across IRCd restarts. UnrealIRCd will only store channel history for channels that have both channel mode +H
and +P
set.
To enable this you need to create a Secret block like this:
/* This is only a simple example with passwords stored directly in the * configuration file. * To get better security, read https://www.unrealircd.org/docs/Secret_block * on alternative ways so you don't store passwords directly in the config. */ secret historydb { password "somepassword"; }
And then refer to that secret block which we named historydb:
set { history { channel { persist yes; db-secret "historydb"; } } }
UnrealIRCd has the following goals for storing channel history on disk:
- All data within the .db's is encrypted
- We use a well-known encryption library, a good cipher and KDF, see Dev:UnrealDB for in-depth technical details.
- By default the log databases are stored in the
data/history/
directory - All .db files are cryptographically hashed so a third party can't tell which .db file belongs to which channel
- A 'master.db' file is present too, to achieve the above in a consistent and safe manner. Don't delete this file.
- Be sure to look at Secret block to see the various ways to store the key (password) and pick one acceptable to your environment
set::part-instead-of-quit-on-comment-change[edit]
Syntax: set::part-instead-of-quit-on-comment-change [yes|no]
When a QUIT message is changed due to channel restrictions, such as stripping color or censoring a word, we normally change the QUIT message. This has an effect on ALL channels, not just the one that imposed the restrictions (eg: the QUIT reason loses color or is censored for all). We feel this is the best tradeoff and this is the default setting of no.
You can also set this setting to yes. That will change the QUIT into a PART when the QUIT comment is changed. The channel(s) with the changed comment see the user PARTing, and on all other channels that do not have the restrictions (eg: are -S and -G) they will see the user QUITting with the original message.
set::webredir::url[edit]
Syntax: set::webredir::url "http://example.org/"
When someone (accidentally) types irc.example.org in their web browser then UnrealIRCd can send a HTTP redirect back to, say, https://example.org/. Note that this is mostly a gimmick rather than something terribly useful.
For this to work, the IRC server needs to listen on ports 443 and 80 (more information about that here!). However, nowadays more and more IRC servers listen on port 443 so users can bypass firewall restrictions that they may encounter on the regular ports 6667/6697 (and also because of websockets).
Usage example (only do this after reading the above):
loadmodule "webredir"; set { webredir { url "https://..."; } }
set::automatic-ban-target[edit]
Syntax: set::automatic-ban-target [host|userhost|..]
The IRCd may add automatic bans, for example due to a blacklist hit, a spamfilter hit, or because of antirandom or antimixedutf8. When it does, on what should the ban be placed:
- ip: place the ban on the IP address (eg: *@172.16.8.4)
- userip: include the ident portion in the mask (eg: [email protected])
- host: place the ban on the hostname (eg: *@something.example.org), fallback to ip.
- userhost: include the ident portion in the mask (eg: [email protected]), fallback to user@ip.
- account: ban by services account name (eg: ~a:accountname)
- certfp: ban by certificate fingerprint (eg: ~S:00112233etc)
The last two possibilities are only useful if you have a very special setup, it does not apply to most users. The most common choices are ip (the default), host, or userip (if you trust idents).
Note: if the ban is of type ZLINE or GZLINE then it will always resort to ip since all other options don't work. The reason for that is that UnrealIRCd closes the connection immediately in case of a (G)ZLINE. Therefore it only knows the IP information as it has not done a DNS lookup, ident lookup, TLS handshake, etc. In fact, that is what makes a ZLINE different than a KLINE (and a GZLINE from a GLINE).
set::manual-ban-target[edit]
Syntax: set::manual-ban-target [host|userhost|..]
Similar to automatic-ban-target, but this is used if target a nick in a *LINE, eg type /KLINE nick. When that happens, on what should the ban be placed:
- ip: place the ban on the IP address (eg: *@172.16.8.4)
- userip: include the ident portion in the mask (eg: [email protected])
- host: place the ban on the hostname (eg: *@something.example.org)
- userhost: include the ident portion in the mask (eg: [email protected])
- account: ban by services account name (eg: ~a:accountname)
- certfp: ban by certificate fingerprint (eg: ~S:00112233etc)
he last two possibilities are only useful if you have a very special setup, it does not apply to most users. The most common choices are ip, host (the default), or userhost (if you trust idents).
Note: if the ban is of type ZLINE or GZLINE then it will always resort to ip since all other options don't work. The reason for that is that UnrealIRCd closes the connection immediately in case of a (G)ZLINE. Therefore it only knows the IP information as it has not done a DNS lookup, ident lookup, TLS handshake, etc. In fact, that is what makes a ZLINE different than a KLINE (and a GZLINE from a GLINE).
set::hide-idle-time[edit]
Note: this setting is only available in UnrealIRCd version 5.0.4 and higher. The feature is planned to be extended later.
The default setting is:
set { hide-idle-time { policy oper-usermode; } }
Syntax: set::hide-idle-time::policy [never | always | usermode | oper-usermode ];
This is a privacy setting which configures the visibility of "idle time" of users:
- never: never hide idle time, the idle time is always shown to everyone
- always: always hide idle time
- usermode: show idle time, but hide idle time if user mode +I is set (uppercase letter i).
- oper-usermode: same as previous, but only IRCOps can set the +I user mode to hide idle time.
In all cases, IRCOps can still see idle time of users.
Note that even if you are allowed to see idle time, /WHOIS Nick
will never show idle time for users on another server. This is a technical limitation (the idle time is not communicated actively across servers). If you want to see the idle time of a remote user you need to double whois: /WHOIS Nick Nick
. Some clients do the latter by default in popups.
set::server-linking[edit]
This block configures the timeouts for outgoing servers and the linking strategy for link { } blocks with autoconnect set.
Note: this block only exists in UnrealIRCd 5.2.1 or later
These are the defaults:
set { server-linking { autoconnect-strategy sequential; connect-timeout 10s; handshake-timeout 20s; } }
set::server-linking::autoconnect-strategy has two options:
- parallel: connect to all link { } blocks in parallel
- sequential: try to connect to the first link block, then to the 2nd, then to the 3rd, then back to the 1st, etc..
- sequential-fallback: similar to sequential but after a successful connection, we will restart from the beginning of the link blocks again. Can be useful for leafs.
In UnrealIRCd 5.2.1 the default is sequential, while previously the behavior was always parallel.
set::server-linking::connect-timeout specifies the maximum time to wait for the outgoing connect() or TLS_connect() call to succeed. The default is 10 seconds and this should be sufficient. If you are on a high-latency/low-bandwidth satellite connection then you could raise this. Otherwise we recommend keeping it at 10.
set::server-linking::handshake-timeout specifies the maximum time to wait for the server handshake to succeed, that is: to receive the "SERVER" command. This is usually received in the first few kilobytes of data, so should be relatively soon. The default is 20 seconds here, which should be plenty for everyone.
set::whois-details[edit]
Note: this setting is only available in UnrealIRCd 6
This allows you to configure which WHOIS information should be shown to who (and in what detail).
For each item there are 3 user groups that you can configure:
- everyone: all users
- self: if you are /WHOIS'ing yourself
- oper: IRC Operators
Then the possible settings for each item are:
- none: information is not shown
- full: all information is shown
- limited: only a limited amount of information is shown. This is only available for a few items:
- for item channels: full will also show hidden channels (+s), limited will not (normally used for normal users)
- for item oper: full will show the operlogin and operclass, limited will leave these details out
- for item secure: full will show the TLS version and cipher in use, limited will leave these details out
The default settings are:
set { whois-details { basic { everyone full; } modes { everyone none; self full; oper full; } realhost { everyone none; self full; oper full; } registered-nick { everyone full; } channels { everyone limited; self full; oper full; } server { everyone full; } away { everyone full; } oper { everyone limited; self full; oper full; } secure { everyone limited; self full; oper full; } bot { everyone full; } services { everyone full; } reputation { everyone none; self none; oper full; } geo { everyone none; self none; oper full; } certfp { everyone full; } shunned { everyone none; self none; oper full; } account { everyone full; } swhois { everyone full; } idle { everyone limited; self full; oper full; } } }