2 ################################################
3 ### Managed by someone's ansible provisioner ###
4 ################################################
5 # Part of: https://git.somenet.org/root/pub/somesible.git
6 # 2017-2025 by someone <someone@somenet.org>
10 * [OPTIONAL] Non-Core Modules
12 * The following blocks are used to load all non-core modules, including 3rd-party modules.
13 * Modules can be prevented from loading by commenting out the line, other modules can be added by
14 * adding a module block. These modules will be loaded prior to Services connecting to your network.
16 * Note that some of these modules are labeled EXTRA, and are not included in the Debian package. Please
17 * file a wishlist bug against anope in the Debian BTS if you would like to use an 'extra' module.
23 * Provides the command generic/help.
25 * This is a generic help command that can be used with any client.
27 module { name = "help" }
32 * Adds support for the DNS protocol. By itself this module does nothing useful,
33 * but other modules such as m_dnsbl and os_dns require this.
40 * The nameserver to use for resolving hostnames, must be an IP or a resolver configuration file.
41 * The below should work fine on all UNIX-like systems. Windows users will have to find their nameservers
42 * from ipconfig /all and put the IP here.
44 nameserver = "/etc/resolv.conf"
45 #nameserver = "127.0.0.1"
48 * How long to wait in seconds before a DNS query has timed out.
53 /* Only edit below if you are expecting to use os_dns or otherwise answer DNS queries. */
56 * The IP and port services use to listen for DNS queries.
57 * Note that ports less than 1024 are privileged on UNIX/Linux systems, and
58 * require Anope to be started as root. If you do this, it is recommended you
59 * set options:user and options:group so Anope can change users after binding
67 * SOA record information.
70 /* E-mail address of the DNS administrator. */
71 admin = "admin@example.com"
73 /* This should be the names of the public facing nameservers serving the records. */
74 nameservers = "ns1.example.com ns2.example.com"
76 /* The time slave servers are allowed to cache. This should be reasonably low
77 * if you want your records to be updated without much delay.
81 /* A notify block. There should probably be one per nameserver listed in 'nameservers'.
93 * Allows configurable DNS blacklists to check connecting users against. If a user
94 * is found on the blacklist they will be immediately banned. This is a crucial module
95 * to prevent bot attacks.
102 * If set, Services will check clients against the DNSBLs when services connect to its uplink.
103 * This is not recommended, and on large networks will open a very large amount of DNS queries.
104 * Whilst services are not drastically affected by this, your nameserver/DNSBL might care.
106 check_on_connect = no
109 * If set, Services will check clients when coming back from a netsplit. This can cause a large number
110 * of DNS queries open at once. Whilst services are not drastically affected by this, your nameserver/DNSBL
113 check_on_netburst = no
116 * If set, OperServ will add clients found in the DNSBL to the akill list. Without it, OperServ simply sends
117 * a timed G/K-line to the IRCd and forgets about it. Can be useful if your akill list is being fill up by bots.
123 /* Name of the blacklist. */
124 name = "rbl.efnetrbl.org"
126 /* How long to set the ban for. */
130 * %n is the nick of the user
131 * %u is the ident/username of the user
132 * %g is the realname of the user
133 * %h is the hostname of the user
134 * %i is the IP of the user
135 * %r is the reply reason (configured below). Will be nothing if not configured.
136 * %N is the network name set in networkinfo:networkname
138 reason = "You are listed in the EFnet RBL, visit https://rbl.efnetrbl.org/?i=%i for info"
140 /* Replies to ban and their reason. If no replies are configured, all replies get banned. */
144 reason = "Open Proxy"
150 reason = "spamtrap666"
156 reason = "spamtrap50"
165 * If set, users identified to services at the time the result comes back
166 * will not be banned.
174 reason = "Drones / Flooding"
180 name = "dnsbl.dronebl.org"
182 reason = "You have a host listed in the DroneBL. For more information, visit https://dronebl.org/lookup_branded?ip=%i&network=%N"
185 /* Exempt localhost from DNSBL checks */
186 exempt { ip = "127.0.0.0/8" }
192 * Gives users who are op in the specified help channel usermode +h (helpop).
198 helpchannel = "#help"
204 * Allows services to serve web pages. By itself, this module does nothing useful.
206 * Note that using this will allow users to get the IP of your services.
207 * To prevent this we recommend using a reverse proxy or a tunnel.
215 /* Name of this service. */
218 /* IP to listen on. */
221 /* Port to listen on. */
224 /* Time before connections to this server are timed out. */
227 /* Listen using SSL. Requires an SSL module. */
230 /* If you are using a reverse proxy that sends one of the
231 * extforward_headers set below, set this to its IP.
232 * This allows services to obtain the real IP of users by
233 * reading the forwarded-for HTTP header.
234 * Multiple IP addresses can be specified separated by a space character.
236 #extforward_ip = "192.168.0.255 192.168.1.255"
238 /* The header to look for. These probably work as is. */
239 extforward_header = "X-Forwarded-For Forwarded-For"
246 * This module allows other modules to use LDAP. By itself, this module does nothing useful.
254 server = "ldap://127.0.0.1"
257 * Admin credentials used for performing searches and adding users.
259 admin_binddn = "cn=Manager,dc=anope,dc=org"
260 admin_password = "secret"
265 * m_ldap_authentication [EXTRA]
267 * This module allows many commands such as IDENTIFY, RELEASE, RECOVER, GHOST, etc. use
268 * LDAP to authenticate users. Requires m_ldap.
272 name = "m_ldap_authentication"
275 * The distinguished name used for searching for users's accounts.
277 basedn = "ou=users,dc=anope,dc=org"
280 * The search filter used to look up users's accounts.
281 * %account is replaced with the user's account.
282 * %object_class is replaced with the object_class configured below.
284 search_filter = "(&(uid=%account)(objectClass=%object_class))"
287 * The object class used by LDAP to store user account information.
288 * This is used for adding new users to LDAP if registration is allowed.
290 object_class = "anopeUser"
293 * The attribute value used for account names.
295 username_attribute = "uid"
298 * The attribute value used for email addresses.
299 * This directive is optional.
301 email_attribute = "email"
304 * The attribute value used for passwords.
305 * Used when registering new accounts in LDAP.
307 password_attribute = "userPassword"
310 * If set, the reason to give the users who try to register with NickServ,
311 * including nick registration from grouping.
313 * If not set, then registration is not blocked.
315 #disable_register_reason = "To register on this network visit https://some.misconfigured.site/register"
318 * If set, the reason to give the users who try to "/msg NickServ SET EMAIL".
319 * If not set, then email changing is not blocked.
321 #disable_email_reason = "To change your email address visit https://some.misconfigured.site"
325 * m_ldap_oper [EXTRA]
327 * This module dynamically ties users to Anope opertypes when they identify
328 * via LDAP group membership. Requires m_ldap.
330 * Note that this doesn't give the user privileges on the IRCd, only in Services.
337 * An optional binddn to use when searching for groups.
338 * %a is replaced with the account name of the user.
340 #binddn = "cn=Manager,dc=anope,dc=org"
343 * An optional password to bind with.
348 * The base DN where the groups are.
350 basedn = "ou=groups,dc=anope,dc=org"
353 * The filter to use when searching for users.
354 * %a is replaced with the account name of the user.
356 filter = "(member=uid=%a,ou=users,dc=anope,dc=org)"
359 * The attribute of the group that is the name of the opertype.
360 * The cn attribute should match a known opertype in the config.
362 opertype_attribute = "cn"
368 * This module allows other modules to use MySQL.
376 /* The name of this service. */
381 password = "mypassword"
389 * This module allows other modules to use Redis.
395 /* A redis database */
398 /* The name of this service */
402 * The redis database to use. New connections default to 0.
412 * m_regex_pcre [EXTRA]
414 * Provides the regex engine regex/pcre, which uses version 1 of the Perl Compatible Regular
415 * Expressions library. This can not be loaded at the same time as the m_regex_pcre2 module.
417 module { name = "m_regex_pcre" }
420 * m_regex_pcre2 [EXTRA]
422 * Provides the regex engine regex/pcre, which uses version 2 of the Perl Compatible Regular
423 * Expressions library. This can not be loaded at the same time as the m_regex_pcre module.
425 #module { name = "m_regex_pcre2" }
428 * m_regex_posix [EXTRA]
430 * Provides the regex engine regex/posix, which uses the POSIX compliant regular expressions.
431 * This is likely the only regex module you will not need extra libraries for.
433 #module { name = "m_regex_posix" }
436 * m_regex_tre [EXTRA]
438 * Provides the regex engine regex/tre, which uses the TRE regex library.
440 #module { name = "m_regex_tre" }
445 * Allows rewriting commands sent to/from clients.
447 #module { name = "m_rewrite" }
450 service = "ChanServ"; name = "CLEAR"; command = "rewrite"
452 /* Enable m_rewrite. */
455 /* Source message to match. A $ can be used to match anything. */
456 rewrite_source = "CLEAR $ USERS"
459 * Message to rewrite the source message to. A $ followed by a number, e.g. $0, gets
460 * replaced by the number-th word from the source_message, starting from 0.
462 rewrite_target = "KICK $1 *"
465 * The command description. This only shows up in HELP's output.
466 * Comment this option to prevent the command from showing in the
469 rewrite_description = "Clears all users from a channel"
475 * This module allows you to scan connecting clients for open proxies.
476 * Note that using this will allow users to get the IP of your services.
478 * Currently the two supported proxy types are HTTP and SOCKS5.
480 * The proxy scanner works by attempting to connect to clients when they
481 * connect to the network, and if they have a proxy running instruct it to connect
482 * back to services. If services are able to connect through the proxy to itself
483 * then it knows it is an insecure proxy, and will ban it.
490 * The target IP services tells the proxy to connect back to. This must be a publicly
491 * available IP that remote proxies can connect to.
493 #target_ip = "127.0.0.1"
496 * The port services tells the proxy to connect to.
501 * The listen IP services listen on for incoming connections from suspected proxies.
502 * This probably will be the same as target_ip, but may not be if you are behind a firewall (NAT).
504 #listen_ip = "127.0.0.1"
507 * The port services should listen on for incoming connections from suspected proxies.
508 * This most likely will be the same as target_port.
513 * An optional notice sent to clients upon connect.
515 #connect_notice = "We will now scan your host for insecure proxies. If you do not consent to this scan please disconnect immediately."
518 * Who the notice should be sent from.
520 #connect_source = "OperServ"
523 * If set, OperServ will add infected clients to the akill list. Without it, OperServ simply sends
524 * a timed G/K-line to the IRCd and forgets about it. Can be useful if your akill list is being filled up by bots.
529 * How long before connections should be timed out.
535 /* The type of proxy to check for. A comma separated list is allowed. */
538 /* The ports to check. */
541 /* How long to set the ban for. */
545 * The reason to ban the user for.
546 * %h is replaced with the type of proxy found.
547 * %i is replaced with the IP of proxy found.
548 * %p is replaced with the port.
550 reason = "You have an open proxy running on your host (%t:%i:%p)"
557 * Some IRCds allow "SASL" authentication to let users identify to Services
558 * during the IRCd user registration process. If this module is loaded, Services will allow
559 * authenticating users through this mechanism. Supported mechanisms are:
562 module { name = "m_sasl" }
565 * m_ssl_gnutls [EXTRA]
567 * This module provides SSL services to Anope using GnuTLS, for example to
568 * connect to the uplink server(s) via SSL.
570 * You may only load either m_ssl_gnutls or m_ssl_openssl, but not both.
574 name = "m_ssl_gnutls"
577 * An optional certificate and key for m_ssl_gnutls to give to the uplink.
579 * You can generate your own certificate and key pair by using:
581 * certtool --generate-privkey --bits 2048 --outfile anope.key
582 * certtool --generate-self-signed --load-privkey anope.key --outfile anope.crt
585 cert = "data/anope.crt"
586 key = "data/anope.key"
589 * Diffie-Hellman parameters to use when acting as a server. This is only
590 * required for TLS servers that want to use ephemeral DH cipher suites.
592 * This is NOT required for Anope to connect to the uplink server(s) via SSL.
594 * You can generate DH parameters by using:
596 * certtool --generate-dh-params --bits 2048 --outfile dhparams.pem
599 # dhparams = "data/dhparams.pem"
603 * m_ssl_openssl [EXTRA]
605 * This module provides SSL services to Anope using OpenSSL, for example to
606 * connect to the uplink server(s) via SSL.
608 * You may only load either m_ssl_openssl or m_ssl_gnutls, but not both.
613 name = "m_ssl_openssl"
616 * An optional certificate and key for m_ssl_openssl to give to the uplink.
618 * You can generate your own certificate and key pair by using:
620 * openssl genrsa -out anope.key 2048
621 * openssl req -new -x509 -key anope.key -out anope.crt -days 1095
623 cert = "data/anope.crt"
624 key = "data/anope.key"
627 * As of 2014 SSL 3.0 is considered insecure, but it might be enabled
628 * on some systems by default for compatibility reasons.
629 * You can use the following option to enable or disable it explicitly.
630 * Leaving this option not set defaults to the default system behavior.
636 * m_sql_authentication [EXTRA]
638 * This module allows authenticating users against an external SQL database using a custom
643 name = "m_sql_authentication"
645 /* SQL engine to use. Should be configured elsewhere with m_mysql, m_sqlite, etc. */
646 engine = "mysql/main"
648 /* Query to execute to authenticate. A non empty result from this query is considered a success,
649 * and the user will be authenticated.
651 * @a@ is replaced with the user's account name
652 * @p@ is replaced with the user's password
653 * @n@ is replaced with the user's nickname
654 * @i@ is replaced with the user's IP
656 * Note that @n@ and @i@ may not always exist in the case of a user identifying outside of the normal
657 * nickserv/identify command, such as through the web panel.
659 * Furthermore, if a field named email is returned from this query the user's email is
663 * We've included some example queries for some popular website/forum systems.
665 * Drupal 6: "SELECT `mail` AS `email` FROM `users` WHERE `name` = @a@ AND `pass` = MD5(@p@) AND `status` = 1"
666 * e107 cms: "SELECT `user_email` AS `email` FROM `e107_user` WHERE `user_loginname` = @a@ AND `user_password` = MD5(@p@)"
667 * SMF Forum: "SELECT `email_address` AS `email` FROM `smf_members` WHERE `member_name` = @a@ AND `passwd` = SHA1(CONCAT(LOWER(@a@), @p@))"
668 * vBulletin: "SELECT `email` FROM `user` WHERE `username` = @a@ AND `password` = MD5(CONCAT(MD5(@p@), `salt`))"
669 * IP.Board: "SELECT `email` FROM `ibf_members` WHERE `name` = @a@ AND `members_pass_hash` = MD5(CONCAT(MD5(`members_pass_salt`), MD5(@p@)))"
671 query = "SELECT `email_addr` AS `email` FROM `my_users` WHERE `username` = @a@ AND `password` = MD5(CONCAT('salt', @p@))"
674 * If set, the reason to give the users who try to "/msg NickServ REGISTER".
675 * If not set, then registration is not blocked.
677 #disable_reason = "To register on this network visit https://some.misconfigured.site/register"
680 * If set, the reason to give the users who try to "/msg NickServ SET EMAIL".
681 * If not set, then email changing is not blocked.
683 #disable_email_reason = "To change your email address visit https://some.misconfigured.site"
689 * This module adds an additional target option to log{} blocks
690 * that allows logging Service's logs to SQL. To log to SQL, add
691 * the SQL service name to log:targets prefixed by sql_log:. For
696 * targets = "services.log sql_log:mysql/main"
700 * By default this module logs to the table `logs`, and will create
701 * it if it doesn't exist. This module does not create any indexes (keys)
702 * on the table and it is recommended you add them yourself as necessary.
704 #module { name = "m_sql_log" }
709 * This module allows granting users services operator privileges and possibly IRC Operator
710 * privileges based on an external SQL database using a custom query.
716 /* SQL engine to use. Should be configured elsewhere with m_mysql, m_sqlite, etc. */
717 engine = "mysql/main"
719 /* Query to execute to determine if a user should have operator privileges.
720 * A field named opertype must be returned in order to link the user to their oper type.
721 * The oper types must be configured earlier in services.conf.
723 * If a field named modes is returned from this query then those modes are set on the user.
724 * Without this, only a simple +o is sent.
726 * @a@ is replaced with the user's account name
727 * @i@ is replaced with the user's IP
729 query = "SELECT `opertype` FROM `my_users` WHERE `user_name` = @a@"
735 * This module allows other modules to use SQLite.
741 /* A SQLite database */
744 /* The name of this service. */
747 /* The database name, it will be created if it does not exist. */
748 database = "anope.sqlite"
755 * Allows remote applications (websites) to execute queries in real time to retrieve data from Anope.
756 * By itself this module does nothing, but allows other modules (m_xmlrpc_main) to receive and send XMLRPC queries.
762 /* Web service to use. Requires m_httpd. */
763 server = "httpd/main"
769 * Adds the main XMLRPC core functions.
772 #module { name = "m_xmlrpc_main" }