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