summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-10-22 00:54:30 -0400
committerAdam <Adam@anope.org>2012-10-22 00:54:30 -0400
commit0b9db15efc322336ddb08671ce68a3d45fb22520 (patch)
tree2e8149f370c63f08f2f197eaa92b1b36e857b0e9 /data
parentd5b2f9cfa78ed176ffe1d9f2923799fdd37217a5 (diff)
Add os_dns, a way to control your DNS zone via services
Diffstat (limited to 'data')
-rw-r--r--data/example.conf16
-rw-r--r--data/operserv.example.conf69
2 files changed, 79 insertions, 6 deletions
diff --git a/data/example.conf b/data/example.conf
index 9257b7b34..6680c6bad 100644
--- a/data/example.conf
+++ b/data/example.conf
@@ -282,6 +282,13 @@ networkinfo
options
{
/*
+ * On Linux/UNIX systems Anope can setuid and setgid to this user and group
+ * after starting up. This is useful if Anope has to bind to privileged ports
+ */
+ #user = "anope"
+ #group = "anope"
+
+ /*
* The case mapping used by services. This must be set to a valid locale name
* installed on your machine. Services use this case map to compare, with
* case insensitivity, things such as nick names, channel names, etc.
@@ -1047,6 +1054,15 @@ dns
* How long to wait in seconds before a DNS query has timed out
*/
timeout = 5
+
+ /*
+ * The port services use to listen for DNS queries.
+ * Note that ports less than 1024 are privileged on UNIX/Linux systems, and
+ * require Anope to be started as root. If you do this, it is recommended you
+ * set options:user and options:group so Anope can change users after binding
+ * to this port.
+ */
+ port = 53
}
/*
diff --git a/data/operserv.example.conf b/data/operserv.example.conf
index 4988ad33c..167d13c04 100644
--- a/data/operserv.example.conf
+++ b/data/operserv.example.conf
@@ -355,15 +355,61 @@ defcon
}
/*
- * os_list
+ * os_dns
*
- * Provides the commands operserv/chanlist and operserv/userlist.
+ * Provides the command operserv/dns.
*
- * Used to list and search the channels and users currently on the network.
+ * This module allows controlling a DNS zone. This is useful for
+ * controlling what servers users are placed on for load balancing,
+ * and to automatically remove split servers.
+ *
+ * To use this module you must set a nameserver record for services
+ * so that DNS queries go to services.
+ *
+ * We recommend you use something similar to BIND's query forwarding
+ * ability to hide service's IP, provide query caching, and provide
+ * better fault tolerance. To do this, configure BIND similar to:
+ *
+ * options {
+ * dnssec-enable no;
+ * dnssec-validation no;
+ * };
+ * zone "irc.example.com" IN {
+ * type forward;
+ * forward first;
+ * forwarders { 10.0.0.1 port 5353; }; # Where this is the IP and dns:port of services
+ * };
+ *
+ * And then set a NS record for irc.example.com. to BIND.
*/
-module { name = "os_list" }
-command { service = "OperServ"; name = "CHANLIST"; command = "operserv/chanlist"; }
-command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"; }
+#module { name = "os_dns" }
+#command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns"; }
+os_dns
+{
+ /* TTL for records. This should be very low if your records change often. */
+ ttl = 1m
+
+ /* If a server drops this many users the server is automatically removed from the DNS zone.
+ * This directive is optional.
+ */
+ user_drop_mark = 50
+
+ /* The time used for user_drop_mark */
+ user_drop_time = 1m
+
+ /* When a server is removed from the zone for dropping users, it is readded after this time.
+ * This directive is optional.
+ */
+ user_drop_readd_time = 5m
+
+ /* If set, if a server splits it is automatically removed from the zone */
+ remove_split_servers = yes
+
+ /* If set, when a server connects to the network it will be automatically added to
+ * the zone if it is a known server.
+ */
+ readd_connected_servers = no
+}
/*
* os_config
@@ -426,6 +472,17 @@ module { name = "os_kill" }
command { service = "OperServ"; name = "KILL"; command = "operserv/kill"; permission = "operserv/kill"; }
/*
+ * os_list
+ *
+ * Provides the commands operserv/chanlist and operserv/userlist.
+ *
+ * Used to list and search the channels and users currently on the network.
+ */
+module { name = "os_list" }
+command { service = "OperServ"; name = "CHANLIST"; command = "operserv/chanlist"; }
+command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"; }
+
+/*
* os_login
*
* Provides the commands operserv/login and operserv/logout.