2.0/Modules/os dns
From AnopeWiki
Language | |
---|---|
English |
|
Description
This command allows managing DNS zones used for controlling what servers users are directed to when connecting. Omitting all parameters prints out the status of the DNS zone.
- ADDZONE, DELZONE
- adds/removes a zone, eg us.yournetwork.tld. Servers can then be added to this zone with the ADDSERVER command.
- ADDSERVER, DELSERVER
- adds/removes a server to the given zone. When a query is done, the zone in question is served if it exists, else all servers in all zones are served. A server may be in more than one zone.
- ADDIP,DELIP
- associates/disassociates an IP with a server.
- POOL, DEPOOL
- adds or remove servers to their given zones.
- NOTE: This module is disabled by default.
Commands
- ADDZONE zone.name
- DELZONE zone.name
- ADDSERVER server.name [zone.name]
- DELSERVER server.name [zone.name]
- ADDIP server.name ip.address
- DELIP server.name ip.address
- SET server.name option value
- POOL server.name
- DEPOOL server.name
Examples
/msg OperServ DNS ADDZONE fred.com
/msg OperServ DNS ADDSERVER server1.fred.com fred.com
/msg OperServ DNS ADDIP server1.fred.com 192.168.1.2
/msg OperServ DNS POOL server1.fred.com
/msg OperServ DNS SET LIMIT server1.fred.com 200
/msg OperServ DNS
Default Configuration
/* * os_dns * * Provides the command operserv/dns. * * This module requires that m_dns is loaded. * * 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. * * Alternatively, you may use a slave DNS server to hide service's IP, * provide query caching, and provide better fault tolerance. * * To do this using BIND, configure similar to: * * options { max-refresh-time 60; }; * zone "irc.example.com" IN { * type slave; * masters { 127.0.0.1 port 5353; }; * }; * * Where 127.0.0.1:5353 is the IP and port services are listening on. * We recommend you externally firewall both UDP and TCP to the port * Anope is listening on. * * Finally set a NS record for irc.example.com. to BIND or services. */ #module { name = "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, when 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 } #command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns"; }