Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / doc / example.conf
index 4d7f1f46ab039deb7fd7c3dec19e44a93d6393b9..588bc76d1e74ef075fb5ce446c1b4a1e6ff78382 100644 (file)
 
 #
 # First some information about the server.
-# M:<server name>:*:<description>:<server port>:<server numeric>
+# M:<server name>:<virtual host>:<description>:<server port>:<server numeric>
 #
-# The <server port> is the port that other servers can connect to.
-# Client ports need to be specified with a P: line, see below.
-# Note that P: lines can still be used to override the address
-# that a server port is bound to, use the <server port> of the M:
-# line in that case on the P: line.
+# <virtual host> must contain either a * or a valid IPv4 address in
+# dotted quad notation. (127.0.0.1) The address MUST be the address
+# of a physical interface on the host. This address is used for outgoing
+# connections only, see P:lines for listener virtual hosting.
+# If in doubt put a * or the IP of your primary interface here.
+# The server must be compiled with virtual hosting turned on to get this
+# to work correctly.
+#
+# The <server port> is no longer used.
+# Ports need to be specified with a P: line, see below.
+# At some point in the future we may want to use the port value for
+# server capacity. --Bleep
 #
 # Note that <server numeric> has to be unique on the network your server
 # is running on, must be between 1 and 64, and is not updated on a rehash.
 
-M:London.UK.Eu.UnderNet.org:*:[127.0.0.1] University of London, England:4400:1
+M:London.UK.Eu.UnderNet.org:*:University of London, England:0:1
 
 #
 # This sets information that can be retrieved with the /ADMIN command.
@@ -62,14 +69,31 @@ A:The University of London:Undernet IRC server:IRC Admins <irc@london.ac.uk>
 # Take the following Y: lines only as a guide.
 # Y:<class>:<ping freq>:<connect freq>:<maximum links>:<sendq size>
 
+# <connect freq> applies only to servers, and specifies the frequency 
+# that the server tries to autoconnect. setting this to 0 will cause
+# the server to attempt to connect repeatedly with no delay until the 
+# <maximum links> condition is satisfied. This is a Bad Thing(tm).
+
+# <maximum links> has different meanings for clients and servers.
+# For clients, it is the total number of connections allowed for the class.
+# Thus, if it is set to 100, then up to 100 clients can connect in that class.
+
+# Auto-connecting
+# For servers, <maximum links> is the number of remote servers, in that class, that the
+# server will attempt to be connected to. The server will initiate auto connections
+# until it is connected to <maximum links> remote servers. This field DOES NOT limit
+# the total number of servers that can be manually connected.
+# To turn off auto connecting, <maximum links> should be set to 0.
+# Note that MAXIMUM_LINKS (defined in make config) sets a hard limit on the number
+# of servers that can be connected and still have the server attempt auto-connections.
+# It is usually set to 1, which means a server will not attempt auto connects with a server
+# already connected, regardless of how the Y:lines are set up.
+
 # Server classes: 90 = all your uplinks for who you do not wish to hub;
-# else in classes 80 and/or 70.
-# 50 = leaf servers (only used if your server is a hub)
+# 80 = leaf servers (only used if your server is a hub)
 
-Y:90:90:300:1:1700000
-Y:80:90:300:1:1700000
-Y:70:90:300:1:1700000
-Y:50:90:300:10:1700000
+Y:90:90:300:1:9000000
+Y:80:90:300:0:9000000
 
 # Client classes. 10 = locals; 2 = for all .net and .com that are not
 # in Europe; 1 = for everybody.
@@ -155,11 +179,15 @@ I:*@193.37.*::*@*.london.ac.uk::10
 # I:Resolved:1:*@*.swipnet.se::1
 # I:Resolved:2:*@dial??.*::1
 
+#
+# T:Lines
 #
 # It is possible to show a different Message of the Day to a connecting
 # client depending on its origin.
 # T:<hostmask>:<path to motd file>
-
+# or:
+# T:<classnumber>:<path to motd file>
+#
 # DPATH/net_com.motd contains a special MOTD where users are encouraged
 # to register their domains and get their own I: lines if they're in
 # Europe, or move to US.UnderNet.org if they're in the USA.
@@ -189,8 +217,7 @@ T:*.london.ac.uk:london.motd
 # it is not allowed to jupe others as well.
 
 U:Uworld.EU.undernet.org:EuWorld,E,protocol,StatServ,NoteServ,Undernet:*
-U:Uworld2.undernet.org:UWorld2,W,ChanSvr,ChanSaver,ChanServ,COM1,COM2,COM3,COM4:
-*
+U:Uworld2.undernet.org:UWorld2,W,ChanSvr,ChanSaver,ChanServ,COM1,COM2,COM3,COM4:*
 U:Uworld.undernet.org:Uworld,X,NickSvr,NickSaver,NickServ,LPT1,LPT2,AUX:*
 
 #
@@ -223,15 +250,10 @@ K:unixbox.flooder.co.uk:!kline/youflooded.txt:*luser
 # even if an IP address has a properly resolving host name.
 k:192.168.*:!klines/martians:*
 
-#
-# A more flexible way of restricting access to your server is the use
-# of "restriction lines". These tell the server to start up an (external)
-# program, upon whose output is decided whether the client is allowed
-# access. The program should print "Y" or "N <reason>" on its stdout.
-# Note that the use of R: lines is discouraged and deprecated, needs a
-# compile-time define, eats CPU cycles and may well be taken out in
-# future releases of ircd.
-# R:<host/IP mask>:<program name>:<username mask>
+# Additionally, you may specify a hostmask prefixed with $R to indicate
+# a match should be performed against the "real-name" / "info" field
+# instead of the host/IP.
+K:$R*sub7*:"You are infected with a Trojan":*
 
 #
 # You probably want your server connected to other servers, so your users
@@ -245,28 +267,18 @@ k:192.168.*:!klines/martians:*
 # server links is provided for ircd to decide what links to allow, what
 # to let humans do themselves, and what links to (forcefully) disallow.
 #
-# The Connection and Allowing connection lines (also known as C/N lines)
+# The Connection lines (also known as C lines)
 # define what servers the server connect to, and which servers are
-# allowed to connect. Note that they come in pairs; they do not work if
-# one if present and the other is absent.
+# allowed to connect.
 # C:<remote hostname or IP>:<password>:<remote server name>:<port>:<class>
-# N:<remote hostname or IP>:<password>:<remote server name>:<hostmask>:<class>
-#
-# If you wish to use ident, prepend "username@" to the hostname or IP
-# address (the first field).
-# If the "port" field is omitted, the server will not attempt to
-# establish a link with that server ("not autoconnecting").
-# The (optional) "host mask" field tells the server to represent itself
-# with "hostmask" dot-seperateed fields stripped from its servername
-# and replace it with "*.".
-# For example, if hostmask == 2 and the local server name is
-# "irc.sub.domain.com" it would be sent as "*.domain.com". This allows
-# for easier routing and linking of new servers.
-# This feature is not used on Undernet.
+#
+# The "port" field defines the default port the server tries to connect
+# to if an operator uses /connect without specifying a port. This is also
+# the port used when the server attempts to auto-connect to the remote 
+# server. (See Y:lines for more informationa about auto-connects).
 
 # Our primary uplink.
 C:1.2.3.4:passwd:Amsterdam.NL.Eu.UnderNet.org:4400:90
-N:1.2.3.4:passwd:Amsterdam.NL.Eu.UnderNet.org::90
 
 #
 # If your server starts on a bit larger network, you'll probably get
@@ -287,11 +299,11 @@ H:*.*::Amsterdam.NL.Eu.UnderNet.org
 # you can use Disallow lines. For more information, see doc/readme.crules.
 # D:<server mask that ircd will refuse to connect to>::<rule>
 # d:<server mask that ircd will not autoconnect to>::<rule>
-D:*.US.UnderNet.org::connected(*.US.UnderNet.org)
-d:*.EU.UnderNet.org::connected(Amsterdam.NL.EU.*)
+D:*.US.UnderNet.org::connected(*.US.UnderNet.org)
+d:*.EU.UnderNet.org::connected(Amsterdam.NL.EU.*)
 
 # The following line is recommended for leaf servers:
-d:*::directcon(*)
+d:*::directcon(*)
 
 #
 # Inevitably, you have reached the part about "IRC Operators". Oper status
@@ -321,58 +333,121 @@ O:*@*.cs.vu.nl:VRKLKuGKn0jLs:Niels::10
 # then use a connection class that allows more then one connection,
 # for example (using class 10 as in the example above):
 # Y:10:90:0:100:160000
-#
+
+# [P:lines]
 # When your server gets fuller, you will notice delays when trying to
 # connect to your server's primary listening port. Via the Port lines
-# it is possible to specify additional ports (both AF_UNIX and AF_INET)
-# for ircd to listen to.
+# it is possible to specify additional ports for ircd to listen to.
 # De facto ports are: 6667 - standard; 6660-6669 - additional client
 # ports;
-#
+# Undernet uses 4400 for server listener ports.
 # These are just hints, they are in no way official IANA or IETF policies.
-#
-# On a side note, the /UPING command uses port 7007/udp. If your server
-# is located behind a firewall, you may want to make another hole in it
-# for this port.
-#
-# P:<ipmask, or path>:[<interface>|*]::<client port number>
-#
-# or
-#
-# P:<ipmask, or path>:[<interface>|*]::<server port>
-#
-# where <server port> is the port specified on the M: line.
-#
-
-# Listen on port 6667 and 6668, use the default interface
-# (that is: the interface specified on the commandline with
-#  -w <interface IP#>, or the interface of the IP# that the
-#  M: line resolves too (or ALL interfaces if it doesn't
-#  resolve)).
-P::::6667
+# IANA says we should use port 194, but that requires us to run as root, so
+# we don't do that.
+#
+# P:<hostmask>:<interface>:<[CS][H]>:<port number>
+#
+# The hostmask setting allows you to specify a range of IP addresses that
+# you will allow connections from. This should only contain IP addresses
+# and '*' if used. This field only uses IP addresses. This does not use
+# DNS in any way so you can't use it to allow *.nl or *.uk. Attempting
+# to specify anything other than numbers, dots and stars [0-9.*] will result
+# in the port allowing connections from anyone.
+#
+# The interface setting allows multiply homed hosts to specify which
+# interface to use on a port by port basis, if an interface is not specified
+# the default interface will be used. The interface MUST be the complete
+# IP address for a real hardware interface on the machine running ircd.
+# If you want to use virtual hosting *YOU* *MUST* *USE* *THIS* otherwise it
+# WILL bind to all interfaces - not what most people seem to expect.
+#
+# The [CS][H] field is an optional field to specify that a port is a
+# server port or a client port and whether it's hidden or not.
+# If used the first character MUST be either a C or S.
+# If you want to hide a port from /stats p from non-opers follow the C
+# or S with an H
+#
+# P:<hostmask>:<interface>:<[CS][H]>:<port number>
+#
+# This is a normal server port, you need to have at least one server
+# port defined if you want to connect your server to other servers.
+P:::S:4400
+# This is a Server port that is Hidden
+#P:::SH:4401
+
+# The following are normal client ports
+P:::C:6667
 P::::6668
-# Only accept clients from 168.* on port 6666
-P:168.*:::6666
-
-# Listen on port 7700 for clients that connect to "127.0.0.1"
-# where "127.0.0.1" can be the IP number of any of your interfaces.
-P::127.0.0.1::7700
-# Bind to all interfaces:
-P::*::6669
-
-# Open a client UNIX port on /tmp/.ircd
-P:/tmp/.ircd:::6667
-
-# Listen on loopback and eth0 (192.168.1.1) for other servers:
-P::192.168.1.1::4400   # <<--- The last P: line not specifying 127.0.0.1
-                       #       is uses as IP# for _outgoing_ connections.
-P::127.0.0.1::4400
-# where 4400 is the server port (as specified on the M: line)
+P:192.168.*:::6666
+
+# This is a hidden client port, listening on the interface associated
+# with the IP address 168.8.21.107
+#P:*:168.8.21.107:CH:7000
+
+# [F:lines]
+# IRC servers have a large number of options and features.  Most of these
+# are set at compile time through the use of #define's--see "make config"
+# for more details--but we are working to move many of these into the
+# configuration file.  Feature lines are the hook we're using for this.
+#
+# F:<key>:<value>[:<value>[...]]
+#
+# Currently, the only defined value for <key> is "LOG," and it allows you
+# to customize the settings of the logging architecture.  You can set the
+# default logging facility to, say, local7 (F:LOG:LOCAL7), or set a log
+# file for one of the subsystems (F:LOG:GLINE:FILE:gline.log).  More than
+# one subsystem can log to the same file without danger of interleaving.
+#
+# The currently defined subsystems are SYSTEM, CONFIG, OPERMODE (used by
+# /opmode and /clearmode), GLINE, JUPE, WHO (used by /whox), NETWORK
+# (connects and disconnects), OPERKILL, SERVKILL, USER, OPER, OPERLOG,
+# USERLOG, RESOLVER, SOCKET, DEBUG, and OLDLOG.  You can set log files
+# for these subsystems to log to, or you can tell them to syslog their
+# data, or even send server notices.  You can do any of these in
+# combination, but you can't log to more than one file.  You can also set
+# minimum log levels per subsystem, if you wish.
+#
+# The format for LOG Feature lines is as follows:
+#
+# F:LOG:<facility>
+# F:LOG:<subsystem>:<type>[:<value>]
+#
+# The first sets the default facility for ircu to log to to <facility>.
+# Valid <facility> values are listed in the syslog(3) man page; just
+# remove the "LOG_" prefix.
+#
+# The list of subsystems is given above.  The valid values for <type> are
+# FILE, FACILITY, SNOMASK, and LEVEL, which respectively set the log file,
+# the syslog facility, a server notice mask value, and the minimum log
+# level.  If no <value> is given, or if <value> is empty, the default
+# value for that type is set.
+#
+# Valid <value>'s for the FACILITY type are the normal syslog values (with
+# the "LOG_" prefix removed) or the special values "NONE" (which specifies
+# that syslogging should not be attempted) and "DEFAULT" (which specifies
+# that the server-wide facility should be used); the default for all
+# subsystems is "NONE."
+#
+# Valid <value>'s for the SNOMASK type are OLDSNO, SERVKILL, OPERKILL,
+# HACK2, HACK3, UNAUTH, TCPCOMMON, TOOMANY, HACK4, GLINE, NETWORK,
+# IPMISMATCH, THROTTLE, OLDREALOP, and CONNEXIT, as well as the special
+# values NONE, which specifies that no server notices should be sent,
+# and DEBUG, which is only available if DEBUGMODE has been enabled.
+#
+# Valid <value>'s for the LEVEL type are CRIT, ERR, WARNING, NOTICE,
+# TRACE, INFO, and DEBUG.  Note that logs with level CRIT always result
+# in server notices to mask SNO_OLDSNO, and logs with level DEBUG always
+# send server notices to mask SNO_DEBUG.
+#
+# A couple of things to note: log settings are not reset to defaults prior
+# to a rehash; this means that if you delete F-lines and rehash, logs will
+# continue going to the same place.  Also, all subsystems are defaulted to
+# minimum log level INFO (or DEBUG if DEBUGMODE is #define'd).
 
 #
 # Well, you have now reached the end of this sample configuration file
 # If you have any questions, feel free to mail <doco-com@undernet.org>
-# or <wastelanders@undernet.org>.
+# or <coder-com@undernet.org>.
 # If you are interested in linking your server to the Undernet IRC network
 # visit http://www.routing-com.undernet.org/, and if there are any problems
 # then contact <routing-com@undernet.org> asking for information.