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 #
254 # You probably want your server connected to other servers, so your users
255 # have other users to chat with.
256 # IRC servers connect to other servers forming a network with a star or
257 # tree topology. Loops are not allowed.
258 # In this network, two servers can be distinguished: "hub" and "leaf"
259 # servers. Leaf servers connect to hubs; hubs connect to each other.
260 # Of course, many servers can't be directly classified in one of these
261 # categories. Both a fixed and a rule-based decision making system for
262 # server links is provided for ircd to decide what links to allow, what
263 # to let humans do themselves, and what links to (forcefully) disallow.
264 #
265 # The Connection lines (also known as C lines)
266 # define what servers the server connect to, and which servers are
267 # allowed to connect.
268 # C:<remote hostname or IP>:<password>:<remote server name>:<port>:<class>
269 #
270 # The "port" field defines the default port the server tries to connect
271 # to if an operator uses /connect without specifying a port. This is also
272 # the port used when the server attempts to auto-connect to the remote 
273 # server. (See Y:lines for more informationa about auto-connects).
274
275 # Our primary uplink.
276 C:1.2.3.4:passwd:Amsterdam.NL.Eu.UnderNet.org:4400:90
277
278 #
279 # If your server starts on a bit larger network, you'll probably get
280 # assigned one or two uplinks to which your server can connect.
281 # If your uplink(s) also connect to other servers than yours (which is
282 # probable), you need to define your uplink as being allowed to "hub".
283 # H:<allowed hostmask>::<server name>
284 H:*.*::Amsterdam.NL.Eu.UnderNet.org
285
286 #
287 # Of course, the opposite is also possible: forcing a server to be
288 # a leaf. L: lines follow Murphy's Law: if you use them, there's a big
289 # chance that routing will be screwed up afterwards.
290 # L:<opt disallowed hostmask>::<server mask>:<opt max depth>
291
292 #
293 # For an advanced, real-time rule-based routing decision making system
294 # you can use Disallow lines. For more information, see doc/readme.crules.
295 # D:<server mask that ircd will refuse to connect to>::<rule>
296 # d:<server mask that ircd will not autoconnect to>::<rule>
297 # D:*.US.UnderNet.org::connected(*.US.UnderNet.org)
298 # d:*.EU.UnderNet.org::connected(Amsterdam.NL.EU.*)
299
300 # The following line is recommended for leaf servers:
301 # d:*::directcon(*)
302
303 #
304 # Inevitably, you have reached the part about "IRC Operators". Oper status
305 # grants some special privileges to a user, like the power to make the
306 # server break or (try to) establish a connection with another server,
307 # and to "kill" users off IRC.
308 # I can write many pages about this; I will restrict myself to saying that
309 # if you want to appoint somebody as IRC Operator on your server, that
310 # person should be aware of his/her responsibilities, and that you, being
311 # the admin, will be held accountable for their actions.
312 #
313 # There are two sorts of IRC Operators: "local" and "global". Local opers
314 # can squit, connect and kill - but only locally: their +o user mode
315 # is not not passed along to other servers. On Undernet, this prevents
316 # them from using Uworld as well.
317 # Depending on some defines in include/config.h, local operators are also
318 # not allowed to /DIE and /RESTART the server.
319 # Local operators are designated with a lowercase 'o'
320 # O:<host/IP mask>:<encrypted password>:<Nick>::<connection class>
321 # o:<host/IP mask>:<encrypted password>:<Nick>::<connection class>
322
323 O:*@*.cs.vu.nl:VRKLKuGKn0jLs:Niels::10
324
325 # Note that the <connection class> is optional, but leaving it away
326 # puts the O: lines in class 0, which usually only accepts one connection
327 # at a time.  If you want users to Oper up more then once per O: line,
328 # then use a connection class that allows more then one connection,
329 # for example (using class 10 as in the example above):
330 # Y:10:90:0:100:160000
331
332 # [P:lines]
333 # When your server gets fuller, you will notice delays when trying to
334 # connect to your server's primary listening port. Via the Port lines
335 # it is possible to specify additional ports for ircd to listen to.
336 # De facto ports are: 6667 - standard; 6660-6669 - additional client
337 # ports;
338 # Undernet uses 4400 for server listener ports.
339 # These are just hints, they are in no way official IANA or IETF policies.
340 # IANA says we should use port 194, but that requires us to run as root, so
341 # we don't do that.
342 #
343 # P:<hostmask>:<interface>:<[CS][H]>:<port number>
344 #
345 # The hostmask setting allows you to specify a range of IP addresses that
346 # you will allow connections from. This should only contain IP addresses
347 # and '*' if used. This field only uses IP addresses. This does not use
348 # DNS in any way so you can't use it to allow *.nl or *.uk. Attempting
349 # to specify anything other than numbers, dots and stars [0-9.*] will result
350 # in the port allowing connections from anyone.
351 #
352 # The interface setting allows multiply homed hosts to specify which
353 # interface to use on a port by port basis, if an interface is not specified
354 # the default interface will be used. The interface MUST be the complete
355 # IP address for a real hardware interface on the machine running ircd.
356 # If you want to use virtual hosting *YOU* *MUST* *USE* *THIS* otherwise it
357 # WILL bind to all interfaces - not what most people seem to expect.
358 #
359 # The [CS][H] field is an optional field to specify that a port is a
360 # server port or a client port and whether it's hidden or not.
361 # If used the first character MUST be either a C or S.
362 # If you want to hide a port from /stats p from non-opers follow the C
363 # or S with an H
364 #
365 # P:<hostmask>:<interface>:<[CS][H]>:<port number>
366 #
367 # This is a normal server port, you need to have at least one server
368 # port defined if you want to connect your server to other servers.
369 P:::S:4400
370 # This is a Server port that is Hidden
371 #P:::SH:4401
372
373 # The following are normal client ports
374 P:::C:6667
375 P::::6668
376 P:192.168.*:::6666
377
378 # This is a hidden client port, listening on the interface associated
379 # with the IP address 168.8.21.107
380 #P:*:168.8.21.107:CH:7000
381
382 # [F:lines]
383 # IRC servers have a large number of options and features.  Most of these
384 # are set at compile time through the use of #define's--see "make config"
385 # for more details--but we are working to move many of these into the
386 # configuration file.  Feature lines are the hook we're using for this.
387 #
388 # F:<key>:<value>[:<value>[...]]
389 #
390 # Currently, the only defined value for <key> is "LOG," and it allows you
391 # to customize the settings of the logging architecture.  You can set the
392 # default logging facility to, say, local7 (F:LOG:LOCAL7), or set a log
393 # file for one of the subsystems (F:LOG:GLINE:FILE:gline.log).  More than
394 # one subsystem can log to the same file without danger of interleaving.
395 #
396 # The currently defined subsystems are SYSTEM, CONFIG, OPERMODE (used by
397 # /opmode and /clearmode), GLINE, JUPE, WHO (used by /whox), NETWORK
398 # (connects and disconnects), OPERKILL, SERVKILL, USER, OPER, OPERLOG,
399 # USERLOG, RESOLVER, SOCKET, DEBUG, and OLDLOG.  You can set log files
400 # for these subsystems to log to, or you can tell them to syslog their
401 # data, or even send server notices.  You can do any of these in
402 # combination, but you can't log to more than one file.  You can also set
403 # minimum log levels per subsystem, if you wish.
404 #
405 # The format for LOG Feature lines is as follows:
406 #
407 # F:LOG:<facility>
408 # F:LOG:<subsystem>:<type>[:<value>]
409 #
410 # The first sets the default facility for ircu to log to to <facility>.
411 # Valid <facility> values are listed in the syslog(3) man page; just
412 # remove the "LOG_" prefix.
413 #
414 # The list of subsystems is given above.  The valid values for <type> are
415 # FILE, FACILITY, SNOMASK, and LEVEL, which respectively set the log file,
416 # the syslog facility, a server notice mask value, and the minimum log
417 # level.  If no <value> is given, or if <value> is empty, the default
418 # value for that type is set.
419 #
420 # Valid <value>'s for the FACILITY type are the normal syslog values (with
421 # the "LOG_" prefix removed) or the special values "NONE" (which specifies
422 # that syslogging should not be attempted) and "DEFAULT" (which specifies
423 # that the server-wide facility should be used); the default for all
424 # subsystems is "NONE."
425 #
426 # Valid <value>'s for the SNOMASK type are OLDSNO, SERVKILL, OPERKILL,
427 # HACK2, HACK3, UNAUTH, TCPCOMMON, TOOMANY, HACK4, GLINE, NETWORK,
428 # IPMISMATCH, THROTTLE, OLDREALOP, and CONNEXIT, as well as the special
429 # values NONE, which specifies that no server notices should be sent,
430 # and DEBUG, which is only available if DEBUGMODE has been enabled.
431 #
432 # Valid <value>'s for the LEVEL type are CRIT, ERR, WARNING, NOTICE,
433 # TRACE, INFO, and DEBUG.  Note that logs with level CRIT always result
434 # in server notices to mask SNO_OLDSNO, and logs with level DEBUG always
435 # send server notices to mask SNO_DEBUG.
436 #
437 # A couple of things to note: log settings are not reset to defaults prior
438 # to a rehash; this means that if you delete F-lines and rehash, logs will
439 # continue going to the same place.  Also, all subsystems are defaulted to
440 # minimum log level INFO (or DEBUG if DEBUGMODE is #define'd).
441
442 #
443 # Well, you have now reached the end of this sample configuration file
444 # If you have any questions, feel free to mail <doco-com@undernet.org>
445 # or <coder-com@undernet.org>.
446 # If you are interested in linking your server to the Undernet IRC network
447 # visit http://www.routing-com.undernet.org/, and if there are any problems
448 # then contact <routing-com@undernet.org> asking for information.
449 # Upgrades of the Undernet ircd can be found on http://coder-com.undernet.org/.
450 #
451 # For the rest:  Good Luck!
452 #
453 #       -- Niels.