LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-23-2005, 06:51 AM   #1
tsaravan
Member
 
Registered: Jun 2005
Location: India
Posts: 101

Rep: Reputation: 15
DNS basics


Hi

We have linux machine as DNS for private IPs. This machine is also running squid for Internet Proxy. I have installed another linuxbox for some other service and for which the hostname has to be resolved. However i have added the ip address of hostname in the DNS machine but not resolving the hostname of another linuxbox.

Any help in this regard is highly appreciated.


thanx

T. Saravana
 
Old 06-23-2005, 07:10 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,602

Rep: Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532
You must create a zone file for your subnet. For example if it's 192.168.0.0 with 255.255.255.0 netmask add an entry in named.conf like this:
Code:
zone "0.168.192.in-addr.arpa" {
        type master;
        file "named.rev";
};
Then create the file named.rev with entries like the following:
Code:
1 PTR host1.domain.com.
2 PTR host2.domain.com.
...
 
Old 06-23-2005, 08:32 AM   #3
tsaravan
Member
 
Registered: Jun 2005
Location: India
Posts: 101

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by bathory
You must create a zone file for your subnet. For example if it's 192.168.0.0 with 255.255.255.0 netmask add an entry in named.conf like this:
Code:
zone "0.168.192.in-addr.arpa" {
        type master;
        file "named.rev";
};
Then create the file named.rev with entries like the following:
Code:
1 PTR host1.domain.com.
2 PTR host2.domain.com.
...
Sorry I did not give the full details in my query i.e., We already have the setup as you said and it resloves the hostname of other system in our network but except for the new linuxbox which was added recently is not being resolved. Actually I want to know how to setup the DNS for resolving hostname for private IPs and what should be the client machine configuration in this regard.

thanx

T. Saravana
 
Old 06-23-2005, 08:45 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,602

Rep: Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532
Note that when you add a new entry in a zone file you must also increase the serial number, so when you restart/reload the DNS it reads the changes.
For the new client you must add in /etc/resolv.conf your DNS IP address as the first nameserver.

Regards
 
Old 06-24-2005, 12:23 AM   #5
tsaravan
Member
 
Registered: Jun 2005
Location: India
Posts: 101

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by bathory
Note that when you add a new entry in a zone file you must also increase the serial number, so when you restart/reload the DNS it reads the changes.
For the new client you must add in /etc/resolv.conf your DNS IP address as the first nameserver.

Regards
Hi.

I new to the dns setup. Can u please let me know how to increase the serial number.

regards,
 
Old 06-24-2005, 03:35 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,602

Rep: Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532
Take a look here to learn about the various records in a zone file. Just increase the value of that number by one and restart/reload you DNS.

Regards
 
Old 06-24-2005, 03:38 AM   #7
tsaravan
Member
 
Registered: Jun 2005
Location: India
Posts: 101

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by bathory
Take a look here to learn about the various records in a zone file. Just increase the value of that number by one and restart/reload you DNS.

Regards
Thank you very much.

It worked.
 
  


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
basics of dns... Digital_Err0r Linux - Newbie 1 09-06-2005 03:34 PM
DNS Bind basics emailssent Linux - Newbie 1 09-16-2004 03:34 PM
:D basics deee Linux - Newbie 6 11-10-2003 02:01 AM
The basics of all basics... Thaidog Linux - Newbie 1 09-20-2002 02:18 AM
C basics sabeel_ansari Programming 12 07-22-2002 11:21 PM


All times are GMT -5. The time now is 01:10 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration