Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / doc / example.conf
1 # ircd.conf  configuration file for ircd version ircu2.9.mu and ircu2.10
2 #
3 # Written by Niels <niels@undernet.org>, based on the original example.conf,
4 # server code and some real-life (ahem) experience.
5 #
6 # Thanks and credits to: Run, Trillian, Cym, Morrissey, Chaos, Flynn,
7 #                        Xorath, WildThang, Mmmm, SeKs, Ghostwolf and
8 #                        all other Undernet IRC Admins and Operators,
9 #                        and programmers working on the Undernet ircd.
10
11 # This is an example of the configuration file used by the Undernet ircd.
12 #
13 # This document is based on a (fictious) server in Europe with a
14 # connection to the Undernet IRC network. It is primarily a leaf server,
15 # but if all the other hubs in Europe aren't in service, it can connect
16 # to one in the US by itself.
17 #
18 # All configuration options start with a letter identifying the option,
19 # and a colon separated list of options. An asterisk indicates an
20 # unused field.
21 #
22 # Please note that when ircd puts the configuration lines into practice,
23 # it parses them exactly the other way round than they are listed here.
24 # This means that you should start your I: lines with the "fall through",
25 # most vanilla one and end with the most detailed.
26 #
27 # There is a difference between the ``hostname'' and the ``server name''
28 # of the machine that the server is run on. For example, the host can
29 # have ``veer.cs.vu.nl'' as FQDN, and ``Amsterdam.NL.EU.undernet.org'' as
30 # server name.
31 # A ``server mask'' is something like '*.EU.UnderNet.org'', which is
32 # matched by 'Amsterdam.NL.EU.undernet.org' but not by
33 # 'Manhattan.KS.US.undernet.org'.
34
35 #
36 # First some information about the server.
37 # M:<server name>:<virtual host>:<description>:<server port>:<server numeric>
38 #
39 # <virtual host> must contain either a * or a valid IPv4 address in
40 # dotted quad notation. (127.0.0.1) The address MUST be the address
41 # of a physical interface on the host. This address is used for outgoing
42 # connections only, see P:lines for listener virtual hosting.
43 # If in doubt put a * or the IP of your primary interface here.
44 # The server must be compiled with virtual hosting turned on to get this
45 # to work correctly.
46 #
47 # The <server port> is no longer used.
48 # Ports need to be specified with a P: line, see below.
49 # At some point in the future we may want to use the port value for
50 # server capacity. --Bleep
51 #
52 # Note that <server numeric> has to be unique on the network your server
53 # is running on, must be between 1 and 64, and is not updated on a rehash.
54
55 M:London.UK.Eu.UnderNet.org:*:University of London, England:0:1
56
57 #
58 # This sets information that can be retrieved with the /ADMIN command.
59 # It should contain at least an admin Email contact address.
60 # A:<line 1>:<line 2>:<line 3>
61
62 A:The University of London:Undernet IRC server:IRC Admins <irc@london.ac.uk>
63
64 #
65 # All connections to the server are associated with a certain ``connection
66 # class'', be they incoming or outgoing (initiated by the server), be they
67 # clients, servers or Martians. (Note that ircd doesn't have direct support
68 # for Martians (yet?); they will have to register as normal users. ;-)
69 # Take the following Y: lines only as a guide.
70 # Y:<class>:<ping freq>:<connect freq>:<maximum links>:<sendq size>
71
72 # <connect freq> applies only to servers, and specifies the frequency 
73 # that the server tries to autoconnect. setting this to 0 will cause
74 # the server to attempt to connect repeatedly with no delay until the 
75 # <maximum links> condition is satisfied. This is a Bad Thing(tm).
76
77 # <maximum links> has different meanings for clients and servers.
78 # For clients, it is the total number of connections allowed for the class.
79 # Thus, if it is set to 100, then up to 100 clients can connect in that class.
80
81 # Auto-connecting
82 # For servers, <maximum links> is the number of remote servers, in that class, that the
83 # server will attempt to be connected to. The server will initiate auto connections
84 # until it is connected to <maximum links> remote servers. This field DOES NOT limit
85 # the total number of servers that can be manually connected.
86 # To turn off auto connecting, <maximum links> should be set to 0.
87 # Note that MAXIMUM_LINKS (defined in make config) sets a hard limit on the number
88 # of servers that can be connected and still have the server attempt auto-connections.
89 # It is usually set to 1, which means a server will not attempt auto connects with a server
90 # already connected, regardless of how the Y:lines are set up.
91
92 # Server classes: 90 = all your uplinks for who you do not wish to hub;
93 # 80 = leaf servers (only used if your server is a hub)
94
95 Y:90:90:300:1:9000000
96 Y:80:90:300:0:9000000
97
98 # Client classes. 10 = locals; 2 = for all .net and .com that are not
99 # in Europe; 1 = for everybody.
100
101 Y:10:90:0:100:160000
102 Y:2:90:0:5:80000
103 Y:1:90:0:400:160000
104
105 #
106 # To allow clients to connect, they need authorization. This can be
107 # done based on hostmask, address mask, and/or with a password.
108 # With intelligent use of classes and the maxconnections field in the
109 # Y: lines, you can let in a specific domain, but get rid of all other
110 # domains in the same toplevel, thus setting up some sort of 'reverse
111 # K: line'.
112 # I:<IP mask or crap to force resolving>:<opt passwd>:<hostmask>::<class>
113
114 # Technical description (for examples, see below):
115 # For every connecting client, the IP-number is know.  A reverse lookup
116 # on this IP-number is done to get the (/all) hostname(s).
117 # Each hostname that belongs to this IP-number is matched to <hostmask>,
118 # and the I: line is used when any matches; the client will then show
119 # with this particular hostname.  If none of the hostnames matches, then
120 # the IP-number is matched against the <IP mask ...> field, if this matches
121 # then the I: line is used nevertheless and the client will show with the
122 # first (main) hostname if any; if the IP-number did not resolve then the
123 # client will show with the dot notation of the IP-number.
124 # There is a special case for the UNIX domain sockets and localhost connections
125 # though; in this case the <IP mask ...> field is compared with the
126 # name of the server (thus not with any IP-number representation). The name
127 # of the server is the one returned in the numeric 002 reply, for example:
128 # 002 Your host is 2.undernet.org[jolan.ppro], running version ...
129 # Then the "jolan.ppro" is the name used for matching.
130 # Therefore, unix domain sockets, and connections to localhost would
131 # match this I: line:
132 # I:jolan.ppro::foobar::1
133 # Finally, I: lines with empty <IP mask ..> or <hostmask> fields are skipped.
134
135 # This is the 'fallback' entry. All .uk, .nl, and all unresolved are
136 # in these two lines.
137 # By using two different lines, multiple connections from a single IP
138 # are only allowed from hostnames which have both valid forward and
139 # reverse DNS mappings.
140
141 I:*@*:1:Unresolved::1
142 I:Resolved::*@*::1
143
144 # If you don't want unresolved dudes to be able to connect to your
145 # server, use just:
146 # I:NotMatchingCrap::*@*::1
147
148 # Here, take care of all American ISPs.
149 I:Resolved::*@*.com::2
150 I:Resolved::*@*.net::2
151
152 # Now list all the .com / .net domains that you wish to have access...
153 # actually it's less work to do it this way than to do it the other
154 # way around - K: lining every single ISP in the US.
155 # I wish people in Holland just got a .nl domain, and not try to be
156 # cool and use .com...
157 I:Resolved::*@*.wirehub.net::1
158 I:Resolved::*@*.planete.net::1
159 I:Resolved::*@*.ivg.com::1
160 I:Resolved::*@*.ib.com::1
161 I:Resolved::*@*.ibm.net::1
162 I:Resolved::*@*.hydro.com::1
163 I:Resolved::*@*.NL.net::1
164
165 # You can request a more complete listing, including the "list of standard
166 # K-lines" from the Routing Committee; it will also be sent to you if
167 # you apply for a server and get accepted.
168
169 # Ourselves - this makes sure that we can get in, no matter how full
170 # the server is (hopefully).
171 I:*@193.37.*::*@*.london.ac.uk::10
172
173 # You can put a digit (0..9) in the password field, which will make ircd
174 # only accept a client when the total number of connections to the network
175 # from the same IP number doesn't exceed this number.
176 # The following example would accept at most one connection per IP number
177 # from "*.swipnet.se" and at most two connections from dial up accounts
178 # that have "dial??.*" as host mask:
179 # I:Resolved:1:*@*.swipnet.se::1
180 # I:Resolved:2:*@dial??.*::1
181
182 #
183 # T:Lines
184 #
185 # It is possible to show a different Message of the Day to a connecting
186 # client depending on its origin.
187 # T:<hostmask>:<path to motd file>
188 # or:
189 # T:<classnumber>:<path to motd file>
190 #
191 # DPATH/net_com.motd contains a special MOTD where users are encouraged
192 # to register their domains and get their own I: lines if they're in
193 # Europe, or move to US.UnderNet.org if they're in the USA.
194 T:*.net:net_com.motd
195 T:*.com:net_com.motd
196
197 # A different MOTD for ourselves, where we point out that the helpdesk
198 # better not be bothered with questions regarding irc...
199 T:*.london.ac.uk:london.motd
200
201 #
202 # One of the many nice features of Undernet is ``Uworld'', a program
203 # connected to the net as a server. This allows it to broadcast any mode
204 # change, thus allowing opers to, for example, 'unlock' a channel that
205 # has been taken over.
206 # There is only one slight problem: the TimeStamp protocol prevents this.
207 # So there is a configuration option to allow them anyway from a certain
208 # server.
209 # Note: (1) These lines are agreed on by every server admin on Undernet;
210 # (2) These lines must be the same on every single server, or results
211 # will be disasterous; (3) This is a useful feature, not something that
212 # is a liability and abused regularly (well... :-)
213 # If you're on Undernet, you MUST have these lines. I cannnot stress
214 # this enough.
215 # As of ircu2.10.05 is it possible to Jupe nicks. Juped nicks need to be
216 # added to U: lines.  As per CFV-0095, the following nicks must be juped,
217 # it is not allowed to jupe others as well.
218
219 U:Uworld.EU.undernet.org:EuWorld,E,protocol,StatServ,NoteServ,Undernet:*
220 U:Uworld2.undernet.org:UWorld2,W,ChanSvr,ChanSaver,ChanServ,COM1,COM2,COM3,COM4:*
221 U:Uworld.undernet.org:Uworld,X,NickSvr,NickSaver,NickServ,LPT1,LPT2,AUX:*
222
223 #
224 # While running your server, you will most probably encounter individuals
225 # or groups of persons that you do not wish to have access to your server.
226 #
227 # For this purpose, the ircd understands "kill lines".
228 # K:<host/IP mask>:"<opt reason>":<username mask>
229 #
230 # It is possible to use a file as comment for the ban.
231 # K:<host/IP mask>:!<path to file>:<usermask>
232 #
233 # The default reason is: "You are banned from this server"
234 # Note that K: lines are local to the server; if you ban a person or a
235 # whole domain from your server, they can get on IRC via any other server
236 # that doesn't have them K: lined (yet).
237
238 # With a simple comment, using quotes:
239 K:*.au:"Please use a nearer server":*
240 K:*.edu:"Please use a nearer server":*
241
242 # With a file, prepending a '!' before the filename.
243 # The file can contain for example, a reason, a link to the
244 # server rules and a contact address.
245 K:unixbox.flooder.co.uk:!kline/youflooded.txt:*luser
246
247 #
248 # IP-based kill lines are designated with a lowercase 'k'.  These lines
249 # use the same format as normal K: lines, except they apply to all hosts,
250 # even if an IP address has a properly resolving host name.
251 k:192.168.*:!klines/martians:*
252
253 # Additionally, you may specify a hostmask prefixed with $R to indicate
254 # a match should be performed against the "real-name" / "info" field
255 # instead of the host/IP.
256 K:$R*sub7*:"You are infected with a Trojan":*
257
258 #
259 # You probably want your server connected to other servers, so your users
260 # have other users to chat with.
261 # IRC servers connect to other servers forming a network with a star or
262 # tree topology. Loops are not allowed.
263 # In this network, two servers can be distinguished: "hub" and "leaf"
264 # servers. Leaf servers connect to hubs; hubs connect to each other.
265 # Of course, many servers can't be directly classified in one of these
266 # categories. Both a fixed and a rule-based decision making system for
267 # server links is provided for ircd to decide what links to allow, what
268 # to let humans do themselves, and what links to (forcefully) disallow.
269 #
270 # The Connection lines (also known as C lines)
271 # define what servers the server connect to, and which servers are
272 # allowed to connect.
273 # C:<remote hostname or IP>:<password>:<remote server name>:<port>:<class>
274 #
275 # The "port" field defines the default port the server tries to connect
276 # to if an operator uses /connect without specifying a port. This is also
277 # the port used when the server attempts to auto-connect to the remote 
278 # server. (See Y:lines for more informationa about auto-connects).
279
280 # Our primary uplink.
281 C:1.2.3.4:passwd:Amsterdam.NL.Eu.UnderNet.org:4400:90
282
283 #
284 # If your server starts on a bit larger network, you'll probably get
285 # assigned one or two uplinks to which your server can connect.
286 # If your uplink(s) also connect to other servers than yours (which is
287 # probable), you need to define your uplink as being allowed to "hub".
288 # H:<allowed hostmask>::<server name>
289 H:*.*::Amsterdam.NL.Eu.UnderNet.org
290
291 #
292 # Of course, the opposite is also possible: forcing a server to be
293 # a leaf. L: lines follow Murphy's Law: if you use them, there's a big
294 # chance that routing will be screwed up afterwards.
295 # L:<opt disallowed hostmask>::<server mask>:<opt max depth>
296
297 #
298 # For an advanced, real-time rule-based routing decision making system
299 # you can use Disallow lines. For more information, see doc/readme.crules.
300 # D:<server mask that ircd will refuse to connect to>::<rule>
301 # d:<server mask that ircd will not autoconnect to>::<rule>
302 # D:*.US.UnderNet.org::connected(*.US.UnderNet.org)
303 # d:*.EU.UnderNet.org::connected(Amsterdam.NL.EU.*)
304
305 # The following line is recommended for leaf servers:
306 # d:*::directcon(*)
307
308 #
309 # Inevitably, you have reached the part about "IRC Operators". Oper status
310 # grants some special privileges to a user, like the power to make the
311 # server break or (try to) establish a connection with another server,
312 # and to "kill" users off IRC.
313 # I can write many pages about this; I will restrict myself to saying that
314 # if you want to appoint somebody as IRC Operator on your server, that
315 # person should be aware of his/her responsibilities, and that you, being
316 # the admin, will be held accountable for their actions.
317 #
318 # There are two sorts of IRC Operators: "local" and "global". Local opers
319 # can squit, connect and kill - but only locally: their +o user mode
320 # is not not passed along to other servers. On Undernet, this prevents
321 # them from using Uworld as well.
322 # Depending on some defines in include/config.h, local operators are also
323 # not allowed to /DIE and /RESTART the server.
324 # Local operators are designated with a lowercase 'o'
325 # O:<host/IP mask>:<encrypted password>:<Nick>::<connection class>
326 # o:<host/IP mask>:<encrypted password>:<Nick>::<connection class>
327
328 O:*@*.cs.vu.nl:VRKLKuGKn0jLs:Niels::10
329
330 # Note that the <connection class> is optional, but leaving it away
331 # puts the O: lines in class 0, which usually only accepts one connection
332 # at a time.  If you want users to Oper up more then once per O: line,
333 # then use a connection class that allows more then one connection,
334 # for example (using class 10 as in the example above):
335 # Y:10:90:0:100:160000
336
337 # [P:lines]
338 # When your server gets fuller, you will notice delays when trying to
339 # connect to your server's primary listening port. Via the Port lines
340 # it is possible to specify additional ports for ircd to listen to.
341 # De facto ports are: 6667 - standard; 6660-6669 - additional client
342 # ports;
343 # Undernet uses 4400 for server listener ports.
344 # These are just hints, they are in no way official IANA or IETF policies.
345 # IANA says we should use port 194, but that requires us to run as root, so
346 # we don't do that.
347 #
348 # P:<hostmask>:<interface>:<[CS][H]>:<port number>
349 #
350 # The hostmask setting allows you to specify a range of IP addresses that
351 # you will allow connections from. This should only contain IP addresses
352 # and '*' if used. This field only uses IP addresses. This does not use
353 # DNS in any way so you can't use it to allow *.nl or *.uk. Attempting
354 # to specify anything other than numbers, dots and stars [0-9.*] will result
355 # in the port allowing connections from anyone.
356 #
357 # The interface setting allows multiply homed hosts to specify which
358 # interface to use on a port by port basis, if an interface is not specified
359 # the default interface will be used. The interface MUST be the complete
360 # IP address for a real hardware interface on the machine running ircd.
361 # If you want to use virtual hosting *YOU* *MUST* *USE* *THIS* otherwise it
362 # WILL bind to all interfaces - not what most people seem to expect.
363 #
364 # The [CS][H] field is an optional field to specify that a port is a
365 # server port or a client port and whether it's hidden or not.
366 # If used the first character MUST be either a C or S.
367 # If you want to hide a port from /stats p from non-opers follow the C
368 # or S with an H
369 #
370 # P:<hostmask>:<interface>:<[CS][H]>:<port number>
371 #
372 # This is a normal server port, you need to have at least one server
373 # port defined if you want to connect your server to other servers.
374 P:::S:4400
375 # This is a Server port that is Hidden
376 #P:::SH:4401
377
378 # The following are normal client ports
379 P:::C:6667
380 P::::6668
381 P:192.168.*:::6666
382
383 # This is a hidden client port, listening on the interface associated
384 # with the IP address 168.8.21.107
385 #P:*:168.8.21.107:CH:7000
386
387 # [F:lines]
388 # IRC servers have a large number of options and features.  Most of these
389 # are set at compile time through the use of #define's--see "make config"
390 # for more details--but we are working to move many of these into the
391 # configuration file.  Feature lines are the hook we're using for this.
392 #
393 # F:<key>:<value>[:<value>[...]]
394 #
395 # Currently, the only defined value for <key> is "LOG," and it allows you
396 # to customize the settings of the logging architecture.  You can set the
397 # default logging facility to, say, local7 (F:LOG:LOCAL7), or set a log
398 # file for one of the subsystems (F:LOG:GLINE:FILE:gline.log).  More than
399 # one subsystem can log to the same file without danger of interleaving.
400 #
401 # The currently defined subsystems are SYSTEM, CONFIG, OPERMODE (used by
402 # /opmode and /clearmode), GLINE, JUPE, WHO (used by /whox), NETWORK
403 # (connects and disconnects), OPERKILL, SERVKILL, USER, OPER, OPERLOG,
404 # USERLOG, RESOLVER, SOCKET, DEBUG, and OLDLOG.  You can set log files
405 # for these subsystems to log to, or you can tell them to syslog their
406 # data, or even send server notices.  You can do any of these in
407 # combination, but you can't log to more than one file.  You can also set
408 # minimum log levels per subsystem, if you wish.
409 #
410 # The format for LOG Feature lines is as follows:
411 #
412 # F:LOG:<facility>
413 # F:LOG:<subsystem>:<type>[:<value>]
414 #
415 # The first sets the default facility for ircu to log to to <facility>.
416 # Valid <facility> values are listed in the syslog(3) man page; just
417 # remove the "LOG_" prefix.
418 #
419 # The list of subsystems is given above.  The valid values for <type> are
420 # FILE, FACILITY, SNOMASK, and LEVEL, which respectively set the log file,
421 # the syslog facility, a server notice mask value, and the minimum log
422 # level.  If no <value> is given, or if <value> is empty, the default
423 # value for that type is set.
424 #
425 # Valid <value>'s for the FACILITY type are the normal syslog values (with
426 # the "LOG_" prefix removed) or the special values "NONE" (which specifies
427 # that syslogging should not be attempted) and "DEFAULT" (which specifies
428 # that the server-wide facility should be used); the default for all
429 # subsystems is "NONE."
430 #
431 # Valid <value>'s for the SNOMASK type are OLDSNO, SERVKILL, OPERKILL,
432 # HACK2, HACK3, UNAUTH, TCPCOMMON, TOOMANY, HACK4, GLINE, NETWORK,
433 # IPMISMATCH, THROTTLE, OLDREALOP, and CONNEXIT, as well as the special
434 # values NONE, which specifies that no server notices should be sent,
435 # and DEBUG, which is only available if DEBUGMODE has been enabled.
436 #
437 # Valid <value>'s for the LEVEL type are CRIT, ERR, WARNING, NOTICE,
438 # TRACE, INFO, and DEBUG.  Note that logs with level CRIT always result
439 # in server notices to mask SNO_OLDSNO, and logs with level DEBUG always
440 # send server notices to mask SNO_DEBUG.
441 #
442 # A couple of things to note: log settings are not reset to defaults prior
443 # to a rehash; this means that if you delete F-lines and rehash, logs will
444 # continue going to the same place.  Also, all subsystems are defaulted to
445 # minimum log level INFO (or DEBUG if DEBUGMODE is #define'd).
446
447 #
448 # Well, you have now reached the end of this sample configuration file
449 # If you have any questions, feel free to mail <doco-com@undernet.org>
450 # or <coder-com@undernet.org>.
451 # If you are interested in linking your server to the Undernet IRC network
452 # visit http://www.routing-com.undernet.org/, and if there are any problems
453 # then contact <routing-com@undernet.org> asking for information.
454 # Upgrades of the Undernet ircd can be found on http://coder-com.undernet.org/.
455 #
456 # For the rest:  Good Luck!
457 #
458 #       -- Niels.