BGJDNS An Authoritative DNS Server With a GUI
BGJDNS An Authoritative DNS Server With a GUI interface with a relational database back-end
Why this project? ► The 24 x 7 NOC wasn’t familiar with our DNS. ► Emergency changes resulted in the NOC calling UNIX administrators. ► Computers were invented to make life easier, not to wake sleeping people at 1: 30 AM for trivial changes that could be performed by the 24 x 7 NOC.
DNS in 5 minutes ► DNS helps resolve logical addresses with physical addresses. ► DNS tells us which servers receive e-mail. ► DNS maps IP Addresses and hostnames. (like: www. g 3. org <-> 216. 37. 18. 21) ► DNS tells us how long we should believe such mappings.
Format of Existing DNS Data Zmonster. com: ns 1. tmpw. net. : hostmaster. tmpw. net. : : 1800: 604800: 86400: 600 +monster. com: 63. 112. 169. 1: 600 +monster. com: 63. 121. 29. 1: 600 @monster. com: : mailsorter. in. tmpw. net. : 20: 600 @monster. com: : mailsorter. ma. tmpw. net. : 20: 600 &monster. com: : ns 1. tmpw. net. : 4800 &monster. com: : ns 2. tmpw. net. : 4800 Cchief. monster. com: www. akadns. monster. com. : 600 Cdover. de. monster. com: www. akadns. monster. com. : 600 Churricanerelief. monster. com: www. akadns. monster. com. : 600 Cnewjersey. monster. com: www. akadns. monster. com. : 600 Cnewmexico. monster. com: www. akadns. monster. com. : 600 Cvideo. monster. com: www. akadns. monster. com. : 600 ^1. 10. 50. 10. in-addr. arpa: jobsearch 101. ma. monster. com. : 3600: : IN ^2. 10. 50. 10. in-addr. arpa: jobsearch 102. ma. monster. com. : 3600: : IN ^3. 10. 50. 10. in-addr. arpa: jobsearch 103. ma. monster. com. : 3600: : IN ^1. 10. 10. in-addr. arpa: jobsearch 01. in. monster. com. : 3600: : IN ^2. 10. 10. in-addr. arpa: jobsearch 02. in. monster. com. : 3600: : IN ^3. 10. 10. in-addr. arpa: jobsearch 03. in. monster. com. : 3600: : IN
Drawbacks of existing format ► Concurrency issues with multiple administrators editing the same file. ► Intimidation of the dense colon-delimited format. ► Difficult to teach non-UNIX people how to modify the data.
First Schema
Final Schema
Data Stats Table Name # Tuples access_group 2 address 3, 999 cname 7, 542 domain_name 11, 471 mx 537 ns 813 ptr 382 soa 403 subnet 36
Hurdles ► Couldn’t get java nor perl to interact with Oracle on firebird. cs. iupui. edu ► Converting CREATE TABLE syntax to mysql ► Learning Open. Laszlo ► Creatnig a DNS server from scratch (perl) ► Evaluating best way to store IP Addresses ► Making sure to follow RFC 1035 standard ► Importing the data (perl)
Typical Queries What is the IP address of “g 3. org”? (an A record) SELECT concat(ip_octet 1, '. ', ip_octet 2, '. ', ip_octet 3, '. ', ip_octet 4) ip_addr FROM address NATURAL JOIN domain_name WHERE domain_name = 'g 3. org'; What is the IP address of “www. g 3. org”? (a CNAME record) SELECT concat(ip_octet 1, '. ', ip_octet 2, '. ', ip_octet 3, '. ', ip_octet 4) ip_addr FROM cname LEFT JOIN domain_name d 2 ON (cname. target_name_id = d 2. domain_name_id) LEFT JOIN domain_name d 1 ON (cname. domain_name_id = d 1. domain_name_id) LEFT JOIN address ON (d 2. domain_name_id = address. domain_name_id ) WHERE d 1. name = 'www. g 3. org';
Complex Query What is the IP address of “ www. tmphosting. net” from my workstation at 10. 17. 21? SELECT concat(ip_octet 1, '. ', ip_octet 2, '. ', ip_octet 3, '. ', ip_octet 4) ip_addr FROM (address NATURAL JOIN domain_name) LEFT JOIN subnet ON (address. access_group_id = subnet. access_group_id) WHERE (domain_name ') AND (domain_name = 'www. tmphosting. net') address. access_group_id = (SELECT access_group_id ag_id FROM access_group NATURAL JOIN subnet WHERE INET_NTOA( INET_ATON( CONCAT(net_octet 1, '. ', net_octet 2, '. ', net_octet 3, '. ', net_octet 4) ) & INET_ATON( CONCAT(mask_octet 1, '. ', mask_octet 2, '. ', mask_octet 3, '. ', mask_octet 4) ) ) = INET_NTOA( INET_ATON('10. 17. 21') & INET_ATON( CONCAT(mask_octet 1, '. ', mask_octet 2, '. ', mask_octet 3, '. ', mask_octet 4) ) ) ORDER BY net_octet 1 DESC LIMIT 1 ) ;
The End is Near ► Demonstrate DNS Server ► Demonstrate GUI ► Q/A
- Slides: 13