Modules/2.0/spanningtree

From the makers of InspIRCd.
Jump to: navigation, search
Important Need Update - This page needs to be revised. Information posted here has been viewed as incorrect, incomplete, or obsolete. Anyone is welcome to correct these flaws if this page has not been "protected". Otherwise, contact a Docs Team member and let them know.

spanningtree module (2.0 version)

Current Future
2.0 Documentation 3.0 Documentation
Return to the 2.0 Module List
Description
Allows for linking of servers using a traditional spanning tree like those seen in most irc servers. This module is vital for linking to other servers in a network, or for linking services programs etc. However, if you never intend to link to anything (including services) then you do not need to load m_spanningtree.
Configuration Tags
To listen on a port for server connections, rather than client connections, change the type of the <bind> tag to servers, for example:
<bind address="" port="7000-7004" type="servers" ssl="gnutls">

The values have the following meanings:

  • address - specifies which address ports bind to. Leaving this field blank binds the port to all IPs available.
  • port - The port number to bind to. You may specify a port range here, e.g. "6667-6669,7000,7001". If you do this, the server will count each port within your range as a seperate binding, making the above example equivalent to five seperate bind tags. A failure on one port in the range does not prevent the entire range from being bound, just that one port number.
  • type - should be set to 'servers'. The servers type is a a TCP based connection but of a different format than that used for clients.
  • ssl - the name of the SSL module which should be used to encrypt connections on this port. Valid values are 'gnutls' (requires m_ssl_gnutls) and 'openssl' (requires m_ssl_openssl).
<link name="hub.penguin.org"
      ipaddr="penguin.box.com"
      port="7000"
      allowmask="69.58.44.0/24"
      failover="hub.other.net"
      timeout="15"
      ssl="gnutls"
      bind="1.2.3.4"
      sendpass="outgoing!password"
      recvpass="incoming!password">

This tag defines which servers can link to this one, and which servers this server may create outbound links to. The values have the following meanings:

  • name - The name is the canonical name of the server, does not have to resolve - but it is expected to be set in the remote servers connection info.
  • ipaddr - Valid host or ip address for remote server. These hosts are resolved on rehash, and cached, if you specify a hostname, so if you find that your server is still trying to connect to an old IP after you have updated your dns, try rehashing and then attempting the connect again.
  • port - The TCP port for the remote server.
  • sendpass - Password to send to create an outbound connection from this server.
  • recvpass - Password to receive to accept an inbound connection to this server.
  • ssl - the name of the SSL module which should be used to encrypt the connection. Valid values are 'gnutls' (requires m_ssl_gnutls) and 'openssl' (requires m_ssl_openssl).
  • hidden - When using m_spanningtree.so for linking. you may set this to 'yes', and if you do, the IP address/hostname of this connection will NEVER be shown to any opers on the network. In /STATS c its address will show as *@<hidden>, and during CONNECT and inbound connections, its IP will show as <hidden> UNLESS the connection fails (e.g. due to a bad password or servername).
  • allowmask - When this is defined, it indicates a range of IP addresses to allow for this link (You may use CIDR or wildcard form for this address). e.g. if your server is going to connect to you from the range 1.2.3.1 through 1.2.3.255, put 1.2.3.0/24 into this value. If it is not defined, then only the ipaddr field of the server shall be allowed.
  • timeout - If this is defined, then outbound connections will time out if they are not connected within this many seconds. If this is not defined, the default of ten seconds is used.
  • bind - The IP to bind an outgoing connection to. If not defined, connections bind to the first server IP on the box, and if none of these are defined, then the socket is bound to INADDR_ANY.

To u:line a server (give it extra privilages required for running services, Q, etc) you must include the <uline server> tag as shown in the example below. You can have as many of these as you like.

<uline server="server.name">

Extra options values

InspIRCd adds the following extra values to <options> in your configuration file:

<options hidesplits="no"
         flatlinks="no"
         hideulines="no"
         announcets="yes"
         disablehmac="no"
         quietbursts="no"
         serverpingfreq="120">

These extra values have the following meanings:

  • hidesplits - When set to 'yes', will hide split server names from non-opers. Non-opers will see '*.net *.split' instead of the server names in the quit message, identical to the way IRCu displays them.
  • flatlinks - When this value is set to true, yes or 1, /MAP and /LINKS will be flattened when shown to a non-oper.
  • hideulines - When this value is set to true, yes or 1, then U-lined servers will be hidden in /LINKS and /MAP. For non opers. Please be aware that this will also hide any leaf servers of a U-lined server, e.g. jupes.
  • announcets - If this value is defined to 'yes', 'true' or '1', then if a channel's timestamp is updated the users on the channel will be informed of the change via a server notice to the channel with the old and new TS values in the timestamp. If you think this is just pointless noise, define the value to 0.
  • disablehmac - If this value is set to a true value, then HMAC authentication is disabled on all servers. DO NOT USE unless you are having authentication issues.
  • quietbursts - If this value is set, then connect notices, xline notices etc are not shown in bursts, which is useful for large nets where this data may flood off opers.
  • serverpingfreq - This value represents the number of seconds between server PING messages, and defaults to 120 seconds (two minutes).

Configuration notes

WARNING: Unlike other ircds, u:lining a server allows ALL users on that server to operoverride modes. This should only be used for services and protected oper servers!

Modes
This module does not implement any extra user or channel modes.
Extended Bans (Extbans)
This module implements no extended bans.
Commands

Overrides the following existing commands:

MAP

Shows a server map of all connected servers.

LINKS

Shows which servers are linked to which other servers

WHOIS [nick] [server]

Allows performing of remote WHOIS on remotely connected users

CONNECT [destination server mask]

Connects local servers together

SQUIT [destination server mask]

Causes local servers to terminate their link

STATS [servername]

Allows display of remote stats

ADMIN [servername]

Allows displaying of remote server's admin details

MOTD [servername]

Allows displaying of a remote server's message of the day file

MODULES [servername]

Allows displaying of a remote server's loaded modules

Implements the following new commands:

RCONNECT [source mask] [target mask]

When the RCONNECT command is issued, all servers which match <source mask> will try to /CONNECT to the first server they have in their config matching <target mask>. For example:

RCONNECT penguins.* polarbears.*

Causes the ircd penguins.* to attempt a connect to polarbears.*, regardless of which server you are currently on (so long as penguins.* is reachable of course!)

RSQUIT [source mask] [target mask]

Causes the remote server [target mask] to have its connection closed by [source mask], similar in operation to RCONNECT.

RSQUIT [target mask]

Causes the remote server [target mask] to be disconnected from the network.

Special Notes
This module provides linking support between InspIRCd servers, and it is in fact one of the most complex modules in the tarball. For more information on the technical specifications of this module please see the section on the InspIRCd spanning tree protocol.

Note that in InspIRCd 1.1 (from beta 3 onwards) you may unload the spanningtree module with /unloadmodule. if you do this, all servers will be SQUIT. Use with caution, and only for hotfixes where possible!