Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-15-2008, 04:49 PM   #1
Registered: Jul 2008
Posts: 38

Rep: Reputation: 15
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.

Last edited by yah0m; 08-15-2008 at 05:01 PM.
Old 08-15-2008, 08:29 PM   #2
Mr. C.
Senior Member
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
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.
Old 08-15-2008, 08:44 PM   #3
Registered: Jul 2008
Posts: 38

Original Poster
Rep: Reputation: 15
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.*.*.*
Old 08-15-2008, 08:55 PM   #4
Mr. C.
Senior Member
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic IP, Bind9, Subdomain Question skorpi0wn Linux - Networking 1 06-04-2009 02:22 PM
Subdomain->IP? johndmann Linux - Networking 5 04-03-2006 05:09 AM
Subdomain help DoobyWho Linux - General 3 04-14-2003 07:51 PM
Ftp and subdomain! eXor Linux - Networking 0 10-15-2002 12:52 PM
subdomain deepak Linux - Networking 2 03-01-2001 10:50 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration