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 # Last Updated:  26, June 2001.
4 #
5 # Written by Niels <niels@undernet.org>, based on the original example.conf,
6 # server code and some real-life (ahem) experience.
7 #
8 # Updated and heavily modified by Braden <dbtem@yahoo.com>.
9 #
10 # Thanks and credits to: Run, Trillian, Cym, Morrissey, Chaos, Flynn,
11 #                        Xorath, WildThang, Mmmm, SeKs, Ghostwolf and
12 #                        all other Undernet IRC Admins and Operators,
13 #                        and programmers working on the Undernet ircd.
14 #
15 # This is an example of the configuration file used by the Undernet ircd.
16 #
17 # This document is based on a (fictious) server in Europe with a
18 # connection to the Undernet IRC network. It is primarily a leaf server,
19 # but if all the other hubs in Europe aren't in service, it can connect
20 # to one in the US by itself.
21 #
22 # All configuration options start with a letter identifying the option,
23 # and a colon separated list of options. Unused fields should be left
24 # blank.
25 #
26 # Please note that when ircd puts the configuration lines into practice,
27 # it parses them exactly the other way round than they are listed here.
28 # It reads the lines in reverse order.
29 #
30 # This means that you should start your I: lines with the "fall through",
31 # most vanilla one and end with the most detailed.
32 #
33 # There is a difference between the "hostname" and the "server name"
34 # of the machine that the server is run on. For example, the host can
35 # have "veer.cs.vu.nl" as FQDN, and "Amsterdam.NL.EU.undernet.org" as
36 # server name.
37 # A "server mask" is something like "*.EU.UnderNet.org", which is
38 # matched by "Amsterdam.NL.EU.undernet.org" but not by
39 # "Manhattan.KS.US.undernet.org".
40 #
41 # Please do NOT just rename the example.conf to ircd.conf and expect
42 # it to work.
43
44
45 # [M:line]
46 #
47 # First some information about the server.
48 # M:<server name>:<virtual host>:<description>:<not used>:<server numeric>
49 #
50 # <virtual host> must contain either a * or a valid IPv4 address in
51 # dotted quad notation. (127.0.0.1) The address MUST be the address
52 # of a physical interface on the host. This address is used for outgoing
53 # connections only, see P:lines for listener virtual hosting.
54 # If in doubt put a * or the IP of your primary interface here.
55 # The server must be compiled with virtual hosting turned on to get this
56 # to work correctly.
57 #
58 # Note that <server numeric> has to be unique on the network your server
59 # is running on, must be between 0 and 4095, and is not updated on a rehash.
60 M:London.UK.Eu.UnderNet.org::University of London, England::1
61
62
63 # [A:line]
64 #
65 # This sets information that can be retrieved with the /ADMIN command.
66 # It should contain at least an admin Email contact address.
67 # A:<line 1>:<line 2>:<line 3>
68 A:The University of London:Undernet IRC server:IRC Admins <irc@london.ac.uk>
69
70
71 # [Y:lines]
72 #
73 # All connections to the server are associated with a certain "connection
74 # class", be they incoming or outgoing (initiated by the server), be they
75 # clients, servers or Martians. (Note that ircd doesn't have direct support
76 # for Martians (yet?); they will have to register as normal users. ;-)
77 # Take the following Y: lines only as a guide.
78 # Y:<class>:<ping freq>:<connect freq>:<maximum links>:<sendq size>
79 #
80 # <connect freq> applies only to servers, and specifies the frequency 
81 # that the server tries to autoconnect. setting this to 0 will cause
82 # the server to attempt to connect repeatedly with no delay until the 
83 # <maximum links> condition is satisfied. This is a Bad Thing(tm).
84 #
85 # <maximum links> should be set at either 0 or 1.
86 #
87 # Server classes: 90 = all your uplinks for who you do not wish to hub;
88 # 80 = leaf servers (only used if your server is a hub)
89 Y:90:90:300:1:9000000
90 Y:80:90:300:0:9000000
91
92 # Client classes. 10 = locals; 2 = for all .net and .com that are not
93 # in Europe; 1 = for everybody.
94 Y:10:90:0:100:160000
95 Y:2:90:0:5:80000
96 Y:1:90:0:400:160000
97
98
99 # [I:lines]
100 #
101 # To allow clients to connect, they need authorization. This can be
102 # done based on hostmask, address mask, and/or with a password.
103 # With intelligent use of classes and the maxconnections field in the
104 # Y: lines, you can let in a specific domain, but get rid of all other
105 # domains in the same toplevel, thus setting up some sort of "reverse
106 # K: line".
107 # I:<IP mask or crap to force resolving>:<opt passwd>:<hostmask>::<class>
108 #
109 # Technical description (for examples, see below):
110 # For every connecting client, the IP address is known.  A reverse lookup
111 # on this IP-number is done to get the (/all) hostname(s).
112 # Each hostname that belongs to this IP-number is matched to <hostmask>,
113 # and the I: line is used when any matches; the client will then show
114 # with this particular hostname.  If none of the hostnames match, then
115 # the IP-number is matched against the <IP mask ...> field, if this matches
116 # then the I: line is used nevertheless and the client will show with the
117 # first (main) hostname if any; if the IP-number did not resolve then the
118 # client will show with the dot notation of the IP-number.
119 # There is a special case for the UNIX domain sockets and localhost connections
120 # though; in this case the <IP mask ...> field is compared with the
121 # name of the server (thus not with any IP-number representation). The name
122 # of the server is the one returned in the numeric 002 reply, for example:
123 # 002 Your host is 2.undernet.org[jolan.ppro], running version ...
124 # Then the "jolan.ppro" is the name used for matching.
125 # Therefore, unix domain sockets, and connections to localhost would
126 # match this I: line:
127 # I:jolan.ppro::foobar::1
128 # Finally, I: lines with empty <IP mask ..> or <hostmask> fields are skipped.
129 #
130 # This is the "fallback" entry. All .uk, .nl, and all unresolved are
131 # in these two lines.
132 # By using two different lines, multiple connections from a single IP
133 # are only allowed from hostnames which have both valid forward and
134 # reverse DNS mappings.
135 I:*@*:1:Unresolved::1
136 I:Resolved::*@*::1
137
138 # If you don't want unresolved dudes to be able to connect to your
139 # server, use just:
140 # I:NotMatchingCrap::*@*::1
141 #
142 # Here, take care of all American ISPs.
143 I:Resolved::*@*.com::2
144 I:Resolved::*@*.net::2
145
146 # Now list all the .com / .net domains that you wish to have access...
147 # actually it's less work to do it this way than to do it the other
148 # way around - K: lining every single ISP in the US.
149 # I wish people in Holland just got a .nl domain, and not try to be
150 # cool and use .com...
151 I:Resolved::*@*.wirehub.net::1
152 I:Resolved::*@*.planete.net::1
153 I:Resolved::*@*.ivg.com::1
154 I:Resolved::*@*.ib.com::1
155 I:Resolved::*@*.ibm.net::1
156 I:Resolved::*@*.hydro.com::1
157 I:Resolved::*@*.NL.net::1
158
159 # You can request a more complete listing, including the "list of standard
160 # K-lines" from the Routing Committee; it will also be sent to you if
161 # you apply for a server and get accepted.
162 #
163 # Ourselves - this makes sure that we can get in, no matter how full
164 # the server is (hopefully).
165 I:*@193.37.*::*@*.london.ac.uk::10
166
167 # You can put a digit (0..9) in the password field, which will make ircd
168 # only accept a client when the total number of connections to the network
169 # from the same IP number doesn't exceed this number.
170 # The following example would accept at most one connection per IP number
171 # from "*.swipnet.se" and at most two connections from dial up accounts
172 # that have "dial??.*" as host mask:
173 # I:Resolved:1:*@*.swipnet.se::1
174 # I:Resolved:2:*@dial??.*::1
175 #
176 # If you are not worried about who connects, this line will allow everyone
177 # to connect.
178 I:*::*::1
179
180
181 # [T:lines]
182 #
183 # It is possible to show a different Message of the Day to a connecting
184 # client depending on its origin.
185 # T:<hostmask>:<path to motd file>
186 # or:
187 # T:<classnumber>:<path to motd file>
188 #
189 # DPATH/net_com.motd contains a special MOTD where users are encouraged
190 # to register their domains and get their own I: lines if they're in
191 # Europe, or move to US.UnderNet.org if they're in the USA.
192 T:*.net:net_com.motd
193 T:*.com:net_com.motd
194 T:2:net_com.motd
195
196 # A different MOTD for ourselves, where we point out that the helpdesk
197 # better not be bothered with questions regarding irc...
198 T:*.london.ac.uk:london.motd
199
200
201 # [U:lines]
202 #
203 # One of the many nice features of Undernet is "Uworld", a program
204 # connected to the net as a server. This allows it to broadcast any mode
205 # change, thus allowing opers to, for example, "unlock" a channel that
206 # has been taken over.
207 # There is only one slight problem: the TimeStamp protocol prevents this.
208 # So there is a configuration option to allow them anyway from a certain
209 # server.
210 # U:<Server Name>:<Juped Nicks>:*
211 #
212 # Note: (1) These lines are agreed on by every server admin on Undernet;
213 # (2) These lines must be the same on every single server, or results
214 # will be disasterous; (3) This is a useful feature, not something that
215 # is a liability and abused regularly (well... :-)
216 # If you're on Undernet, you MUST have these lines. I cannnot stress
217 # this enough.  If all of the servers don't have the same lines, the
218 # servers will try to undo the mode hacks that Uworld does.  Make SURE that
219 # all of the servers have the EXACT same Ulines.
220 #
221 # As of ircu2.10.05 is it possible to Jupe nicks. Juped nicks need to be
222 # added to U: lines.  As per CFV-0095, the following nicks must be juped,
223 # it is not allowed to jupe others as well.
224 U:Uworld.EU.undernet.org:EuWorld,E,StatServ,NoteServ:*
225 U:Uworld2.undernet.org:UWorld2,ChanSvr,ChanSaver,ChanServ:*
226 U:Uworld.undernet.org:Uworld,NickSvr,NickSaver,NickServ:*
227 U:channels.undernet.org:LPT1,X,login:*
228 U:channels2.undernet.org:LPT2,W,Undernet:*
229 U:channels3.undernet.org:COM1,V,protocol:*
230 U:channels4.undernet.org:COM2,U,pass:*
231 U:channels5.undernet.org:COM3,Y,AUX:*
232 U:channels6.undernet.org:COM4,Z,newpass:*
233
234
235 # [K:lines]
236 #
237 # While running your server, you will most probably encounter individuals
238 # or groups of persons that you do not wish to have access to your server.
239 #
240 # For this purpose, the ircd understands "kill lines".
241 # K:<host/IP mask>:"<opt reason>":<username mask>
242 #
243 # It is possible to use a file as comment for the ban.
244 # K:<host/IP mask>:!<path to file>:<usermask>
245 #
246 # The default reason is: "You are banned from this server"
247 # Note that K: lines are local to the server; if you ban a person or a
248 # whole domain from your server, they can get on IRC via any other server
249 # that doesn't have them K: lined (yet).
250 #
251 # With a simple comment, using quotes:
252 K:*.au:"Please use a nearer server":*
253 K:*.edu:"Please use a nearer server":*
254
255 # With a file, prepending a '!' before the filename.
256 # The file can contain for example, a reason, a link to the
257 # server rules and a contact address.
258 K:unixbox.flooder.co.uk:!kline/youflooded.txt:*luser
259
260 #
261 # IP-based kill lines are designated with a lowercase 'k'.  These lines
262 # use the same format as normal K: lines, except they apply to all hosts,
263 # even if an IP address has a properly resolving host name.
264 k:192.168.*:!klines/martians:*
265
266 # Additionally, you may specify a hostmask prefixed with $R to indicate
267 # a match should be performed against the "real-name" / "info" field
268 # instead of the host/IP.
269 K:$R*sub7*:"You are infected with a Trojan":*
270
271
272 # [C:lines]
273 #
274 # You probably want your server connected to other servers, so your users
275 # have other users to chat with.
276 # IRC servers connect to other servers forming a network with a star or
277 # tree topology. Loops are not allowed.
278 # In this network, two servers can be distinguished: "hub" and "leaf"
279 # servers. Leaf servers connect to hubs; hubs connect to each other.
280 # Of course, many servers can't be directly classified in one of these
281 # categories. Both a fixed and a rule-based decision making system for
282 # server links is provided for ircd to decide what links to allow, what
283 # to let humans do themselves, and what links to (forcefully) disallow.
284 #
285 # The Connection lines (also known as C lines)
286 # define what servers the server connect to, and which servers are
287 # allowed to connect.
288 # C:<remote hostname or IP>:<password>:<remote server name>:<port>:<class>
289 #
290 # The "port" field defines the default port the server tries to connect
291 # to if an operator uses /connect without specifying a port. This is also
292 # the port used when the server attempts to auto-connect to the remote 
293 # server. (See Y:lines for more informationa about auto-connects).
294 #
295 # Our primary uplink.
296 C:1.2.3.4:passwd:Amsterdam.NL.Eu.UnderNet.org:4400:90
297
298
299 # [H:lines]
300 #
301 # If your server starts on a bit larger network, you'll probably get
302 # assigned one or two uplinks to which your server can connect.
303 # If your uplink(s) also connect to other servers than yours (which is
304 # probable), you need to define your uplink as being allowed to "hub".
305 # H:<allowed hostmask>::<server name>
306 H:*.*::Amsterdam.NL.Eu.UnderNet.org
307
308
309 # [L:lines]
310 #
311 # Of course, the opposite is also possible: forcing a server to be
312 # a leaf. L: lines follow Murphy's Law: if you use them, there's a big
313 # chance that routing will be screwed up afterwards.
314 # L:<opt disallowed hostmask>::<server mask>:<opt max depth>
315
316
317 # [D:lines]
318 #
319 # For an advanced, real-time rule-based routing decision making system
320 # you can use Disallow lines. For more information, see doc/readme.crules.
321 # D:<server mask that ircd will refuse to connect to>::<rule>
322 # d:<server mask that ircd will not autoconnect to>::<rule>
323 # D:*.US.UnderNet.org::connected(*.US.UnderNet.org)
324 # d:*.EU.UnderNet.org::connected(Amsterdam.NL.EU.*)
325 #
326 # The following line is recommended for leaf servers:
327 # d:*::directcon(*)
328
329
330 # [O:lines]
331 #
332 # Inevitably, you have reached the part about "IRC Operators". Oper status
333 # grants some special privileges to a user, like the power to make the
334 # server break or (try to) establish a connection with another server,
335 # and to "kill" users off IRC.
336 # I can write many pages about this; I will restrict myself to saying that
337 # if you want to appoint somebody as IRC Operator on your server, that
338 # person should be aware of his/her responsibilities, and that you, being
339 # the admin, will be held accountable for their actions.
340 #
341 # There are two sorts of IRC Operators: "local" and "global". Local opers
342 # can squit, connect and kill - but only locally: their +o user mode
343 # is not not passed along to other servers. On Undernet, this prevents
344 # them from using Uworld as well.
345 # Depending on some defines in include/config.h, local operators are also
346 # not allowed to /DIE and /RESTART the server.
347 # Local operators are designated with a lowercase 'o'
348 # O:<host/IP mask>:<encrypted password>:<Nick>::<connection class>
349 # o:<host/IP mask>:<encrypted password>:<Nick>::<connection class>
350 #
351 # The encrypted password is optional.  If you wish to encrypt your password,
352 # there is a utility in the ircd.  Please read the file tools/README.  
353 O:*@*.cs.vu.nl:VRKLKuGKn0jLs:Niels::10
354 o:*@*.uu.net:noncryptedpass:Braden::10
355
356 # Note that the <connection class> is optional, but leaving it away
357 # puts the O: lines in class 0, which usually only accepts one connection
358 # at a time.  If you want users to Oper up more then once per O: line,
359 # then use a connection class that allows more then one connection,
360 # for example (using class 10 as in the example above):
361 #
362 # Once you OPER your connection class changes no matter where you are or
363 # your previous connection classes.  If the defined connection class is 10
364 # for the O:line, then your new connection class is 10.
365 # Y:10:90:0:100:160000
366
367
368 # [P:lines]
369 # When your server gets more full, you will notice delays when trying to
370 # connect to your server's primary listening port. It is possible via the
371 # Port lines to specify additional ports for the ircd to listen to.
372 # De facto ports are: 6667 - standard; 6660-6669 - additional client
373 # ports;
374 # Undernet uses 4400 for server listener ports.
375 # These are just hints, they are in no way official IANA or IETF policies.
376 # IANA says we should use port 194, but that requires us to run as root, so
377 # we don't do that.
378 #
379 # P:<hostmask>:<interface>:<[CS][H]>:<port number>
380 #
381 # The hostmask setting allows you to specify a range of IP addresses that
382 # you will allow connections from. This should only contain IP addresses
383 # and '*' if used. This field only uses IP addresses. This does not use
384 # DNS in any way so you can't use it to allow *.nl or *.uk. Attempting
385 # to specify anything other than numbers, dots and stars [0-9.*] will result
386 # in the port allowing connections from anyone.
387 #
388 # The interface setting allows multiply homed hosts to specify which
389 # interface to use on a port by port basis, if an interface is not specified
390 # the default interface will be used. The interface MUST be the complete
391 # IP address for a real hardware interface on the machine running ircd.
392 # If you want to use virtual hosting *YOU* *MUST* *USE* *THIS* otherwise it
393 # WILL bind to all interfaces - not what most people seem to expect.
394 #
395 # The [CS][H] field is an optional field to specify that a port is a
396 # server port or a client port and whether it's hidden or not.
397 # If used the first character MUST be either a C or S.
398 # If you want to hide a port from /stats p from non-opers follow the C
399 # or S with an H
400 #
401 # C = Client (Ports 6660-6669)
402 # S = Server (Port 4400)
403 #
404 # P:<hostmask>:<interface>:<[CS][H]>:<port number>
405 #
406 # This is a normal server port, you need to have at least one server
407 # port defined if you want to connect your server to other servers.
408 P:::S:4400
409
410 # This is a Server port that is Hidden
411 #P:::SH:4401
412
413 # The following are normal client ports
414 P:::C:6667
415 P::::6668
416 P:192.168.*:::6666
417
418 # This is a hidden client port, listening on the interface associated
419 # with the IP address 168.8.21.107
420 #P:*:168.8.21.107:CH:7000
421
422
423 # [F:lines]
424 #
425 # IRC servers have a large number of options and features.  Most of these
426 # are set at compile time through the use of #define's--see "make config"
427 # for more details--but we are working to move many of these into the
428 # configuration file.  Feature lines are the hook we're using for this.
429 # F:<Option>:<Value>
430 #
431 # The entire purpose of F:lines are so that you do not have to recompile
432 # the IRCD everytime you want to change a feature.  All of the features
433 # are listed below, and at the bottom is how to set logging.
434 #
435 # A Special Thanks to Kev for writing the documentation of F:lines.  It can
436 # be found at doc/readme.features and the logging documentation can be
437 # found at doc/readme.log.  The defaults used by the Undernet network are
438 # below.
439 #
440 # F:DOMAINNAME:<obtained from /etc/resolv.conf by ./configure>
441 # F:RELIABLE_CLOCK:FALSE
442 # F:BUFFERPOOL:27000000
443 # F:HAS_FERGUSON_FLUSHER:FALSE
444 # F:CLIENT_FLOOD:1024
445 # F:SERVER_PORT:4400
446 # F:NODEFAULTMOTD:TRUE
447 # F:KILL_IPMISMATCH:FALSE
448 # F:IDLE_FROM_MSG:TRUE
449 # F:HUB:FALSE
450 # F:WALLOPS_OPER_ONLY:FALSE
451 # F:NODNS:FALSE
452 # F:RANDOM_SEED:<you should set one explicitly>
453 # F:DEFAULT_LIST_PARAM
454 # F:NICKNAMEHISTORYLENGTH:800
455 # F:KILLCHASETIMELIMIT:30
456 # F:MAXCHANNELSPERUSER:10
457 # F:AVBANLEN:40
458 # F:MAXBANS:30
459 # F:MAXSILES:15
460 # F:HANGONGOODLINK:300
461 # F:HANGONRETRYDELAY:10
462 # F:CONNECTTIMEOUT:90
463 # F:TIMESEC:60
464 # F:MAXIMUM_LINKS:1
465 # F:PINGFREQUENCY:120
466 # F:CONNECTFREQUENCY:600
467 # F:DEFAULTMAXSENDQLENGTH:40000
468 # F:GLINEMAXUSERCOUNT:20
469 # F:MPATH:ircd.motd
470 # F:RPATH:remote.motd
471 # F:PPATH:ircd.pid
472 # F:VIRTUAL_HOST:FALSE
473 # F:TOS_SERVER:0x08
474 # F:TOS_CLIENT:0x08
475 # F:CRYPT_OPER_PASSWORD:TRUE
476 # F:OPER_NO_CHAN_LIMIT:TRUE
477 # F:OPER_MODE_LCHAN:TRUE
478 # F:OPER_WALK_THROUGH_LMODES:FALSE
479 # F:NO_OPER_DEOP_LCHAN:FALSE
480 # F:SHOW_INVISIBLE_USERS:TRUE
481 # F:SHOW_ALL_INVISIBLE_USERS:TRUE
482 # F:UNLIMIT_OPER_QUERY:FALSE
483 # F:LOCAL_KILL_ONLY:FALSE
484 # F:CONFIG_OPERCMDS:FALSE
485 # F:OPER_KILL:TRUE
486 # F:OPER_REHASH:TRUE
487 # F:OPER_RESTART:TRUE
488 # F:OPER_DIE:TRUE
489 # F:OPER_GLINE:TRUE
490 # F:OPER_LGLINE:TRUE
491 # F:OPER_JUPE:TRUE
492 # F:OPER_LJUPE:TRUE
493 # F:OPER_OPMODE:TRUE
494 # F:OPER_LOPMODE:TRUE
495 # F:OPER_BADCHAN:FALSE
496 # F:OPER_LBADCHAN:FALSE
497 # F:OPER_SET:TRUE
498 # F:OPERS_SEE_IN_SECRET_CHANNELS:TRUE
499 # F:OPER_WIDE_GLINE:TRUE
500 # F:LOCOP_KILL:TRUE
501 # F:LOCOP_REHASH:TRUE
502 # F:LOCOP_RESTART:FALSE
503 # F:LOCOP_DIE:FALSE
504 # F:LOCOP_LGLINE:TRUE
505 # F:LOCOP_LJUPE:TRUE
506 # F:LOCOP_LOPMODE:TRUE
507 # F:LOCOP_LBADCHAN:FALSE
508 # F:LOCOP_SET:FALSE
509 # F:LOCOP_SEE_IN_SECRET_CHANNELS:FALSE
510 # F:LOCOP_WIDE_GLINE:FALSE
511
512
513 # Well, you have now reached the end of this sample configuration
514 # file. If you have any questions, feel free to mail
515 # <coder-com@undernet.org>.  If you are interested in linking your
516 # server to the Undernet IRC network visit
517 # http://www.routing-com.undernet.org/, and if there are any
518 # problems then contact <routing-com@undernet.org> asking for
519 # information. Upgrades of the Undernet ircd can be found on
520 # http://coder-com.undernet.org/.
521 #
522 # For the rest:  Good Luck!
523 #
524 #       -- Niels.