-   Linux - Networking (
-   -   BIND9 - adding subdomain (

yah0m 08-15-2008 03:49 PM

BIND9 - adding subdomain
I'm doing all this via command line, and its really getting confusing... I've managed to get my main domain to resolve and work, but I've got no idea how to get a subdomain added or adding another domain.

What I want to do is put an IRC service on the sub-domain.

Spent a few hours on Google but yet to find a clean example that I can understand. Normally I've done this via CPanel, but I don't feel like spending the extra monthly payment for that when I can do it all via command line.

Mr. C. 08-15-2008 07:29 PM

We will need a little more information.

Is your server the primary name server, or is that your DNS registrar / ISP? If it is hosted by the latter, you must update records on their system. If your are the master NS, you can update your own records.

Please clarify.

yah0m 08-15-2008 07:44 PM

I'm running it off of a VPS, so I guess you could say its the primary name server.

Here is my setup:


options {
        directory  "/var/named";
        recursion no;

zone "" IN {
        type master;
        file "";
        allow-transfer { 67.*.*.*; };

$TTL 14400
@      86400    IN      SOA (
                2008021501      ; serial, todays date+todays
                86400          ; refresh, seconds
                7200            ; retry, seconds
                3600000        ; expire, seconds
                86400 )        ; minimum, seconds 86400 IN NS 86400 IN NS IN A 67.*.*.* IN A

$TTL 3h
@        IN SOA (
                      2008071801        ; Serial yyyymmddnn
                      3h                ; Refresh After 3 hours
                      1h                ; Retry Retry after 1 hour
                      1w                ; Expire after 1 week
                      1h)            ; Minimum negative caching of 1 hour

@                      86400    IN NS
@                      86400    IN NS

@                    86400    IN MX 10

ns1                    86400    IN A    67.*.*.*
ns2                    86400    IN A    67.*.*.*

@                      86400    IN A    67.*.*.*
www                    86400    IN A    67.*.*.*
ftp                    86400    IN A    67.*.*.*

Mr. C. 08-15-2008 07:55 PM

In that case, if you are allowed to edit the zone files, just add a subdomain A record.

If you want a host record, just add an irc A record just like your www and ftp host records.

If you want an irc host inside a subdomain, just add irc.subdomain as an A record inside the zone file.

That's it. Oh, and don't forget to update the serial number in any zone file you edit, and then reload named.

All times are GMT -5. The time now is 06:35 AM.