Zone File

Tribal1

New Member
Joined
Jan 7, 2008
Messages
5
Reaction score
0
Hi All

we are busy with a project and i need to know how i would go about getting the zonefile for the co.za namespace. Im trying to get a list of all the domains in co.za plus there IP info. If anybody can help in this matter it would be appreciated a lot
 
It aint going to happen. Unless you can get hold of a unsecure DNS server that hosts the .co.za namespace and do a DNS transfer.....highly unlikely :)
 
I dont want to do any transfers or anything like that. We have a dns server thats not capable of doing forward lookups so we have to get a complete list of domains and ip's to store on it. It will be updated on a 2weekly basis
 
Hi All

we are busy with a project and i need to know how i would go about getting the zonefile for the co.za namespace. Im trying to get a list of all the domains in co.za plus there IP info. If anybody can help in this matter it would be appreciated a lot

Try get hold of any of the CO.ZA authorizative DNS Severs.Use Spamsade and directly query that server.Sometimes you can transfer that zone file to a txt file on your pc :D:D:D:D:D
 
Why are you not just connecting to a recursive server and doing DNS lookups through that?

Besides anything else - the CoZa zonefile gives you nothing more than referrals to other DNS servers that are authoritative for each domain and you would still require a DNS lookup to those servers. :confused:
 
Why are you not just connecting to a recursive server and doing DNS lookups through that?

Besides anything else - the CoZa zonefile gives you nothing more than referrals to other DNS servers that are authoritative for each domain and you would still require a DNS lookup to those servers. :confused:

agreed
 
Why are you not just connecting to a recursive server and doing DNS lookups through that?

Besides anything else - the CoZa zonefile gives you nothing more than referrals to other DNS servers that are authoritative for each domain and you would still require a DNS lookup to those servers. :confused:

agreed
 
mmm How would i get a list of all domains in the .co.za namespace ?
 
You don't! You need a DNS server to do forward lookups. Even if you got a list of all co.za servers and IP's the list would quickly become outdated as names/ip's are constantly being changed.

Why exactly do you require this info?
 
yes i understand that it will get outdated. I need to find a way to get a list of all the domains that are registered in co.za

thats is my MAIN prob
 
Hi All

we are busy with a project and i need to know how i would go about getting the zonefile for the co.za namespace. Im trying to get a list of all the domains in co.za plus there IP info. If anybody can help in this matter it would be appreciated a lot

Don't know if this will help you:
http://whois.co.za/nameserver.shtml
This facility can be used by a nameserver administrator to get a list of CO.ZA domains registered as using the specified nameserver, as per the CO.ZA zone file.

It will send a mail to your nameserver. As I haven't tried it, I don't know what it sends. :o
 
Last edited:
By typing in a nameserver, and selecting either administrator or root, an e-mail will be sent to that account on the nameserver with a list of zones that the namserver should be authorative for.

ain't going to help. It will email the domain admin for that particular domain and will send authoritive name servers for your domain.

.co.za will more than likely tell you go hopping if you request this info from them. There's no valid reason why anyone needs a list of all .co.za sites and IP's.
 
ain't going to help. It will email the domain admin for that particular domain and will send authoritive name servers for your domain.

.co.za will more than likely tell you go hopping if you request this info from them. There's no valid reason why anyone needs a list of all .co.za sites and IP's.

Okay, thought there might be more to it after reading the other responses.
 
I think this might be a step in the right direction:
Code:
#!/usr/bin/python
# Generate an iptable rule for each South African netblock
# Simeon Miteff <[[i]e-mail address removed to respect his privacy[/i]]>
# Thu Dec 14 11:43:25 SAST 2006
import telnetlib, sys, re, string

rule_template = "iptables -A INPUT -p tcp -s ! %s --syn --dport 25 -j REJECT"

def prefix_from_class(ip):
    octet = string.atoi(ip.split('.')[0])
    if (octet >> 7)==0:
        return ip + '/8'
    if (octet >> 6)==2:
        return ip + '/16'
    if (octet >> 5)==6:
        return ip + '/24'
    return ip + '/ER'

con = telnetlib.Telnet('public-route-server.is.co.za')
con.read_until('local-route-server>')
con.write('terminal length 0\r')
con.read_until('local-route-server>')
con.write('show ip bgp\r')
output = con.read_until('local-route-server>')
con.write('exit')

for line in output.splitlines():
    match = re.match('^([^\d]*)\s+([/\.\d]*)\s+(.*)$', line)

    if match:
        block = match.group(2)
        if len(block) > 0:
            if not re.match('^([\.\d]+)/([\.\d]+)$', block):
                block = prefix_from_class(block)
                print rule_template % block

If you have trouble following that, what it basically does is telnet to public-route-server.is.co.za and issue the following commands:
Code:
terminal length 0
show ip bgp
exit

Seeing as this is a public IS server, I don't think that there's anything wrong with sharing this information (I hope).

... and now that I've Googled "public-route-server site:.za" I found a few other threads on this forum giving exactly the same info. So maybe check those threads if you need more info.
 
How is the above going to help with DNS - the public route server shows the local networks which are routed in SA. It doesn't return a list of server names/ip's
 
Top
Sign up to the MyBroadband newsletter
X