Author: Run <carlo@alinoe.com>
[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>:*:<description>:<server port>:<server numeric>
38 #
39 # The <server port> is the port that other servers can connect to.
40 # Client ports need to be specified with a P: line, see below.
41 # Note that P: lines can still be used to override the address
42 # that a server port is bound to, use the <server port> of the M:
43 # line in that case on the P: line.
44 #
45 # Note that <server numeric> has to be unique on the network your server
46 # is running on, must be between 1 and 64, and is not updated on a rehash.
47
48 M:London.UK.Eu.UnderNet.org:*:[127.0.0.1] University of London, England:4400:1
49
50 #
51 # This sets information that can be retrieved with the /ADMIN command.
52 # It should contain at least an admin Email contact address.
53 # A:<line 1>:<line 2>:<line 3>
54
55 A:The University of London:Undernet IRC server:IRC Admins <irc@london.ac.uk>
56
57 #
58 # All connections to the server are associated with a certain ``connection
59 # class'', be they incoming or outgoing (initiated by the server), be they
60 # clients, servers or Martians. (Note that ircd doesn't have direct support
61 # for Martians (yet?); they will have to register as normal users. ;-)
62 # Take the following Y: lines only as a guide.
63 # Y:<class>:<ping freq>:<connect freq>:<maximum links>:<sendq size>
64
65 # Server classes: 90 = all your uplinks for who you do not wish to hub;
66 # else in classes 80 and/or 70.
67 # 50 = leaf servers (only used if your server is a hub)
68
69 Y:90:90:300:1:1700000
70 Y:80:90:300:1:1700000
71 Y:70:90:300:1:1700000
72 Y:50:90:300:10:1700000
73
74 # Client classes. 10 = locals; 2 = for all .net and .com that are not
75 # in Europe; 1 = for everybody.
76
77 Y:10:90:0:100:160000
78 Y:2:90:0:5:80000
79 Y:1:90:0:400:160000
80
81 #
82 # To allow clients to connect, they need authorization. This can be
83 # done based on hostmask, address mask, and/or with a password.
84 # With intelligent use of classes and the maxconnections field in the
85 # Y: lines, you can let in a specific domain, but get rid of all other
86 # domains in the same toplevel, thus setting up some sort of 'reverse
87 # K: line'.
88 # I:<IP mask or crap to force resolving>:<opt passwd>:<hostmask>::<class>
89
90 # Technical description (for examples, see below):
91 # For every connecting client, the IP-number is know.  A reverse lookup
92 # on this IP-number is done to get the (/all) hostname(s).
93 # Each hostname that belongs to this IP-number is matched to <hostmask>,
94 # and the I: line is used when any matches; the client will then show
95 # with this particular hostname.  If none of the hostnames matches, then
96 # the IP-number is matched against the <IP mask ...> field, if this matches
97 # then the I: line is used nevertheless and the client will show with the
98 # first (main) hostname if any; if the IP-number did not resolve then the
99 # client will show with the dot notation of the IP-number.
100 # There is a special case for the UNIX domain sockets and localhost connections
101 # though; in this case the <IP mask ...> field is compared with the
102 # name of the server (thus not with any IP-number representation). The name
103 # of the server is the one returned in the numeric 002 reply, for example:
104 # 002 Your host is 2.undernet.org[jolan.ppro], running version ...
105 # Then the "jolan.ppro" is the name used for matching.
106 # Therefore, unix domain sockets, and connections to localhost would
107 # match this I: line:
108 # I:jolan.ppro::foobar::1
109 # Finally, I: lines with empty <IP mask ..> or <hostmask> fields are skipped.
110
111 # This is the 'fallback' entry. All .uk, .nl, and all unresolved are
112 # in these two lines.
113 # By using two different lines, multiple connections from a single IP
114 # are only allowed from hostnames which have both valid forward and
115 # reverse DNS mappings.
116
117 I:*@*:1:Unresolved::1
118 I:Resolved::*@*::1
119
120 # If you don't want unresolved dudes to be able to connect to your
121 # server, use just:
122 # I:NotMatchingCrap::*@*::1
123
124 # Here, take care of all American ISPs.
125 I:Resolved::*@*.com::2
126 I:Resolved::*@*.net::2
127
128 # Now list all the .com / .net domains that you wish to have access...
129 # actually it's less work to do it this way than to do it the other
130 # way around - K: lining every single ISP in the US.
131 # I wish people in Holland just got a .nl domain, and not try to be
132 # cool and use .com...
133 I:Resolved::*@*.wirehub.net::1
134 I:Resolved::*@*.planete.net::1
135 I:Resolved::*@*.ivg.com::1
136 I:Resolved::*@*.ib.com::1
137 I:Resolved::*@*.ibm.net::1
138 I:Resolved::*@*.hydro.com::1
139 I:Resolved::*@*.NL.net::1
140
141 # You can request a more complete listing, including the "list of standard
142 # K-lines" from the Routing Committee; it will also be sent to you if
143 # you apply for a server and get accepted.
144
145 # Ourselves - this makes sure that we can get in, no matter how full
146 # the server is (hopefully).
147 I:*@193.37.*::*@*.london.ac.uk::10
148
149 # You can put a digit (0..9) in the password field, which will make ircd
150 # only accept a client when the total number of connections to the network
151 # from the same IP number doesn't exceed this number.
152 # The following example would accept at most one connection per IP number
153 # from "*.swipnet.se" and at most two connections from dial up accounts
154 # that have "dial??.*" as host mask:
155 # I:Resolved:1:*@*.swipnet.se::1
156 # I:Resolved:2:*@dial??.*::1
157
158 #
159 # It is possible to show a different Message of the Day to a connecting
160 # client depending on its origin.
161 # T:<hostmask>:<path to motd file>
162
163 # DPATH/net_com.motd contains a special MOTD where users are encouraged
164 # to register their domains and get their own I: lines if they're in
165 # Europe, or move to US.UnderNet.org if they're in the USA.
166 T:*.net:net_com.motd
167 T:*.com:net_com.motd
168
169 # A different MOTD for ourselves, where we point out that the helpdesk
170 # better not be bothered with questions regarding irc...
171 T:*.london.ac.uk:london.motd
172
173 #
174 # One of the many nice features of Undernet is ``Uworld'', a program
175 # connected to the net as a server. This allows it to broadcast any mode
176 # change, thus allowing opers to, for example, 'unlock' a channel that
177 # has been taken over.
178 # There is only one slight problem: the TimeStamp protocol prevents this.
179 # So there is a configuration option to allow them anyway from a certain
180 # server.
181 # Note: (1) These lines are agreed on by every server admin on Undernet;
182 # (2) These lines must be the same on every single server, or results
183 # will be disasterous; (3) This is a useful feature, not something that
184 # is a liability and abused regularly (well... :-)
185 # If you're on Undernet, you MUST have these lines. I cannnot stress
186 # this enough.
187 # As of ircu2.10.05 is it possible to Jupe nicks. Juped nicks need to be
188 # added to U: lines.  As per CFV-0095, the following nicks must be juped,
189 # it is not allowed to jupe others as well.
190
191 U:Uworld.EU.undernet.org:EuWorld,E,protocol,StatServ,NoteServ,Undernet:*
192 U:Uworld2.undernet.org:UWorld2,W,ChanSvr,ChanSaver,ChanServ,COM1,COM2,COM3,COM4:
193 *
194 U:Uworld.undernet.org:Uworld,X,NickSvr,NickSaver,NickServ,LPT1,LPT2,AUX:*
195
196 #
197 # While running your server, you will most probably encounter individuals
198 # or groups of persons that you do not wish to have access to your server.
199 #
200 # For this purpose, the ircd understands "kill lines".
201 # K:<host/IP mask>:"<opt reason>":<username mask>
202 #
203 # It is possible to use a file as comment for the ban.
204 # K:<host/IP mask>:!<path to file>:<usermask>
205 #
206 # The default reason is: "You are banned from this server"
207 # Note that K: lines are local to the server; if you ban a person or a
208 # whole domain from your server, they can get on IRC via any other server
209 # that doesn't have them K: lined (yet).
210
211 # With a simple comment, using quotes:
212 K:*.au:"Please use a nearer server":*
213 K:*.edu:"Please use a nearer server":*
214
215 # With a file, prepending a '!' before the filename.
216 # The file can contain for example, a reason, a link to the
217 # server rules and a contact address.
218 K:unixbox.flooder.co.uk:!kline/youflooded.txt:*luser
219
220 #
221 # IP-based kill lines are designated with a lowercase 'k'.  These lines
222 # use the same format as normal K: lines, except they apply to all hosts,
223 # even if an IP address has a properly resolving host name.
224 k:192.168.*:!klines/martians:*
225
226 #
227 # A more flexible way of restricting access to your server is the use
228 # of "restriction lines". These tell the server to start up an (external)
229 # program, upon whose output is decided whether the client is allowed
230 # access. The program should print "Y" or "N <reason>" on its stdout.
231 # Note that the use of R: lines is discouraged and deprecated, needs a
232 # compile-time define, eats CPU cycles and may well be taken out in
233 # future releases of ircd.
234 # R:<host/IP mask>:<program name>:<username mask>
235
236 #
237 # You probably want your server connected to other servers, so your users
238 # have other users to chat with.
239 # IRC servers connect to other servers forming a network with a star or
240 # tree topology. Loops are not allowed.
241 # In this network, two servers can be distinguished: "hub" and "leaf"
242 # servers. Leaf servers connect to hubs; hubs connect to each other.
243 # Of course, many servers can't be directly classified in one of these
244 # categories. Both a fixed and a rule-based decision making system for
245 # server links is provided for ircd to decide what links to allow, what
246 # to let humans do themselves, and what links to (forcefully) disallow.
247 #
248 # The Connection and Allowing connection lines (also known as C/N lines)
249 # define what servers the server connect to, and which servers are
250 # allowed to connect. Note that they come in pairs; they do not work if
251 # one if present and the other is absent.
252 # C:<remote hostname or IP>:<password>:<remote server name>:<port>:<class>
253 # N:<remote hostname or IP>:<password>:<remote server name>:<hostmask>:<class>
254 #
255 # If you wish to use ident, prepend "username@" to the hostname or IP
256 # address (the first field).
257 # If the "port" field is omitted, the server will not attempt to
258 # establish a link with that server ("not autoconnecting").
259 # The (optional) "host mask" field tells the server to represent itself
260 # with "hostmask" dot-seperateed fields stripped from its servername
261 # and replace it with "*.".
262 # For example, if hostmask == 2 and the local server name is
263 # "irc.sub.domain.com" it would be sent as "*.domain.com". This allows
264 # for easier routing and linking of new servers.
265 # This feature is not used on Undernet.
266
267 # Our primary uplink.
268 C:1.2.3.4:passwd:Amsterdam.NL.Eu.UnderNet.org:4400:90
269 N:1.2.3.4:passwd:Amsterdam.NL.Eu.UnderNet.org::90
270
271 #
272 # If your server starts on a bit larger network, you'll probably get
273 # assigned one or two uplinks to which your server can connect.
274 # If your uplink(s) also connect to other servers than yours (which is
275 # probable), you need to define your uplink as being allowed to "hub".
276 # H:<allowed hostmask>::<server name>
277 H:*.*::Amsterdam.NL.Eu.UnderNet.org
278
279 #
280 # Of course, the opposite is also possible: forcing a server to be
281 # a leaf. L: lines follow Murphy's Law: if you use them, there's a big
282 # chance that routing will be screwed up afterwards.
283 # L:<opt disallowed hostmask>::<server mask>:<opt max depth>
284
285 #
286 # For an advanced, real-time rule-based routing decision making system
287 # you can use Disallow lines. For more information, see doc/readme.crules.
288 # D:<server mask that ircd will refuse to connect to>::<rule>
289 # d:<server mask that ircd will not autoconnect to>::<rule>
290 D:*.US.UnderNet.org::connected(*.US.UnderNet.org)
291 d:*.EU.UnderNet.org::connected(Amsterdam.NL.EU.*)
292
293 # The following line is recommended for leaf servers:
294 d:*::directcon(*)
295
296 #
297 # Inevitably, you have reached the part about "IRC Operators". Oper status
298 # grants some special privileges to a user, like the power to make the
299 # server break or (try to) establish a connection with another server,
300 # and to "kill" users off IRC.
301 # I can write many pages about this; I will restrict myself to saying that
302 # if you want to appoint somebody as IRC Operator on your server, that
303 # person should be aware of his/her responsibilities, and that you, being
304 # the admin, will be held accountable for their actions.
305 #
306 # There are two sorts of IRC Operators: "local" and "global". Local opers
307 # can squit, connect and kill - but only locally: their +o user mode
308 # is not not passed along to other servers. On Undernet, this prevents
309 # them from using Uworld as well.
310 # Depending on some defines in include/config.h, local operators are also
311 # not allowed to /DIE and /RESTART the server.
312 # Local operators are designated with a lowercase 'o'
313 # O:<host/IP mask>:<encrypted password>:<Nick>::<connection class>
314 # o:<host/IP mask>:<encrypted password>:<Nick>::<connection class>
315
316 O:*@*.cs.vu.nl:VRKLKuGKn0jLs:Niels::10
317
318 # Note that the <connection class> is optional, but leaving it away
319 # puts the O: lines in class 0, which usually only accepts one connection
320 # at a time.  If you want users to Oper up more then once per O: line,
321 # then use a connection class that allows more then one connection,
322 # for example (using class 10 as in the example above):
323 # Y:10:90:0:100:160000
324 #
325 # When your server gets fuller, you will notice delays when trying to
326 # connect to your server's primary listening port. Via the Port lines
327 # it is possible to specify additional ports (both AF_UNIX and AF_INET)
328 # for ircd to listen to.
329 # De facto ports are: 6667 - standard; 6660-6669 - additional client
330 # ports;
331 #
332 # These are just hints, they are in no way official IANA or IETF policies.
333 #
334 # On a side note, the /UPING command uses port 7007/udp. If your server
335 # is located behind a firewall, you may want to make another hole in it
336 # for this port.
337 #
338 # P:<ipmask, or path>:[<interface>|*]::<client port number>
339 #
340 # or
341 #
342 # P:<ipmask, or path>:[<interface>|*]::<server port>
343 #
344 # where <server port> is the port specified on the M: line.
345 #
346
347 # Listen on port 6667 and 6668, use the default interface
348 # (that is: the interface specified on the commandline with
349 #  -w <interface IP#>, or the interface of the IP# that the
350 #  M: line resolves too (or ALL interfaces if it doesn't
351 #  resolve)).
352 P::::6667
353 P::::6668
354 # Only accept clients from 168.* on port 6666
355 P:168.*:::6666
356
357 # Listen on port 7700 for clients that connect to "127.0.0.1"
358 # where "127.0.0.1" can be the IP number of any of your interfaces.
359 P::127.0.0.1::7700
360 # Bind to all interfaces:
361 P::*::6669
362
363 # Open a client UNIX port on /tmp/.ircd
364 P:/tmp/.ircd:::6667
365
366 # Listen on loopback and eth0 (192.168.1.1) for other servers:
367 P::192.168.1.1::4400    # <<--- The last P: line not specifying 127.0.0.1
368                         #       is uses as IP# for _outgoing_ connections.
369 P::127.0.0.1::4400
370 # where 4400 is the server port (as specified on the M: line)
371
372 #
373 # Well, you have now reached the end of this sample configuration file
374 # If you have any questions, feel free to mail <doco-com@undernet.org>
375 # or <wastelanders@undernet.org>.
376 # If you are interested in linking your server to the Undernet IRC network
377 # visit http://www.routing-com.undernet.org/, and if there are any problems
378 # then contact <routing-com@undernet.org> asking for information.
379 # Upgrades of the Undernet ircd can be found on http://coder-com.undernet.org/.
380 #
381 # For the rest:  Good Luck!
382 #
383 #       -- Niels.