LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-15-2008, 03:49 PM   #1
yah0m
Member
 
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 04:01 PM.
 
Old 08-15-2008, 07:29 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
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, 07:44 PM   #3
yah0m
Member
 
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:

named.conf:
Code:
options {
        directory  "/var/named";
        recursion no;
};

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

host.domain.org.db:
Code:
$TTL 14400
@      86400    IN      SOA     ns1.domain.org. admin@domain.org. (
                2008021501      ; serial, todays date+todays
                86400           ; refresh, seconds
                7200            ; retry, seconds
                3600000         ; expire, seconds
                86400 )         ; minimum, seconds
host.domain.org. 86400 IN NS ns1.domain.org.
host.domain.org. 86400 IN NS ns2.domain.org.
host.domain.org. IN A 67.*.*.*
localhost.host.domain.org. IN A 127.0.0.1
domain.org.db:
Code:
$ORIGIN domain.org.
$TTL 3h
@        IN SOA ns1.domain.org. host.domain.org. (
                       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    ns1.domain.org.
@                      86400    IN NS    ns2.domain.org.

@                     86400     IN MX 10 smtp.domain.org.

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, 07:55 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

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

If you want a host record irc.domain.org, 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 domain.org 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.
 
  


Reply


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 01:22 PM
Subdomain->IP? johndmann Linux - Networking 5 04-03-2006 04:09 AM
Subdomain help DoobyWho Linux - General 3 04-14-2003 06:51 PM
Ftp and subdomain! eXor Linux - Networking 0 10-15-2002 11:52 AM
subdomain deepak Linux - Networking 2 03-01-2001 09:50 PM


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

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