LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-08-2007, 07:09 PM   #1
lion_heart_300
Member
 
Registered: Sep 2005
Posts: 130

Rep: Reputation: 15
how i doing DNS server


hello
im in a local network
i install lamp
and i have my site in my case is name www.linuxgood.com
amd my ip is 192.168.1.1
any user in this network want going to the site he must write http://192.168.1.1
i want the user write www.linuxgood.com to enter the site instead of http://192.168.1.1
im use fedora core test 7 and i install bind-9.3.4-4.fc7
now what i can doing to that?
thanks
 
Old 02-09-2007, 03:07 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
if you want to use BIND, you need to take the time to read the bind documentation, we can't just recite it to you here.

if you only want to do a very simple level of DNS locally, you may prefer to look at something like dnsmasq, which is *MUCH* simpler and probably would suit you better.
 
Old 02-09-2007, 08:37 PM   #3
lion_heart_300
Member
 
Registered: Sep 2005
Posts: 130

Original Poster
Rep: Reputation: 15
i want know how i doing zone file to local network in bind only
thanks
 
Old 02-09-2007, 09:14 PM   #4
sandgroper
Member
 
Registered: Jul 2004
Location: Perth , Western Australia
Distribution: Fedora Core 5 , Mint 9
Posts: 118

Rep: Reputation: 15
Quote:
Originally Posted by lion_heart_300
hello
im in a local network
i install lamp
and i have my site in my case is name www.linuxgood.com
amd my ip is 192.168.1.1
any user in this network want going to the site he must write http://192.168.1.1
i want the user write www.linuxgood.com to enter the site instead of http://192.168.1.1
im use fedora core test 7 and i install bind-9.3.4-4.fc7
now what i can doing to that?
thanks
You will need to map the Ip address to the canonical name of www.linuxgood.com in the zone file.

EG
In your zone file called linuxgood.com you should have an entry like :

Code:
server1      IN     A       192.168.1.1
www          IN     CNAME   server1

Here is a link to RH giving an explanation of using canonical names (CNAME ) in zone files.


Red Hat Docs - Zone Files
 
Old 02-10-2007, 11:55 AM   #5
lion_heart_300
Member
 
Registered: Sep 2005
Posts: 130

Original Poster
Rep: Reputation: 15
my file name it linuxgood.com.zone
it is
Code:
$TTL 3h
@	IN	SOA	 @(
		1	; Serial Number
		30m	; Refresh Rate
		15m	; Retry Interval
		1w	; Expire Delay
		1h )	; Negative Cache TTL

	IN	NS	


www	IN	A	192.168.1.1
and when i do
ping www.linuxgood.com
it say ping: unknown host
what i can do please help me
 
Old 02-10-2007, 12:16 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
is bind runing? are you even using it as your nameserver?? please... try to read some documentation...
 
Old 02-10-2007, 12:54 PM   #7
lion_heart_300
Member
 
Registered: Sep 2005
Posts: 130

Original Poster
Rep: Reputation: 15
yes i adde in resolve.conf nameserver 127.0.0.1
after i mod to any file i restart service
thanks
 
Old 02-10-2007, 09:48 PM   #8
sandgroper
Member
 
Registered: Jul 2004
Location: Perth , Western Australia
Distribution: Fedora Core 5 , Mint 9
Posts: 118

Rep: Reputation: 15
Quote:
Originally Posted by lion_heart_300
my file name it linuxgood.com.zone
it is
Code:
$TTL 3h
@	IN	SOA	 @(
		1	; Serial Number
		30m	; Refresh Rate
		15m	; Retry Interval
		1w	; Expire Delay
		1h )	; Negative Cache TTL

	IN	NS	


www	IN	A	192.168.1.1
and when i do
ping www.linuxgood.com
it say ping: unknown host
what i can do please help me

It looks like you need to do a bit of reading up on how to configure DNS.

Firstly do you have the named daemon running ?

The zone file is imcomplete and you have left out quite a bit, you need to add entries for the SOA and @ as well as the IP address of the server AND the dot "." entries after EACH *.com name.

Also have you created the entry for the name server in /var/named/chroot/var/named/named.ca ? as well as the zone file and reverse look up entries to /etc/named.conf ?

You will need to get DNS running first before you do anything else.


Instead of using ping to check your entries , use dig ,
IE
Code:
dig linuxgood.com

dig -x 192.168.1.1 ( requires a reverse look up file linuxgood.rev )
This is the better way of checking if DNS is running.

You can also use nslookup as well to check the entries
IE
Code:
nslookup linuxgood.com

nslookup 192.168.1.1
Also , every time you change an entry in any of the config files , you will have to restart named

I will attach a working zone file example to give you an idea of how a zone file should look.

Code:
NOTE : The inclusion of the dots "." after each of the .com  enties !!!!!!
        DNS is very particular about the dot entries.


$TTL		86400
@			IN SOA panther.com. webmaster.panther.com. (			
			20020827; serial
			3H	; refresh
			15M	; retry
			1W	; expire
			1D )	; minimum TTL
		IN NS	emubitter.panther.
		MX 10	mail.panther.com.
@		IN A	192.168.0.2
panther.com.	IN A	192.168.0.2
mail.panther.com. IN A 	192.168.0.2
steve1.panther.com.	IN A 	192.168.0.22
steve2.panther.com.	IN A 	192.168.0.24
steve3.panther.com.	IN A 	192.168.0.26
www.panther.com.	IN CNAME panther.com.
www.panther.com.	IN CNAME steve1.panther.com.
www.steve2.panther.com.	IN CNAME steve2.panther.com.
www.steve3.panther.com.	IN CNAME steve3.panther.com.
 
Old 02-11-2007, 02:46 AM   #9
lion_heart_300
Member
 
Registered: Sep 2005
Posts: 130

Original Poster
Rep: Reputation: 15
thanks all i resolved
 
  


Reply



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
help needed to setup a DNS server can anyone say how to configure a DNS server subha Linux - Networking 4 04-27-2012 11:50 PM
Run my own backup DNS server, ISP DNS not available chrismcnally Linux - Networking 3 07-30-2006 08:20 AM
Do I leave primary and seconday DNS blank for a DNS Server? imsam Linux - Networking 3 10-25-2004 01:48 PM
need help to set up caching only dns server to with bogus DNS entries ullas Linux - Networking 1 10-28-2003 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:29 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