]> jfr.im git - solanum.git/blame - doc/oper-guide/config.rst
merge two index pages
[solanum.git] / doc / oper-guide / config.rst
CommitLineData
2ae078d8
AB
1.. contents::
2 :depth: 3
3..
4
5Server config file format
6=========================
7
8General format
9==============
10
11The config file consists of a series of BIND-style blocks. Each block
12consists of a series of values inside it which pertain to configuration
13settings that apply to the given block.
14
15Several values take lists of values and have defaults preset inside
16them. Prefix a keyword with a tilde (~) to override the default and
17disable it.
18
19A line may also be a .include directive, which is of the form .include
20"file" and causes file to be read in at that point, before the rest of
21the current file is processed. Relative paths are first tried relative
22to PREFIX and then relative to ETCPATH (normally PREFIX/etc).
23
24Anything from a # to the end of a line is a comment. Blank lines are
25ignored. C-style comments are also supported.
26
27Specific blocks and directives
28==============================
29
30Not all configuration blocks and directives are listed here, only the
31most common ones. More blocks and directives will be documented in later
32revisions of this manual.
33
34loadmodule directive
35--------------------
36
37loadmodule "
38text
39";
40Loads a module into the IRCd. In charybdis 1.1, most modules are
41automatically loaded in. In future versions, it is intended to remove
42this behaviour as to allow for easy customization of the IRCd's
43featureset.
44
45serverinfo {} block
46-------------------
47
48serverinfo { name = "
49text
50"; sid = "
51text
52"; description = "
53text
54"; network\_name = "
55text
56"; hub =
57boolean
58; vhost = "
59text
60"; vhost6 = "
61text
62"; };
63The serverinfo {} block defines the core operational parameters of the
64IRC server.
65
66name
67 The name of the IRC server that you are configuring. This must
68 contain at least one dot. It is not necessarily equal to any DNS
69 name. This must be unique on the IRC network.
70
71sid
72 A unique ID which describes the server. This consists of one digit
73 and two characters which can be digits or letters.
74
75description
76 A user-defined field of text which describes the IRC server. This
77 information is used in /links and /whois requests. Geographical
78 location information could be a useful use of this field, but most
79 administrators put a witty saying inside it instead.
80
81network\_name
82 The name of the IRC network that this server will be a member of.
83 This is used in the welcome message and NETWORK= in 005.
84
85hub
86 A boolean which defines whether or not this IRC server will be
87 serving as a hub, i.e. have multiple servers connected to it.
88
89vhost
90 An optional text field which defines an IPv4 address from which
91 to connect outward to other IRC servers.
92
93vhost6
94 An optional text field which defines an IPv6 address from which
95 to connect outward to other IRC servers.
96
97admin {} block
98--------------
99
100admin { name = "
101text
102"; description = "
103text
104"; email = "
105text
106"; };
107This block provides the information which is returned by the ADMIN
108command.
109
110name
111 The name of the administrator running this service.
112
113description
114 The description of the administrator's position in the network.
115
116email
117 A point of contact for the administrator, usually an e-mail address.
118
119class {} block
120--------------
121
122class "
123name
124" { ping\_time =
125duration
126; number\_per\_ident =
127number
128; number\_per\_ip =
129number
130; number\_per\_ip\_global =
131number
132; cidr\_ipv4\_bitlen =
133number
134; cidr\_ipv6\_bitlen =
135number
136; number\_per\_cidr =
137number
138; max\_number =
139number
140; sendq =
141size
142; };
143class "
144name
145" { ping\_time =
146duration
147; connectfreq =
148duration
149; max\_number =
150number
151; sendq =
152size
153; };
154Class blocks define classes of connections for later use. The class name
155is used to connect them to other blocks in the config file (auth{} and
156connect{}). They must be defined before they are used.
157
158Classes are used both for client and server connections, but most
159variables are different.
160
161ping\_time
162 The amount of time between checking pings for clients, e.g.: 2
163 minutes
164
165number\_per\_ident
166 The amount of clients which may be connected from a single identd
167 username on a per-IP basis, globally. Unidented clients all count as
168 the same username.
169
170number\_per\_ip
171 The amount of clients which may be connected from a single IP
172 address.
173
174number\_per\_ip\_global
175 The amount of clients which may be connected globally from a single
176 IP address.
177
178cidr\_ipv4\_bitlen
179 The netblock length to use with CIDR-based client limiting for IPv4
180 users in this class (between 0 and 32).
181
182cidr\_ipv6\_bitlen
183 The netblock length to use with CIDR-based client limiting for IPv6
184 users in this class (between 0 and 128).
185
186number\_per\_cidr
187 The amount of clients which may be connected from a single netblock.
188
189 If this needs to differ between IPv4 and IPv6, make different
190 classes for IPv4 and IPv6 users.
191
192max\_number
193 The maximum amount of clients which may use this class at any given
194 time.
195
196sendq
197 The maximum size of the queue of data to be sent to a client before
198 it is dropped.
199
200ping\_time
201 The amount of time between checking pings for servers, e.g.: 2
202 minutes
203
204connectfreq
205 The amount of time between autoconnects. This must at least be one
206 minute, as autoconnects are evaluated with that granularity.
207
208max\_number
209 The amount of servers to autoconnect to in this class. More
210 precisely, no autoconnects are done if the number of servers in this
211 class is greater than or equal max\_number
212
213sendq
214 The maximum size of the queue of data to be sent to a server before
215 it is dropped.
216
217auth {} block
218-------------
219
220auth { user = "
221hostmask
222"; password = "
223text
224"; spoof = "
225text
226"; flags =
227list
228; class = "
229text
230"; };
231auth {} blocks allow client connections to the server, and set various
232properties concerning those connections.
233
234Auth blocks are evaluated from top to bottom in priority, so put special
235blocks first.
236
237user
238 A hostmask (user@host) that the auth {} block applies to. It is
239 matched against the hostname and IP address (using :: shortening for
240 IPv6 and prepending a 0 if it starts with a colon) and can also use
241 CIDR masks. You can have multiple user entries.
242
243password
244 An optional password to use for authenticating into this auth{}
245 block. If the password is wrong the user will not be able to connect
246 (will not fall back on another auth{} block).
247
248spoof
249 An optional fake hostname (or user@host) to apply to users
250 authenticated to this auth{} block. In STATS i and TESTLINE, an
251 equals sign (=) appears before the user@host and the spoof is shown.
252
253flags
254 A list of flags to apply to this auth{} block. They are listed
255 below. Some of the flags appear as a special character,
256 parenthesized in the list, before the user@host in STATS i and
257 TESTLINE.
258
259class
260 A name of a class to put users matching this auth{} block into.
261
262encrypted
263 The password used has been encrypted.
264
265spoof\_notice
266 Causes the IRCd to send out a server notice when activating a spoof
267 provided by this auth{} block.
268
269exceed\_limit (>)
270 Users in this auth{} block can exceed class-wide limitations.
271
272dnsbl\_exempt ($)
273 Users in this auth{} block are exempted from DNS blacklist checks.
274 However, they will still be warned if they are listed.
275
276kline\_exempt (^)
277 Users in this auth{} block are exempted from DNS blacklists, k:lines
278 and x:lines.
279
280spambot\_exempt
281 Users in this auth{} block are exempted from spambot checks.
282
283shide\_exempt
284 Users in this auth{} block are exempted from some serverhiding
285 effects.
286
287jupe\_exempt
288 Users in this auth{} block do not trigger an alarm when joining
289 juped channels.
290
291resv\_exempt
292 Users in this auth{} block may use reserved nicknames and channels.
293
294 **Note**
295
296 The initial nickname may still not be reserved.
297
298flood\_exempt (\|)
299 Users in this auth{} block may send arbitrary amounts of commands
300 per time unit to the server. This does not exempt them from any
301 other flood limits. You should use this setting with caution.
302
303no\_tilde (-)
304 Users in this auth{} block will not have a tilde added to their
305 username if they do not run identd.
306
307need\_ident (+)
308 Users in this auth{} block must have identd, otherwise they will be
309 rejected.
310
311need\_ssl
312 Users in this auth{} block must be connected via SSL/TLS, otherwise
313 they will be rejected.
314
315need\_sasl
316 Users in this auth{} block must identify via SASL, otherwise they
317 will be rejected.
318
319exempt {} block
320---------------
321
322exempt { ip = "
323ip
324"; };
325An exempt block specifies IP addresses which are exempt from D:lines and
326throttling. Multiple addresses can be specified in one block. Clients
327coming from these addresses can still be K/G/X:lined or banned by a DNS
328blacklist unless they also have appropriate flags in their auth{} block.
329
330ip
331 The IP address or CIDR range to exempt.
332
333privset {} block
334----------------
335
336privset { extends = "
337name
338"; privs =
339list
340; };
341A privset (privilege set) block specifies a set of operator privileges.
342
343extends
344 An optional privset to inherit. The new privset will have all
345 privileges that the given privset has.
346
347privs
348 Privileges to grant to this privset. These are described in the
349 operator privileges section.
350
351operator {} block
352-----------------
353
354operator "
355name
356" { user = "
357hostmask
358"; password = "
359text
360"; rsa\_public\_key\_file = "
361text
362"; umodes =
363list
364; snomask = "
365text
366"; flags =
367list
368; };
369Operator blocks define who may use the OPER command to gain extended
370privileges.
371
372user
373 A hostmask that users trying to use this operator {} block must
374 match. This is checked against the original host and IP address;
375 CIDR is also supported. So auth {} spoofs work in operator {}
376 blocks; the real host behind them is not checked. Other kind of
377 spoofs do not work in operator {} blocks; the real host behind them
378 is checked.
379
380 Note that this is different from charybdis 1.x where all kinds of
381 spoofs worked in operator {} blocks.
382
383password
384 A password used with the OPER command to use this operator {} block.
385 Passwords are encrypted by default, but may be unencrypted if
386 ~encrypted is present in the flags list.
387
388rsa\_public\_key\_file
389 An optional path to a RSA public key file associated with the
390 operator {} block. This information is used by the CHALLENGE
391 command, which is an alternative authentication scheme to the
392 traditional OPER command.
393
394umodes
395 A list of usermodes to apply to successfully opered clients.
396
397snomask
398 An snomask to apply to successfully opered clients.
399
400privset
401 The privilege set granted to successfully opered clients. This must
402 be defined before this operator{} block.
403
404flags
405 A list of flags to apply to this operator{} block. They are listed
406 below.
407
408encrypted
409 The password used has been encrypted. This is enabled by default,
410 use ~encrypted to disable it.
411
412need\_ssl
413 Restricts use of this operator{} block to SSL/TLS connections only.
414
415connect {} block
416----------------
417
418connect "
419name
420" { host = "
421text
422"; send\_password = "
423text
424"; accept\_password = "
425text
426"; port =
427number
428; hub\_mask = "
429mask
430"; leaf\_mask = "
431mask
432"; class = "
433text
434"; flags =
435list
436; aftype =
437protocol
438; };
439Connect blocks define what servers may connect or be connected to.
440
441host
442 The hostname or IP to connect to.
443
444 **Note**
445
446 Furthermore, if a hostname is used, it must have an A or AAAA
447 record (no CNAME) and it must be the primary hostname for
448 inbound connections to work.
449
450send\_password
451 The password to send to the other server.
452
453accept\_password
454 The password that should be accepted from the other server.
455
456port
457 The port on the other server to connect to.
458
459hub\_mask
460 An optional domain mask of servers allowed to be introduced by this
461 link. Usually, "\*" is fine. Multiple hub\_masks may be specified,
462 and any of them may be introduced. Violation of hub\_mask and
463 leaf\_mask restrictions will cause the local link to be closed.
464
465leaf\_mask
466 An optional domain mask of servers not allowed to be introduced by
467 this link. Multiple leaf\_masks may be specified, and none of them
468 may be introduced. leaf\_mask has priority over hub\_mask.
469
470class
471 The name of the class this server should be placed into.
472
473flags
474 A list of flags concerning the connect block. They are listed below.
475
476aftype
477 The protocol that should be used to connect with, either ipv4 or
478 ipv6. This defaults to neither, allowing connection using either
479 address family.
480
481encrypted
482 The value for accept\_password has been encrypted.
483
484autoconn
485 The server should automatically try to connect to the server defined
486 in this connect {} block if it's not connected already and
487 max\_number in the class is not reached yet.
488
489compressed
490 Ziplinks should be used with this server connection. This compresses
491 traffic using zlib, saving some bandwidth and speeding up netbursts.
492
493 If you have trouble setting up a link, you should turn this off as
494 it often hides error messages.
495
496topicburst
497 Topics should be bursted to this server.
498
499 This is enabled by default.
500
501listen {} block
502---------------
503
504listen { host = "
505text
506"; port =
507number
508; };
509A listen block specifies what ports a server should listen on.
510
511host
512 An optional host to bind to. Otherwise, the ircd will listen on all
513 available hosts.
514
515port
516 A port to listen on. You can specify multiple ports via commas, and
517 define a range by seperating the start and end ports with two dots
518 (..).
519
520modules {} block
521----------------
522
523modules { path = "
524text
525"; module =
526text
527; };
528The modules block specifies information for loadable modules.
529
530path
531 Specifies a path to search for loadable modules.
532
533module
534 Specifies a module to load, similar to loadmodule.
535
536general {} block
537----------------
538
539modules {
540values
541};
542The general block specifies a variety of options, many of which were in
543``config.h`` in older daemons. The options are documented in
544``reference.conf``.
545
546channel {} block
547----------------
548
549modules {
550values
551};
552The channel block specifies a variety of channel-related options, many
553of which were in ``config.h`` in older daemons. The options are
554documented in ``reference.conf``.
555
556serverhide {} block
557-------------------
558
559modules {
560values
561};
562The serverhide block specifies options related to server hiding. The
563options are documented in ``reference.conf``.
564
565blacklist {} block
566------------------
567
568blacklist { host = "
569text
570"; reject\_reason = "
571text
572"; };
573The blacklist block specifies DNS blacklists to check. Listed clients
574will not be allowed to connect. IPv6 clients are not checked against
575these.
576
577Multiple blacklists can be specified, in pairs with first host then
578reject\_reason.
579
580host
581 The DNSBL to use.
582
583reject\_reason
584 The reason to send to listed clients when disconnecting them.
585
586alias {} block
587--------------
588
589alias "
590name
591" { target = "
592text
593"; };
594Alias blocks allow the definition of custom commands. These commands
595send PRIVMSG to the given target. A real command takes precedence above
596an alias.
597
598target
599 The target nick (must be a network service (umode +S)) or
600 user@server. In the latter case, the server cannot be this server,
601 only opers can use user starting with "opers" reliably and the user
602 is interpreted on the target server only so you may need to use
603 nick@server instead).
604
605cluster {} block
606----------------
607
608cluster { name = "
609text
610"; flags =
611list
612; };
613The cluster block specifies servers we propagate things to
614automatically. This does not allow them to set bans, you need a separate
615shared{} block for that.
616
617Having overlapping cluster{} items will cause the command to be executed
618twice on the target servers. This is particularly undesirable for ban
619removals.
620
621The letters in parentheses denote the flags in /stats U.
622
623name
624 The server name to share with, this may contain wildcards and may be
625 stacked.
626
627flags
628 The list of what to share, all the name lines above this (up to
629 another flags entry) will receive these flags. They are listed
630 below.
631
632kline (K)
633 Permanent K:lines
634
635tkline (k)
636 Temporary K:lines
637
638unkline (U)
639 K:line removals
640
641xline (X)
642 Permanent X:lines
643
644txline (x)
645 Temporary X:lines
646
647unxline (Y)
648 X:line removals
649
650resv (Q)
651 Permanently reserved nicks/channels
652
653tresv (q)
654 Temporarily reserved nicks/channels
655
656unresv (R)
657 RESV removals
658
659locops (L)
660 LOCOPS messages (sharing this with \* makes LOCOPS rather similar to
661 OPERWALL which is not useful)
662
663all
664 All of the above
665
666shared {} block
667---------------
668
669shared { oper = "
670user@host
671", "
672server
673"; flags =
674list
675; };
676The shared block specifies opers allowed to perform certain actions on
677our server remotely. These are ordered top down. The first one matching
678will determine the oper's access. If access is denied, the command will
679be silently ignored.
680
681The letters in parentheses denote the flags in /stats U.
682
683oper
684 The user@host the oper must have, and the server they must be on.
685 This may contain wildcards.
686
687flags
688 The list of what to allow, all the oper lines above this (up to
689 another flags entry) will receive these flags. They are listed
690 below.
691
692 **Note**
693
694 While they have the same names, the flags have subtly different
695 meanings from those in the cluster{} block.
696
697kline (K)
698 Permanent and temporary K:lines
699
700tkline (k)
701 Temporary K:lines
702
703unkline (U)
704 K:line removals
705
706xline (X)
707 Permanent and temporary X:lines
708
709txline (x)
710 Temporary X:lines
711
712unxline (Y)
713 X:line removals
714
715resv (Q)
716 Permanently and temporarily reserved nicks/channels
717
718tresv (q)
719 Temporarily reserved nicks/channels
720
721unresv (R)
722 RESV removals
723
724all
725 All of the above; this does not include locops, rehash, dline,
726 tdline or undline.
727
728locops (L)
729 LOCOPS messages (accepting this from \* makes LOCOPS rather similar
730 to OPERWALL which is not useful); unlike the other flags, this can
731 only be accepted from \*@\* although it can be restricted based on
732 source server.
733
734rehash (H)
735 REHASH commands; all options can be used
736
737dline (D)
738 Permanent and temporary D:lines
739
740tdline (d)
741 Temporary D:lines
742
743undline (E)
744 D:line removals
745
746none
747 Allow nothing to be done
748
749service {} block
750----------------
751
752service { name = "
753text
754"; };
755The service block specifies privileged servers (services). These servers
756have extra privileges such as setting login names on users and
757introducing clients with umode +S (unkickable, hide channels, etc). This
758does not allow them to set bans, you need a separate shared{} block for
759that.
760
761Do not place normal servers here.
762
763Multiple names may be specified but there may be only one service{}
764block.
765
766name
767 The server name to grant special privileges. This may not contain
768 wildcards.
769
770Hostname resolution (DNS)
771=========================
772
773Charybdis uses solely DNS for all hostname/address lookups (no
774``/etc/hosts`` or anything else). The DNS servers are taken from
775``/etc/resolv.conf``. If this file does not exist or no valid IP
776addresses are listed in it, the local host (127.0.0.1) is used. (Note
777that the latter part did not work in older versions of Charybdis.)
778
779IPv4 as well as IPv6 DNS servers are supported, but it is not possible
780to use both IPv4 and IPv6 in ``/etc/resolv.conf``.
781
782For both security and performance reasons, it is recommended that a
783caching nameserver such as BIND be run on the same machine as Charybdis
784and that ``/etc/resolv.conf`` only list 127.0.0.1.