Revision [2276]
This is an old revision of galiumfreddesign made by JulianDemarchi on 2010-12-21 13:29:30.
The design of Galiumfred
Galiumfred has been designed to create a web based solution for DNS registrations. It is based on the hard work from Timgws. This page will cover the design of the current galiumfred.
The backend
I will try and explain the parts of the backend galiumfred uses below.
DB
The backend is kept on a DB using MySQL. It uses a the table strucure required for MyDNS, so the package can use a galiumfred DB natively. This is to prevent a re-invention of the wheel, as MyDNS is a good solution for the problem at hand. This also allows for the other great MyDNS tools to be used against galiumfred.
Below are the tables in the galiumfred DB.
- countries
- dns_nsset
- dns_rr
- dns_soa
- domain_dns_txt
- domain_words
- errorlog
- tlds
- users
Scripts
There is only one perl script that does the backend heavy-towing. This script is only used if bind9 is the DNS server in use. Its job is to go through the DB and generate the required zone files. It then transfers a bind9 include file to the slave server's. Bind9 is then reloaded, and all the required zones are transfered using bind9.
The script is written in perl and uses perl's DBH module for database interaction. YAML::Syck is used so the perl app can read in it's configuration file.
The script determines what zone to generate by comparing the SOA to the currently loaded version of the zone. If they do not match, or it does not exist yet, the script moves onto the zone generation part.
Before a generated zone file is pushed into the config file, it is first checked over using named-checkzone util. This ensures that zones made active are error free. Once the bind9 configuration is built, it is checked over using named-checkconfig util. Again this makes sure that all config files can be loaded before a reload is issued.
This script is general run every 30 minutes.