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