DareNET IRCd Configuration/1.5
(→Port Block) |
(→Connect block) |
||
| (46 intermediate revisions not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| - | This is a reference guide for ircd-darenet 1. | + | This is a reference guide for ircd-darenet 1.5.x's configuration file. |
| - | The configuration format consists of various blocks, each containing name-value pairs, tags | + | The configuration format consists of various blocks, each containing name-value pairs, tags or string data. It is designed to be easily readable by both human ircd. |
| - | A block consists of a | + | A block consists of a name, an opening '{' brace, statements, a closing '}' brace, and a ';' semicolon. A statement consists of a name possibly followed by an '=' equals sign and a value, ending with a semicolon. All strings must be surrounded by '"' double quotes. |
A sample block: | A sample block: | ||
| Line 15: | Line 15: | ||
};</pre></html> | };</pre></html> | ||
| - | All elements of the configuration are separated by whitespace, and can be packed on one line, or broken up over several lines. Whitespace is defined as space, tab or carriage return/linefeed. Three | + | All elements of the configuration are separated by whitespace, and can be packed on one line, or broken up over several lines. Whitespace is defined as space, tab or carriage return/linefeed. Three forms of comments are allowed: |
| - | * C style single/multi-line | + | <pre>/* C style single/multi-line */ |
| - | * | + | |
| - | + | ||
| - | + | // C++ style single-line | |
| - | + | # Shell style single-line | |
| + | </pre> | ||
| - | + | {{info|text=Blocks are used in the reverse order than how they're listed, when the configuration file is parsed. This means you should start multiple block definitions with the "fall through", and end with the most detailed.}} | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
== General block == | == General block == | ||
| - | {| class="simpletable" | + | {| class="simpletable" width="100%" |
|width="250px"|Requirement: | |width="250px"|Requirement: | ||
|REQUIRED | |REQUIRED | ||
| Line 55: | Line 38: | ||
The General block defines information about the server itself. It is required for the server to start. | The General block defines information about the server itself. It is required for the server to start. | ||
| - | <html><pre><strong> | + | <html><pre><strong>General</strong> { |
<span class="comment">/* name: the name of our server. */</span> | <span class="comment">/* name: the name of our server. */</span> | ||
name = <span class="qstring">"test.area.zone.darenet.org"</span>; | name = <span class="qstring">"test.area.zone.darenet.org"</span>; | ||
| Line 65: | Line 48: | ||
* digit between 0 and 4095, and is not updated on a rehash. | * digit between 0 and 4095, and is not updated on a rehash. | ||
*/</span> | */</span> | ||
| - | numeric = <span class="integer"> 999</span>; | + | numeric = <span class="integer">999</span>; |
<span class="comment">/* vhost: the IP to bind to when we connect outward to other servers. | <span class="comment">/* vhost: the IP to bind to when we connect outward to other servers. | ||
| Line 92: | Line 75: | ||
== Admin block == | == Admin block == | ||
| - | {| class="simpletable" | + | {| class="simpletable" width="100%" |
|width="250px"|Requirement: | |width="250px"|Requirement: | ||
|SUGGESTED | |SUGGESTED | ||
| Line 102: | Line 85: | ||
The Admin block defines information that can be retrieved with the <code>/ADMIN</code> command. | The Admin block defines information that can be retrieved with the <code>/ADMIN</code> command. | ||
| - | <html><pre><strong> | + | <html><pre><strong>Admin</strong> { |
location = <span class="qstring">"DareNET - http://www.darenet.org"</span>; | location = <span class="qstring">"DareNET - http://www.darenet.org"</span>; | ||
location = <span class="qstring">"Infrastructure Team"</span>; | location = <span class="qstring">"Infrastructure Team"</span>; | ||
| Line 113: | Line 96: | ||
== Class block == | == Class block == | ||
| - | {| class="simpletable" | + | {| class="simpletable" width="100%" |
|width="250px"|Requirement: | |width="250px"|Requirement: | ||
|RECOMMENDED | |RECOMMENDED | ||
| Line 124: | Line 107: | ||
The Class blocks define connection classes. All connections to the server are associated with a "connection class", whether they be incoming or outgoing (initiated by the server), be they clients or servers. | The Class blocks define connection classes. All connections to the server are associated with a "connection class", whether they be incoming or outgoing (initiated by the server), be they clients or servers. | ||
| - | <html><pre><strong> | + | <html><pre><strong>Class</strong> { |
<span class="comment">/* name: a name for the connection class. */</span> | <span class="comment">/* name: a name for the connection class. */</span> | ||
name = <span class="qstring">"Users"</span>; | name = <span class="qstring">"Users"</span>; | ||
| Line 141: | Line 124: | ||
maxlinks = <span class="integer">100</span>; | maxlinks = <span class="integer">100</span>; | ||
| - | <span class="comment">/* usermode: an optional list of user modes that should | + | <span class="comment">/* usermode: an optional list of user modes that should set |
* upon the user while connecting. | * upon the user while connecting. | ||
*/</span> | */</span> | ||
usermode = <span class="qstring">"+iw"</span>; | usermode = <span class="qstring">"+iw"</span>; | ||
| + | |||
| + | <span class="comment">/* maxchans: the maximum number of channels that clients may join. | ||
| + | */</span> | ||
| + | maxchans = <span class="integer">50</span>; | ||
}; | }; | ||
| - | <strong> | + | <strong>Class</strong> { |
name = <span class="qstring">"Opers"</span>; | name = <span class="qstring">"Opers"</span>; | ||
pingfreq = 2 minutes; | pingfreq = 2 minutes; | ||
| Line 156: | Line 143: | ||
}; | }; | ||
| - | <strong> | + | <strong>Class</strong> { |
name = <span class="qstring">"Server"</span>; | name = <span class="qstring">"Server"</span>; | ||
pingfreq = 3 minutes; | pingfreq = 3 minutes; | ||
| Line 175: | Line 162: | ||
}; | }; | ||
| - | <strong> | + | <strong>Class</strong> { |
name = <span class="qstring">"Leaf_Server"</span>; | name = <span class="qstring">"Leaf_Server"</span>; | ||
pingfreq = 3 minutes; | pingfreq = 3 minutes; | ||
| Line 192: | Line 179: | ||
== Client block == | == Client block == | ||
| - | {| class="simpletable" | + | {| class="simpletable" width="100%" |
|width="250px"|Requirement: | |width="250px"|Requirement: | ||
|RECOMMENDED | |RECOMMENDED | ||
| Line 202: | Line 189: | ||
The Client blocks define the hosts client connections are allowed from, and places them into classes. While the server will start without a Client block, it will not be usable. | The Client blocks define the hosts client connections are allowed from, and places them into classes. While the server will start without a Client block, it will not be usable. | ||
| - | <html><pre><strong> | + | <html><pre><strong>Client</strong> { |
<span class="comment">/* host: resolved user@host mask allowed to connect. This is optional | <span class="comment">/* host: resolved user@host mask allowed to connect. This is optional | ||
| - | * if you are using the ip mask to match against. | + | * if you are using the ip mask to match against. Additionally, if you specify *@loc for |
| + | * this field it will match all LOC users. | ||
*/</span> | */</span> | ||
host = <span class="qstring">"*@*.wirehub.net"</span>; | host = <span class="qstring">"*@*.wirehub.net"</span>; | ||
| Line 230: | Line 218: | ||
</pre></html> | </pre></html> | ||
| - | The server uses a default deny policy for incoming connections | + | The server uses a default deny policy for incoming connections. You need to define at least one Client block if you wish to use your server. |
| - | The <code>host</code> and <code>ip</code> | + | The <code>host</code> and <code>ip</code> fields specify which connections the block matches. The server always performs a DNS and ident lookup for connections. If DNS cannot find a hostname, the IP address is used instead. If ident cannot get a valid reply, "unknown" is used during this state. The client's resolved hostname, IP address, ident reply, and username (from the USER line) are used according to the results of the matches described below. |
| - | Note: There is a | + | '''Note:''' There is a specify case for UNIX domain sockets and localhost connections. In these cases, the <code>ip / host</code> field is compared with the name of the server, and thus not with any IP number representation. The name of the server is that returned in the numeric 002 reply, example: <code>002 Your host is 2.darenet.org[jolan.ppro]. running version ...</code> In this example, "jolan.ppro" is the name used for matching; therefore, UNIX domain sockets and connections to localhost would match a block containing: <code>host = "*@jolan.ppro";</code>. |
| - | + | The <code>host</code> field attempts to match first against the resolved hostname, if available, and then against the IP address. To include the connection's ident reply in the match, use a mask in the form "ident@host". If a client matches, it appears on IRC using its resolved hostname. | |
| - | + | The <code>ip</code> field attempts to match against the IP address only. An ident may be specified to match against, as well. | |
| - | + | '''Note:''' If the ident portion is specified in a mask (i.e., "ident@host" instead of "host"), and no ident reply is received from the client, it will appear on IRC with its username prefixed with a '~' tilde. If the matching mask used only the "host" form, the client's username is not prefixed. If a valid ident reply is received, it is always used and not prefixed. | |
| - | + | You need only specify a <code>host</code> or <code>ip</code> field, not both. If both are used, <code>host</code> is matched against first. | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
There may be multiple Client blocks; at least one is recommended. | There may be multiple Client blocks; at least one is recommended. | ||
| Line 252: | Line 236: | ||
== Motd block == | == Motd block == | ||
| - | {| class="simpletable" | + | {| class="simpletable" width="100%" |
|width="250px"|Requirement: | |width="250px"|Requirement: | ||
|OPTIONAL | |OPTIONAL | ||
| Line 262: | Line 246: | ||
The Motd blocks allow a different Message of the Day to be shown to connecting clients based on their origin. | The Motd blocks allow a different Message of the Day to be shown to connecting clients based on their origin. | ||
| - | <html><pre><strong> | + | <html><pre><strong>Motd</strong> { |
<span class="comment">/* host: a hostmask, class number or class name to match against. */</span> | <span class="comment">/* host: a hostmask, class number or class name to match against. */</span> | ||
host = <span class="qstring">"*.jp"</span>; | host = <span class="qstring">"*.jp"</span>; | ||
| Line 271: | Line 255: | ||
</pre></html> | </pre></html> | ||
| - | More then one | + | More then one <code>host</code> field may be present in an Motd block. |
There may be multiple Motd blocks. | There may be multiple Motd blocks. | ||
| Line 277: | Line 261: | ||
== Connect block == | == Connect block == | ||
| - | {| class="simpletable" | + | {| class="simpletable" width="100%" |
|width="250px"|Requirement: | |width="250px"|Requirement: | ||
|OPTIONAL | |OPTIONAL | ||
| Line 287: | Line 271: | ||
The Connect blocks define links to other servers. | The Connect blocks define links to other servers. | ||
| - | <html><pre><strong> | + | <html><pre><strong>Connect</strong> { |
<span class="comment">/* name: the name of the server. */</span> | <span class="comment">/* name: the name of the server. */</span> | ||
name = <span class="qstring">"uplink.darenet.org"</span>; | name = <span class="qstring">"uplink.darenet.org"</span>; | ||
| Line 294: | Line 278: | ||
* must match the reverse dns of the server. | * must match the reverse dns of the server. | ||
*/</span> | */</span> | ||
| - | host = <span class="qstring">"192.168.0. | + | host = <span class="qstring">"192.168.0.1"</span>; |
<span class="comment">/* password: the password we send and accept. */</span> | <span class="comment">/* password: the password we send and accept. */</span> | ||
| Line 329: | Line 313: | ||
== CRule block == | == CRule block == | ||
| - | {| class="simpletable" | + | {| class="simpletable" width="100%" |
|width="250px"|Requirement: | |width="250px"|Requirement: | ||
|OPTIONAL | |OPTIONAL | ||
| Line 339: | Line 323: | ||
The CRule (connection rule) blocks control ircd-darenet's advanced, real-time rule-based routing decision making system. | The CRule (connection rule) blocks control ircd-darenet's advanced, real-time rule-based routing decision making system. | ||
| - | <html><pre><strong> | + | <html><pre><strong>CRule</strong> { |
<span class="comment">/* server: rules will be applied towards servers matching this mask. */</span> | <span class="comment">/* server: rules will be applied towards servers matching this mask. */</span> | ||
server = <span class="qstring">"*.eu.darenet.org"</span>; | server = <span class="qstring">"*.eu.darenet.org"</span>; | ||
| Line 361: | Line 345: | ||
== Port Block == | == Port Block == | ||
| - | {| class="simpletable" | + | {| class="simpletable" width="100%" |
|width="250px"|Requirement: | |width="250px"|Requirement: | ||
|REQUIRED | |REQUIRED | ||
| Line 371: | Line 355: | ||
The Port blocks define where the server will accept connections. At least one port block is required to start. | The Port blocks define where the server will accept connections. At least one port block is required to start. | ||
| - | <html><pre><strong> | + | <html><pre><strong>Port</strong> { |
<span class="comment">/* port: the specific port to listen on. */</span> | <span class="comment">/* port: the specific port to listen on. */</span> | ||
port = <span class="integer">7325</span>; | port = <span class="integer">7325</span>; | ||
| Line 405: | Line 389: | ||
</pre></html> | </pre></html> | ||
| - | The mask | + | The <code>mask</code> field should only contain IP addresses (CIDR notation is supported) or '*', if used. This does not use DNS in any way, so you cannot use it to allow *.dk or *.uk, for example. Attempting to specify anything other than IP addresses will result in the port allowing connections from anyone (as if you used '*'). |
| - | If | + | If the <code>vhost</code> field (i.e., bind address) is not specified, the server will listen on all available interfaces for that port. |
There may be multiple Port blocks. | There may be multiple Port blocks. | ||
| - | == Operator | + | == Operator block == |
| - | {| class=" | + | {| class="simpletable" width="100%" |
| - | | Requirement: | + | |width="250px"|Requirement: |
| - | | SUGGESTED | + | |SUGGESTED |
|- | |- | ||
| - | | Old conf format equivalents: | + | |Old conf format equivalents: |
| - | | O: | + | |<code>O:host:password:name:flags:class</code><br /><code>o:host:password:name:flags:class</code> |
|} | |} | ||
| - | The Operator | + | The Operator blocks define server operators. One or more of these blocks is recommended if you intend to maintain your server. |
| - | + | <html><pre><strong>Operator</strong> { | |
| + | <span class="comment">/* name: the oper's username. */</span> | ||
| + | name = <span class="qstring">"johndoe"</span>; | ||
| - | + | <span class="comment">/* host: the user@host/IP mask required for this operator. CIDR | |
| + | * notation is supported. Multiple host="" lines are supported. | ||
| + | */</span> | ||
| + | host = <span class="qstring">"god@*"</span>; | ||
| + | host = <span class="qstring">"*@127.0.0.1"</span>; | ||
| - | < | + | <span class="comment">/* password: the password required to oper. By default, the password is |
| - | + | * hashed using the system's native crypt() function. Other password | |
| - | + | * mechanisms are available; the umkpasswd utility located in the ircd | |
| - | + | * directory can hash passwords using those mechanisms. If you use a | |
| - | + | * password format that is not generated by umkpasswd, ircd-darenet will | |
| - | + | * not recognize the oper's password. | |
| - | + | */</span> | |
| - | + | password = <span class="qstring">"/home/irc/keys/johndoe.key"</span>; | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | <span class="comment">/* flags: misc options for the oper. */</span> | |
| + | flags = <span class="qstring">"OAWInFR"</span>; | ||
| - | + | <span class="comment">/* snomask: (optional) specific server notice mask on oper up. If this | |
| + | * is specified, an oper will not be given sno_default. | ||
| + | */</span> | ||
| + | snomask = <span class="qstring">"+cegGiKorRs"</span>; | ||
| - | + | <span class="comment">/* privileges: (optional) you can specify privileges an oper will be | |
| + | * explicitly granted (or denied) upon opering. Any privileges defined | ||
| + | * will override any privilege settings that may be present in the class | ||
| + | * block specified above, and the default setting for those privileges. | ||
| + | */</span> | ||
| + | local = no; routing = yes; routeinfo = yes; | ||
| + | }; | ||
| + | </pre></html> | ||
| - | + | The <code>name</code> and <code>password</code> fields match the parameters of the <code>OPER</code> command. To authenticate as an IRC operator, a client must match one of the <code>host</code> fields, which may be a resolved hostname or IP address. | |
| - | + | To use an unencrypted password, prefix the password with '$PLAIN', e.g., "$PLAIN$aPpLe". | |
| - | + | If you want to use a more secure password authentication system, generate a 1024bit RSA key, and specify the path to the key as the password (as shown in the example above), and add 'R' to the <code>flags</code> field. This will use the <code>/CHALLENGE</code> system instead of <code>/OPER</code>. See doc/challenge.txt for more details. | |
| - | + | A client may also use their SSL client certificate fingerprint to authenticate as an IRC operator. To use this method, specify the client's certificate fingerprint as the password, and add 'S' to the <code>flags</code> field. | |
| - | + | Only one password authentication method may be used at a time. That is, you cannot use <code>CHALLENGE</code> and SSL client certificate fingerprint at the same time. | |
| - | + | There are currently 9 different oper flags: | |
| + | * o - Local operator | ||
| + | * O - Global operator | ||
| + | * A - Server administrator | ||
| + | * r - This operator block may be used from remote servers | ||
| + | * W - Allowed to set user mode +W | ||
| + | * I - Allowed to set user mode +I | ||
| + | * n - Allowed to set user mode +n | ||
| + | * F - Allowed to set user mode +F | ||
| + | * S - Use SSL client certificate fingerprint to <code>/OPER</code> | ||
| + | * R - Use <code>/CHALLENGE</code> password authentication system. | ||
| + | * j - Allowed to use juped nicknames. | ||
| - | + | The <code>class</code> field specifies the connection class the client will be placed in, regardless of their previous connection class. If not specified, the default class is used; see the Class block description for details. | |
| - | + | There may be multiple Operator blocks. | |
| - | + | == UWorld block == | |
| - | + | {| class="simpletable" width="100%" | |
| + | |width="250px"|Requirement: | ||
| + | |OPTIONAL | ||
| + | |- | ||
| + | |Old conf format equivalents: | ||
| + | |<code>U:server:jupednicks:*</code> | ||
| + | |} | ||
| - | + | The Uworld block defines "U-lined" servers, which are allowed to do special network things. Used for network services. | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | <html><pre><strong>UWorld</strong> { | |
| + | <span class="comment">/* name: the | ||