1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-26 10:56:37 +02:00
Files
unrealircd/doc/example.conf
T

409 lines
11 KiB
Plaintext

/* Example configuration for UnrealIRCd 3.4.x
*
* Simply copy this file to your main Unreal3.4 directory, call it
* 'unrealircd.conf' and walk through it line by line (edit it!)
*
* Important: All lines, except the opening { line, end with an ;
* including };. This is very important, if you miss a ; somewhere then
* the configuration file parser will complain and your file will not
* be processed correctly!
*
* Documentation:
* https://www.unrealircd.org/unreal32docs.html (TODO: update for 3.4.x)
* FAQ:
* https://www.unrealircd.org/faq
*
* Our (online) documentation is very extensive. If you try to edit this
* file without reading the documentation you are likely to fail.
*/
/* This is a comment, all text here is ignored (comment type #1) */
// This is also a comment, this line is ignored (comment type #2)
# This is also a comment, again this line is ignored (comment type #3)
/* UnrealIRCd makes heavy use of modules. By using this include we
* tell the ircd to read the file 'modules.conf' which contains of
* more than a hundred loadmodule lines that load all the necessary
* modules.
*/
include "modules.conf";
/* Now let's include some other files as well:
* - help.conf for our on-IRC /HELPOP system
* - badwords.*.conf for channel and user mode +G
* - spamfilter.conf as an example for spamfilter usage
*/
include "help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
include "badwords.quit.conf";
include "spamfilter.conf";
/* This is the me { } block which basically says who we are.
* It defines our server name, some information line and an unique "sid".
* The server id (sid) must start with a digit followed by two digits or
* letters. The sid must be unique for your IRC network (each server should
* have it's own sid).
*/
me
{
name "irc.foonet.com";
info "FooNet Server";
sid "001";
};
/* The admin { } block defines what users will see if they type /ADMIN.
* It normally contains information on how to contact the administrator.
*/
admin {
"Bob Smith";
"bob";
"widely@used.name";
};
/* Clients and servers are put in class { } blocks, we define them here.
* Class blocks consist of the following items:
* - pingfreq: how often to ping a user / server (in seconds)
* - connfreq: how often we try to connect to this server (in seconds)
* - sendq: the maximum queue size for a connection
* - recvq: maximum receive queue from a connection (flood control)
*/
/* Client class with good defaults */
class clients
{
pingfreq 90;
maxclients 1000;
sendq 200k;
recvq 8000;
};
/* Server class with good defaults */
class servers
{
pingfreq 60;
connfreq 30; /* try to connect every 30 seconds */
maxclients 10; /* max servers */
sendq 5M;
};
/* Allow blocks define which clients may connect to this server.
* This allows you to add a server password or restrict the server to
* specific IP's only.
* Additionally, you can set a maximum connections per IP in the allow
* block, which something that is very important on a public server.
*/
/* Allow everyone in, but only 5 connections per IP */
allow {
ip *@*;
hostname *@*;
class clients;
maxperip 5;
};
/* Just as an example: a special allow block for some IP, allowing
* 20 connections on that IP, but only if they provide a password.
*/
allow {
ip *@192.0.2.1;
hostname *@NOMATCH;
class clients;
password "somesecretpasswd";
maxperip 20;
};
/* Oper blocks define your IRC Operators.
* IRC Operators are people who have "extra rights" compared to others,
* for example they may /KILL other people, initiate server linking,
* /JOIN channels even though they are banned, etc.
* See [ADD SOME LINK HERE TO OPER BLOCK ]
*/
/* Here is an example oper block for 'bobsmith' with password 'test'.
* You MUST change this!!
*/
oper bobsmith {
class clients;
mask *@*;
password "test";
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
};
};
/* Listen blocks define the ports where the server should listen on.
* In other words: the ports that clients and servers may use to
* connect to this server.
*
* Syntax:
* listen <ip number>:<port number>
* {
* options {
* <options....>;
* };
* };
*
* For IPv6 the IP (3ffe:b80:2:51d::2 etc) needs to be put in brackets
* like: listen [3ffe:b80:2:51d::2]:6667;
*/
/* Standard IRC port 6667 */
listen *:6667;
/* Standard IRC SSL/TLS port 6697 */
listen *:6697 { options { ssl; }; };
/* Special SSL/TLS servers-only port for linking */
listen *:6900 { options { ssl; serversonly; }; };
/* NOTE: If you are on an IRCd shell with multiple IP's and you use
* the above listen { } blocks then you will likely get an
* 'Address already in use' error and the ircd won't start.
* This means you MUST bind to a specific IP instead of '*' like:
* listen 1.2.3.4:6667;
* Of course, replace the IP with the IP that was assigned to you.
*/
/*
* Link blocks allow you to link multiple servers together to form a network.
* See https://www.unrealircd.org/docs/Tutorial:_Linking_servers
*/
link hub.mynet.org
{
incoming {
mask *@something;
};
outgoing {
bind-ip *; /* or explicitly an IP */
hostname hub.mynet.org;
port 6900;
options { ssl; };
password "00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF"; /* SSL fingerprint of other server */
};
class servers;
};
/* U-lines give other servers (even) more power/commands.
* If you use services you should add them here.
* NEVER put the name of a (normal) UnrealIRCd server here!!!
*/
ulines {
services.mynet.org;
};
/* Here you can add a password for the IRCOp-only /DIE and /RESTART commands.
* This is mainly meant to provide a little protection against accidental
* restarts and server kills.
*/
drpass {
restart "I-love-to-restart";
die "die-you-stupid";
};
/* The log block defines what should be logged and to what file. */
/* This is a good default */
log "ircd.log" {
flags {
oper;
connects;
server-connects;
kills;
errors;
sadmin-commands;
chg-commands;
oper-override;
spamfilter;
};
};
/* With aliases you can create an alias like /SOMETHING to send a message to
* some user or bot. They are usually used for services.
*/
/* We have a number of pre-set alias files, check out the alias/ directory.
* As an example, here we include all aliases used for anope services.
*/
include "aliases/anope.conf";
/* Ban nick names so they cannot be used by regular users */
ban nick {
mask "*C*h*a*n*S*e*r*v*";
reason "Reserved for Services";
};
/* Ban ip.
* Note that you normally use /KLINE, /GLINE and /ZLINE for this.
*/
ban ip {
mask 195.86.232.81;
reason "Hate you";
};
/* Ban server - if we see this server linked to someone then we delink */
ban server {
mask eris.berkeley.edu;
reason "Get out of here.";
};
/* Ban user - just as an example, you normally use /KLINE or /GLINE for this */
ban user {
mask *tirc@*.saturn.bbn.com;
reason "Idiot";
};
/* Ban realname allows you to ban clients based on their 'real name'
* or 'gecos' field.
*/
ban realname {
mask "Swat Team";
reason "mIRKFORCE";
};
ban realname {
mask "sub7server";
reason "sub7";
};
/* Ban and TKL exceptions. Allows you to exempt users / machines from
* KLINE, GLINE, etc.
* If you are an IRCOp with a static IP (and no untrusted persons on that IP)
* then we suggest you add yourself here. That way you can always get in
* even if you accidentally place a *LINE ban on yourself.
*/
/* except ban protects you from KLINE and ZLINE */
except ban {
mask *@192.0.2.1;
// you may add more mask entries here..
};
/* except tkl with type 'all' protects you from GLINE, GZLINE, QLINE, SHUN */
except tkl {
mask *@192.0.2.1;
type all;
};
/* With deny dcc blocks you can ban filenames for DCC */
deny dcc {
filename "*sub7*";
reason "Possible Sub7 Virus";
};
/* deny channel allows you to ban a channel (mask) entirely */
deny channel {
channel "*warez*";
reason "Warez is illegal";
class "clients";
};
/* vhosts allow users to acquire a different "virtual" host */
/* example vhost which you can use, on IRC use: /VHOST test test.
* NOTE: only users with an 'unrealircd.com' host may use it.
*/
vhost {
vhost i.hate.microsefrs.com;
mask *@unrealircd.com;
login "test";
password "test";
};
/* You can include other configuration files */
/* include "klines.conf"; */
/* Network configuration */
set {
network-name "MYNet";
default-server "irc.mynet.org";
services-server "services.mynet.org";
stats-server "stats.mynet.org";
help-channel "#Help";
hiddenhost-prefix "Clk";
prefix-quit "Quit";
/* Cloak keys should be the same at all servers on the network.
* They are used for generating masked hosts and should be kept secret.
* The keys should be 3 random strings of 5-100 characters
* (10-20 chars is just fine) and must consist of lowcase (a-z),
* upcase (A-Z) and digits (0-9) [see first key example].
* HINT: On *NIX, you can run './unreal gencloak' in your shell to let
* Unreal generate 3 random strings for you.
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"and another one";
"and another one";
};
/* on-oper host */
hosts {
local "locop.mynet.org";
global "ircop.mynet.org";
coadmin "coadmin.mynet.org";
admin "admin.mynet.org";
servicesadmin "csops.mynet.org";
netadmin "netadmin.mynet.org";
host-on-oper-up yes;
};
};
/* Server specific configuration */
set {
kline-address "set.this.email"; /* e-mail shown when a user is banned */
modes-on-connect "+ixw";
modes-on-oper "+xwgs";
oper-auto-join "#opers";
options {
hide-ulines;
show-connect-info;
};
maxchannelsperuser 10; /* maximum number of channels a user may /JOIN */
/* The minimum time a user must be connected before being allowed to
* use a QUIT message. This will hopefully help stop spam.
*/
anti-spam-quit-message-time 10s;
/* Or simply set a static quit, meaning any /QUIT reason is ignored */
/* static-quit "Client quit"; */
/* static-part does the same for /PART */
/* static-part yes; */
/* Which /STATS to restrict to opers only.
* We suggest to leave it to * (ALL)
*/
oper-only-stats "*";
/* Anti flood protection */
anti-flood {
nick-flood 3:60; /* 3 nickchanges per 60 seconds (the default) */
connect-flood 3:60; /* 3 connection (attempts) per 60 seconds */
};
/* Spam filter */
spamfilter {
ban-time 1d; /* default duration of a *LINE ban set by spamfilter */
ban-reason "Spam/Advertising"; /* default reason */
virus-help-channel "#help"; /* channel to use for 'viruschan' action */
/* except "#help"; channel to exempt from Spamfilter */
};
};
/*
* Problems or need more help?
* 1) https://www.unrealircd.org/unreal32docs.html [TODO: UPDATE!!!]
* 2) https://www.unrealircd.org/faq <- answers 80% of your questions!
* 3) If you still have problems you can go irc.unrealircd.org #unreal-support,
* note that we require you to READ THE DOCUMENTATION and FAQ first!
*/