LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-07-2010, 06:36 AM   #1
piyusharora420
Member
 
Registered: Nov 2010
Posts: 93

Rep: Reputation: 0
Question configure dns server to point correct ip to your website


i have made a website and i want to use it in my lan.it is working with ip address but i want to use name convention.dns server is working correctly.my server ip is 192.168.0.254
and sample website is www.vinita.com
computers in my lan can open it using http://192.168.0.254
but not by http://www.vinita.com
please tell me what things i need to edit in named.conf file and in forward zone and reverse zone files?
i am using rhel5.please help me
 
Old 11-07-2010, 09:08 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,815

Rep: Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864
Thumbs up

Hi,

You should have posted named.conf and the zone file.
Anyway, assuming that the zone vinita.com is already defined in your name server, all you need to add is:
Code:
www IN A 192.168.0.254
and
Code:
254 IN PTR www.vinita.com.
in forward and reverse zone respectively.

Regards
 
Old 11-08-2010, 12:34 AM   #3
piyusharora420
Member
 
Registered: Nov 2010
Posts: 93

Original Poster
Rep: Reputation: 0
below is my reverse zone file 0.168.192.in-addr


$TTL 86400
@ SOA www.vinita.com. root.www.vinita.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum

IN NS www.vinita.com
254 IN PTR www.vinita.com.
1 IN PTR client1.
2 IN PTR client2.



below is my forward zone file www.vinita.com.zone

$TTL 86400
@ SOA www.vinita.com. root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

@ NS www.vinita.com.
www.vinita.com. MX 10 www.vinita.com.
@ NS client1.client.com.
client1 A 192.168.0.1
client2 A 192.168.0.2
www A 192.168.0.254



the file below is named.conf

options{
directory "/var/named/";
};

zone "example.com" {
type master;
file "example.com.zone";
allow-transfer {192.168.0.1;};
};
zone "0.168.192.in-addr.arpa" {
type master;
file "0.168.192.in-addr.arpa.zone";
};

zone "www.vinita.com" {
type master;
file "www.vinita.com.zone";
allow-transfer {any ;};
};
zone "0.168.192.in-addr" {
type master;
file "0.168.192.in-addr.zone";
"named.conf" 23L, 466C



please edit it correctly for me.thank you very much
 
Old 11-08-2010, 01:29 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,815

Rep: Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864
Hi,

The zone name in named.conf is wrong (www.vinita.com instead of vinita.com). So you need:
Code:
...
zone "vinita.com" {
type master;
file "www.vinita.com.zone";
allow-transfer {any ;};
};
The last reverse zone (zone "0.168.192.in-addr") definition is wrong and it's not needed at all.
Re: zone files, in reverse zone you miss:
Code:
$TTL 86400

@ SOA www.vinita.com. root.www.vinita.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum

IN NS www.vinita.com. ;miss the trailing dot here
254 IN PTR www.vinita.com.
1   IN PTR client1.vinita.com.
2   IN PTR client2.vinita.com.
In forward zone:
Code:
$TTL 86400
@ SOA www.vinita.com. root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

@ NS www.vinita.com.
@ MX 10 www.vinita.com. ;Use @ or vinita.com.
@ NS client1.client.com.
client1 A 192.168.0.1
client2 A 192.168.0.2
www A 192.168.0.254
Don't forget to increase the serial after changing the zone files and then reload/restart named.

Last edited by bathory; 11-08-2010 at 01:31 AM.
 
1 members found this post helpful.
Old 11-08-2010, 02:46 AM   #5
piyusharora420
Member
 
Registered: Nov 2010
Posts: 93

Original Poster
Rep: Reputation: 0
Thumbs up

You are a genius.It works.
Thanx alot.
sir i dont the meaning of NS PTR IN MX 10 @ .at the last
could you please tell me what are these things because i want to learn it from not.i don't want to cram.

Last edited by piyusharora420; 11-08-2010 at 02:50 AM. Reason: i need some clarifications
 
Old 11-08-2010, 03:07 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,815

Rep: Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864Reputation: 1864
Glad to see it worked.
If you want to learn more about the various NS records, you should take a look here. Or read the whole book as there are some useful example configurations.

BTW you can mark the thread "Solved" using the "Thread Tools" on top of the page.

Regards
 
1 members found this post helpful.
  


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
configure dns server to point correct ip to your website piyusharora420 Linux - Server 3 11-07-2010 09:29 AM
dns and dhcp server on lan - what's the correct setup? bruceh Linux - Networking 1 08-09-2009 08:56 AM
how to configure another dns server to combine use with primary current dns server. hocheetiong Linux - Newbie 1 05-29-2008 07:57 PM
Does this DNS setup look correct and question about what IP to point to? Oskare100 Linux - Server 2 11-30-2006 04:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:32 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
Open Source Consulting | Domain Registration