This archive is retained to ensure existing URLs remain functional. It will not contain any emails sent to this mailing list after July 1, 2024. For all messages, including those sent before and after this date, please visit the new location of the archive at https://mailman.ripe.net/archives/list/dns-wg@ripe.net/
[dns-wg] Managing the database of a registry (Was: Remote registration,
- Previous message (by thread): [dns-wg] Remote registration,
- Next message (by thread): [dns-wg] Remote registration,
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Stephane Bortzmeyer
bortzmeyer at nic.fr
Fri Jul 25 10:09:30 CEST 2003
On Fri, Jul 25, 2003 at 03:05:22AM +0430, alireza saleh <saleh at mailhost.nic.ir> wrote a message of 18 lines which said: > Thank you about a software that supports reseller, I think due to special > laws in my country,a software have to be developed by the team It is quite difficult to write a software that will work for every NIC in the world (even with a lot of options in the configuration file). Unless everybody chooses Verisign's model of a registry, of course. But if you want to follow your own way, you'll have to do some coding. > Do we have any program for editing and appending Bind Zone files ?,in > the other word a CGI program that gives the name sever, ip address and > the domain name as input ,then it modifies or add this entry ? I would suggest another way: put the information (domain names, contacts, name servers - not always with the IP address, only when it's necessary, reseller, etc) in some sort of database (a RDBMS, for instance) and have the zone file be generated from the database. 1) Your CGI will then edit the database (easier than parsing BIND zone file), every "database-backed Web site" works that way. See <URL:http://www.oreilly.com/catalog/webdbapps/> for a PHP example (but you can do it in Perl, Python, whatever). 2) To extract info from the database, use something like Perl DBI <URL:http://www.perl.com/pub/a/1999/10/DBI.html> (a ten-line script is sufficient) or a shell command as simple as (for PostgreSQL): #!/bin/sh psql -q --no-align --tuples-only registry \ -c "SELECT address, hosts.name as host, domains.name as domain\ FROM Hosts,Domains,Nameservers\ WHERE nameservers.domain = domains.id AND \ nameservers.nameserver = hosts.id" |\ awk -F \| '{ print $3". IN NS "$2"."; if ($1) {print $2". IN A "$1"" } }' 3) You will have all the power of the database at your disposal. For instance, you'll be able to develop new applications with SQL quite easily. A whois server becomes very simple to create, for instance. This is more work than just managing the BIND zone file but it's worth it, IMHO.
- Previous message (by thread): [dns-wg] Remote registration,
- Next message (by thread): [dns-wg] Remote registration,
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[ dns-wg Archives ]