Bind DNS for wildcard subdomains

binddomain-name-system

I'm on a Windows 7 VM with Apache. I'm trying to get Bind DNS setup to route subdomains to the same place as the main domain. The main domain routes correctly to 172.16.5.1 as specified in the hosts file. But the subdomains are still routing to the 127.0.0.1

I haven't added anything to the httpd.conf because I don't *think I need to. Here are my bind files. Any ideas of what might be wrong? I'm also not sure what 'hostmaster' should be changed to, if anything, in the zone file.

/etc/named file:

options {
    directory "c:\named\zones";
    allow-transfer { none; };
    recursion no;
};


zone "." IN {
    type master;
    file "db.eg.com.txt";
};

#allow-transfer { none; };

# Use with the following in named.conf, adjusting the allow list as needed:
key "rndc-key" {
    algorithm hmac-md5;
    secret "Rha8Z8AKxOeg+asqZQ==";
};

controls {
    inet 127.0.0.1 port 953
        allow { 127.0.0.1; } keys { "rndc-key"; };
};

zones/db.eg.com.txt file:

$TTL 6h
@   IN SOA  eg.com. hostmaster.eg.com. (
            2011100911
            10800
            3600
            604800
            86400 )

@       NS  eg.com.
*   IN A    172.16.5.1

Best Answer

You need to specify an NS. Then it should work. an A record for the NS is what I meant. Nevermind I just read what you put down, you can't be your own ns at least not initially. and you are missing several ";".

http://pastebin.com/JtFEBRUr