Author: Bleep <helveytw@home.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>:<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 #
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
195 # A different MOTD for ourselves, where we point out that the helpdesk
196 # better not be bothered with questions regarding irc...
197 T:*.london.ac.uk:london.motd
198
199 #
200 # One of the many nice features of Undernet is ``Uworld'', a program
201 # connected to the net as a server. This allows it to broadcast any mode
202 # change, thus allowing opers to, for example, 'unlock' a channel that
203 # has been taken over.
204 # There is only one slight problem: the TimeStamp protocol prevents this.
205 # So there is a configuration option to allow them anyway from a certain
206 # server.
207 # Note: (1) These lines are agreed on by every server admin on Undernet;
208 # (2) These lines must be the same on every single server, or results
209 # will be disasterous; (3) This is a useful feature, not something that
210 # is a liability and abused regularly (well... :-)
211 # If you're on Undernet, you MUST have these lines. I cannnot stress
212 # this enough.
213 # As of ircu2.10.05 is it possible to Jupe nicks. Juped nicks need to be
214 # added to U: lines.  As per CFV-0095, the following nicks must be juped,
215 # it is not allowed to jupe others as well.
216
217 U:Uworld.EU.undernet.org:EuWorld,E,protocol,StatServ,NoteServ,Undernet:*
218 U:Uworld2.undernet.org:UWorld2,ChanSvr,ChanSaver,ChanServ,COM1,COM2,COM3,COM4:*
219 U:Uworld.undernet.org:Uworld,X,W,NickSvr,NickSaver,NickServ,LPT1,LPT2,AUX:*
220
221 #
222 # While running your server, you will most probably encounter individuals
223 # or groups of persons that you do not wish to have access to your server.
224 #
225 # For this purpose, the ircd understands "kill lines".
226 # K:<host/IP mask>:"<opt reason>":<username mask>
227 #
228 # It is possible to use a file as comment for the ban.
229 # K:<host/IP mask>:!<path to file>:<usermask>
230 #
231 # The default reason is: "You are banned from this server"
232 # Note that K: lines are local to the server; if you ban a person or a
233 # whole domain from your server, they can get on IRC via any other server
234 # that doesn't have them K: lined (yet).
235
236 # With a simple comment, using quotes:
237 K:*.au:"Please use a nearer server":*
238 K:*.edu:"Please use a nearer server":*
239
240 # With a file, prepending a '!' before the filename.
241 # The file can contain for example, a reason, a link to the
242 # server rules and a contact address.
243 K:unixbox.flooder.co.uk:!kline/youflooded.txt:*luser
244
245 #
246 # IP-based kill lines are designated with a lowercase 'k'.  These lines
247 # use the same format as normal K: lines, except they apply to all hosts,
248 # even if an IP address has a properly resolving host name.
249 k:192.168.*:!klines/martians:*
250
251 #
252 # You probably want your server connected to other servers, so your users
253 # have other users to chat with.
254 # IRC servers connect to other servers forming a network with a star or
255 # tree topology. Loops are not allowed.
256 # In this network, two servers can be distinguished: "hub" and "leaf"
257 # servers. Leaf servers connect to hubs; hubs connect to each other.
258 # Of course, many servers can't be directly classified in one of these
259 # categories. Both a fixed and a rule-based decision making system for
260 # server links is provided for ircd to decide what links to allow, what
261 # to let humans do themselves, and what links to (forcefully) disallow.
262 #
263 # The Connection lines (also known as C lines)
264 # define what servers the server connect to, and which servers are
265 # allowed to connect.
266 # C:<remote hostname or IP>:<password>:<remote server name>:<port>:<class>
267 #
268 # The "port" field defines the default port the server tries to connect
269 # to if an operator uses /connect without specifying a port. This is also
270 # the port used when the server attempts to auto-connect to the remote 
271 # server. (See Y:lines for more informationa about auto-connects).
272
273 # Our primary uplink.
274 C:1.2.3.4:passwd:Amsterdam.NL.Eu.UnderNet.org:4400:90
275
276 #
277 # If your server starts on a bit larger network, you'll probably get
278 # assigned one or two uplinks to which your server can connect.
279 # If your uplink(s) also connect to other servers than yours (which is
280 # probable), you need to define your uplink as being allowed to "hub".
281 # H:<allowed hostmask>::<server name>
282 H:*.*::Amsterdam.NL.Eu.UnderNet.org
283
284 #
285 # Of course, the opposite is also possible: forcing a server to be
286 # a leaf. L: lines follow Murphy's Law: if you use them, there's a big
287 # chance that routing will be screwed up afterwards.
288 # L:<opt disallowed hostmask>::<server mask>:<opt max depth>
289
290 #
291 # For an advanced, real-time rule-based routing decision making system
292 # you can use Disallow lines. For more information, see doc/readme.crules.
293 # D:<server mask that ircd will refuse to connect to>::<rule>
294 # d:<server mask that ircd will not autoconnect to>::<rule>
295 # D:*.US.UnderNet.org::connected(*.US.UnderNet.org)
296 # d:*.EU.UnderNet.org::connected(Amsterdam.NL.EU.*)
297
298 # The following line is recommended for leaf servers:
299 # d:*::directcon(*)
300
301 #
302 # Inevitably, you have reached the part about "IRC Operators". Oper status
303 # grants some special privileges to a user, like the power to make the
304 # server break or (try to) establish a connection with another server,
305 # and to "kill" users off IRC.
306 # I can write many pages about this; I will restrict myself to saying that
307 # if you want to appoint somebody as IRC Operator on your server, that
308 # person should be aware of his/her responsibilities, and that you, being
309 # the admin, will be held accountable for their actions.
310 #
311 # There are two sorts of IRC Operators: "local" and "global". Local opers
312 # can squit, connect and kill - but only locally: their +o user mode
313 # is not not passed along to other servers. On Undernet, this prevents
314 # them from using Uworld as well.
315 # Depending on some defines in include/config.h, local operators are also
316 # not allowed to /DIE and /RESTART the server.
317 # Local operators are designated with a lowercase 'o'
318 # O:<host/IP mask>:<encrypted password>:<Nick>::<connection class>
319 # o:<host/IP mask>:<encrypted password>:<Nick>::<connection class>
320
321 O:*@*.cs.vu.nl:VRKLKuGKn0jLs:Niels::10
322
323 # Note that the <connection class> is optional, but leaving it away
324 # puts the O: lines in class 0, which usually only accepts one connection
325 # at a time.  If you want users to Oper up more then once per O: line,
326 # then use a connection class that allows more then one connection,
327 # for example (using class 10 as in the example above):
328 # Y:10:90:0:100:160000
329
330 # [P:lines]
331 # When your server gets fuller, you will notice delays when trying to
332 # connect to your server's primary listening port. Via the Port lines
333 # it is possible to specify additional ports for ircd to listen to.
334 # De facto ports are: 6667 - standard; 6660-6669 - additional client
335 # ports;
336 # Undernet uses 4400 for server listener ports.
337 # These are just hints, they are in no way official IANA or IETF policies.
338 # IANA says we should use port 194, but that requires us to run as root, so
339 # we don't do that.
340 #
341 # P:<hostmask>:<interface>:<[CS][H]>:<port number>
342 #
343 # The hostmask setting allows you to specify a range of IP addresses that
344 # you will allow connections from. This should only contain IP addresses
345 # and '*' if used. This field only uses IP addresses. This does not use
346 # DNS in any way so you can't use it to allow *.nl or *.uk. Attempting
347 # to specify anything other than numbers, dots and stars [0-9.*] will result
348 # in the port allowing connections from anyone.
349 #
350 # The interface setting allows multiply homed hosts to specify which
351 # interface to use on a port by port basis, if an interface is not specified
352 # the default interface will be used. The interface MUST be the complete
353 # IP address for a real hardware interface on the machine running ircd.
354 # If you want to use virtual hosting *YOU* *MUST* *USE* *THIS* otherwise it
355 # WILL bind to all interfaces - not what most people seem to expect.
356 #
357 # The [CS][H] field is an optional field to specify that a port is a
358 # server port or a client port and whether it's hidden or not.
359 # If used the first character MUST be either a C or S.
360 # If you want to hide a port from /stats p from non-opers follow the C
361 # or S with an H
362 #
363 # P:<hostmask>:<interface>:<[CS][H]>:<port number>
364 #
365 # This is a normal server port, you need to have at least one server
366 # port defined if you want to connect your server to other servers.
367 P:::S:4400
368 # This is a Server port that is Hidden
369 #P:::SH:4401
370
371 # The following are normal client ports
372 P:::C:6667
373 P::::6668
374 P:192.168.*:::6666
375
376 # This is a hidden client port, listening on the interface associated
377 # with the IP address 168.8.21.107
378 #P:*:168.8.21.107:CH:7000
379
380 #
381 # Well, you have now reached the end of this sample configuration file
382 # If you have any questions, feel free to mail <doco-com@undernet.org>
383 # or <coder-com@undernet.org>.
384 # If you are interested in linking your server to the Undernet IRC network
385 # visit http://www.routing-com.undernet.org/, and if there are any problems
386 # then contact <routing-com@undernet.org> asking for information.
387 # Upgrades of the Undernet ircd can be found on http://coder-com.undernet.org/.
388 #
389 # For the rest:  Good Luck!
390 #
391 #       -- Niels.