Solved

SUB DOMAIN CONFIGURATION IN REDHAT LINUX 7.3

Posted on 2003-11-19
4
839 Views
Last Modified: 2010-04-21
I am using linux server as a primary dns server and  mailserver.Now i want launch a web site in windows 2000 server .For that i need to configure sub domail in linux.

For example:

1.The dns server domain name is "example.com" and ip is "203.50.10.1."  ( linux )
2.The mail server mx record is same "@examlp.com" and ip is "203.50.10.1."  ( linux )

3.The web server is in windows 2000 server.The ip is "203.50.10.2" .Now i want use sub domain for this ip . "update.example.com".How i configure in linux redhat .I configured dns bind by using redhat dns configuration tool.
0
Comment
Question by:belranjan
  • 2
  • 2
4 Comments
 
LVL 17

Expert Comment

by:psimation
ID: 9777226
This all happens in the zone file for the top level domain.

Look in the /var/named folder for the zone file for this domain, usually called something like domain.dom.zone or whatever you called it in your /etc/named.conf file.

A typical zone file looks like this:

;
; Forward resolution zone file for a primary nameserver
;
$TTL 86400
@ IN  SOA          domain.dom. emailaddress.domain.dom. (
      2003021903   ; Serial    < -----------------------------------------------     change this so named will know to update secondary server.
           10800   ; Refresh
            3600   ; Retry
          604800   ; Expire
           86400)  ; Minimum

              IN  NS     domain.dom.
              IN  NS     otherdomain.dom.

              IN  MX 10  mail.serer.dom.
             

              A          203.50.10.1  < ------------- this is so people won't have to type www to get to your website, you can leave it out.
ftp           IN  CNAME  domain.dom.
mail          IN  CNAME  domain.dom.
www           IN  CNAME  domain.dom.
update           IN CNAME 203.50.10.2      < ---------- you need to add this

Make the change, and change the serial number for the file, and then restart your DNS on the primary AND secondary box. Changes can take a while to propagate, except if you use this server as your nameserver.

This is a quick and dirty hack, apparently the elegant way to do this is to have a zone file for the subdomain as well...


0
 

Author Comment

by:belranjan
ID: 9777903
Hi  psimation..

I understand but i used redhat gui dns configuration tool.I want to know how to configuration from that tool.

In that there his records option is there .Is that a way i have add sub domain and assign a ip for that new subdomain.
0
 
LVL 17

Accepted Solution

by:
psimation earned 50 total points
ID: 9778019
I don't think that the GUI tool will help you to edit the zone file. Anyway, a good SySAdmin will always know how to do things from the command line as well, just incase the monitor explodes and you can only telnet/ssh into the server ;)

You can use your GUI editors to edit the zone file, use something like gedit or kedit to open the /var/named/xxx.zone file and make the changes as I have shown you. If you are afraid you mess up, make a backup of the zone file before you start editing. It's very important you observe the layout of the file wrt spaces and tabs etc. Also, note the "." after you supply "human" readable names for machines, and when supplying IP's, you DON'T give a trailing dot...

Don't be intimidated by having to make changes to the file directly, that is why Linux is such a nice OS, it was meant to be done that way in the first place...
 
0
 

Author Comment

by:belranjan
ID: 9995024
website, you can leave it out.
ftp           IN  CNAME  domain.dom.
mail          IN  CNAME  domain.dom.
www           IN  CNAME  domain.dom.
update           IN CNAME 203.50.10.2      < ---------- you need to add this

If make this changes like that.Weather i can host a web site in diffent machine with this ip.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now