-CONTRIBUTED TOOL: ALPHA status-
Through the following scripts, it is possible to generate dynamic updates to bind (a.k.a. named), for a single domain.
There a separate set of scripts for managing DNS via static zones.
The 'ip' table contains a list of IP addresses with a reference to names in the systems table.Names are not stored in the'ip' table to avoid duplication. These means that if a hosts is to appear in DNS, but is not automatically detected by FreeNAC, it must be manualyl entered into the systems table.
| Field | Type | Comment
| id | int(10) unsigned | index
| address | int(10) unsigned | IP address, use INET_NTOA to convert
| subnet | int(10) unsigned | Subnet adress
| status | tinyint(4) |
| comment | varchar(255) |
| system | int(11) | reference to an index in the systems table
| source | varchar(32) | ?
| dns_update | tinyint(4) | ?
| lastupdate | timestamp |
| lastchange | timestamp |
So, next a query to pull an IP to name mapping:
SELECT ip.id as id, INET_NTOA(ip.address) as ip, systems.name as name, ip.dns_update as dns_update, systems.dns_alias as cname FROM ip LEFT JOIN systems ON ip.system = systems.id WHERE ip.system != 0;
The configuration options are in the freenac database and can be configured by the windows GUI
Using ip.address and systems.name from the FreeNAC 'ip' DB, generate a list of dynamic DNS updates. The DNS update commands are written to a temporary file, once the file has been written, the dns_update flag is reset for each field.