LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-16-2003, 04:44 PM   #1
richhoward
LQ Newbie
 
Registered: May 2003
Posts: 18

Rep: Reputation: 0
Red face Need Help setting up DNS???!!!


Hey guys,
Can somebody help me setup a DNS on my server, I have all the ips and everything, just need to know how to set it up on RedHat 9? Can somebody IM me or something and I will give them access to my box to install please?
 
Old 06-16-2003, 08:29 PM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
A real easy way is to install webmin. It is a web based way to configure your server.
 
Old 06-16-2003, 08:49 PM   #3
jvannucci
Member
 
Registered: Jan 2003
Location: Connecticut, US
Distribution: Red Hat 9.0
Posts: 98

Rep: Reputation: 15
Here is a configuration for a DNS server that is authoritative for the example.com domain, which is on the 192.168.1.0/24 network (only). In this example your DNS server's hostname is dnsserver.example.com. Also, the 'world' nameservers (from your ISP?) are the 204.n.n.n entries:

In /etc/named.conf add:

zone "example.com" {
type master;
file "example.com.zone";
};

zone "1.168.192.in-addr.arpa" IN {
type master;
file "example.com.rr.zone";
allow-update {none; };
};


Create /var/named/example.com.zone:

$TTL 3D
@ IN SOA dnsserver.example.com. root.dnsserver.example.com. (
200305081
8H
2H
4W
1D )
NS dnsserver.example.com.
NS 204.n.n.n
NS 204.n.n.n
MX 10 dnsserver.example.com.

localhost A 127.0.0.1
dnsserver A 192.168.1.4
host2 A 192.168.1.2
host3 A 192.168.1.3
router A 192.168.1.1

Then create /var/named/example.com.rr.zone:

$TTL 86400
@ IN SOA dnsserver.example.com. root.dnsserver.example.com. (
200305081
28800
14400
3600000
86400 )
IN NS dnsserver.example.com.

1 IN PTR router.example.com.
2 IN PTR host2.example.com.
3 IN PTR host3.example.com.
4 IN PTR dnsserver.example.com.


Finally, issue:

# chkconfig named on
# service named restart
# service named status
# host host2.example.com
# host www.google.com

These last just check your setup. Everything should work. If not, check the logs. Be careful of the syntax of the configuration files, especially the 'extra dots'.

Hope this helps.
 
Old 06-16-2003, 10:29 PM   #4
richhoward
LQ Newbie
 
Registered: May 2003
Posts: 18

Original Poster
Rep: Reputation: 0
So what do all the name.com's stand for please again?
 
Old 06-16-2003, 10:41 PM   #5
jvannucci
Member
 
Registered: Jan 2003
Location: Connecticut, US
Distribution: Red Hat 9.0
Posts: 98

Rep: Reputation: 15
Well, there's only the one 'name' - example.com. The assumption for this example (no pun intended) is that you have an internal network - not part of the internet. It's domain is example.com and all the IP addresses of the hosts in this domain are in the range 192.168.1.1 - 192.168.1.254, and their netmask is 255.255.255.0. The hosts are named host2, host3, dnsserver, and the gateway router is named 'router'. Since they're all in the example.com domain, host2.example.com is the fully qualified domain name for host2, and it's IP address is 192.168.1.2.

The example.com.zone file resolves hostname --> IP address. The example.com.rr.zone is the reverse lookup file. This resolves IP address --> hostname.

Don't hesitate to ask the question another way if I'm not answering helpfully...
 
Old 06-16-2003, 10:45 PM   #6
jvannucci
Member
 
Registered: Jan 2003
Location: Connecticut, US
Distribution: Red Hat 9.0
Posts: 98

Rep: Reputation: 15
Hey, it just occurred to me, re-reading your original post, that you don't want to set up a DNS server, you just want to access someone else's. Is that correct? If so, this is a lot simpler!

The IP addresses you have - given you by your ISP I assume, go into /etc/resolv.conf:

nameserver 204.n.n.2
nameserver 204.n.n.3
nameserver 204.n.n.4

You can have up to three nameservers listed. They are accessed in order so put the 'best' one on top. Just edit and save the file. No daemons to restart or anything.

Is this more of what you were looking for?!
 
Old 06-16-2003, 10:50 PM   #7
richhoward
LQ Newbie
 
Registered: May 2003
Posts: 18

Original Poster
Rep: Reputation: 0
no I am actually wanting to host my very own dns on my server so i can host websites.. thanks for your help!
 
Old 06-17-2003, 11:55 AM   #8
richhoward
LQ Newbie
 
Registered: May 2003
Posts: 18

Original Poster
Rep: Reputation: 0
Please answer these questions for me please.. also my doamin name is xlrregistry.com and the two dns's i have registered are ns.xlrregistry.com (12.153.20.140) & ns2.xlrregistry.com/ (12.153.20.140) please help me...

example.com = xlrregistry.com ???


what do i put in here?

NS dnsserver.example.com.
NS 204.n.n.n
NS 204.n.n.n
MX 10 dnsserver.example.com


localhost A 127.0.0.1
dnsserver A 192.168.1.4
host2 A 192.168.1.2
host3 A 192.168.1.3
router A 192.168.1.1

dnsserver.example.com. root.dnsserver.example.com

1 IN PTR router.example.com.
2 IN PTR host2.example.com.
3 IN PTR host3.example.com.
4 IN PTR dnsserver.example.com.
 
Old 06-17-2003, 12:16 PM   #9
jvannucci
Member
 
Registered: Jan 2003
Location: Connecticut, US
Distribution: Red Hat 9.0
Posts: 98

Rep: Reputation: 15
I'll do my best here. I've only set up a DNS server for my own internal network. I'm confused by both of your nameservers having the same IP address, for instance.

Yes, replace all references to example.com with xlrregistry.com.

NS ns.xlrregistry.com.

The MX record is for mail. Depends on your exact setup - name your mailserver here, like:

MX 10 mail.xlrregistry.com.

Here's where you map your hosts to their IP addresses:
localhost A 127.0.0.1
xlrregistry A 12.53.20.140
.....

ns.xlrregistry.com. root.ns.xlrregistry.com.

Here's where you map the reverse lookup for your hosts:
140 IN PTR xlrregistry.example.com.
.....
 
Old 06-17-2003, 08:37 PM   #10
gsimpson
LQ Newbie
 
Registered: Jun 2003
Posts: 8

Rep: Reputation: 0
I'm also having some trouble setting up DNS. I have an RH9 server behind a firewall. I have it working fine on my equipment on the private IPs, but for some reason it is not handling fowarding. Here's the one thing that's a little different about my configuration; mydomain is not hosted on my ISP's DNS servers. Anyways, i have zone files set up for mydomain.com and reverse lookup zones for 0.168.192 and 0.0.127
 
Old 06-17-2003, 10:00 PM   #11
richhoward
LQ Newbie
 
Registered: May 2003
Posts: 18

Original Poster
Rep: Reputation: 0
jvannucci can you please email me at rich@hitcents.com or Instant Message me on AOL Instant Messenger "RichMHow" I need to talk to you please. Thanks and have a great day!

Rich
 
Old 06-17-2003, 10:28 PM   #12
richhoward
LQ Newbie
 
Registered: May 2003
Posts: 18

Original Poster
Rep: Reputation: 0
Also does anybody know how to add httpd to start when I startup RedHat 9? Somewhere in the rc file or what? Please help me what file and what to add.. thanks!
 
Old 06-17-2003, 10:35 PM   #13
jvannucci
Member
 
Registered: Jan 2003
Location: Connecticut, US
Distribution: Red Hat 9.0
Posts: 98

Rep: Reputation: 15
# chkconfig httpd on
 
Old 06-25-2003, 04:37 PM   #14
jvannucci
Member
 
Registered: Jan 2003
Location: Connecticut, US
Distribution: Red Hat 9.0
Posts: 98

Rep: Reputation: 15
gsimpson,

Sorry, missed your post in all the traffic until just now. Does your firewall allow port 53 through? If you can, try disabling the firewall momentarily and seeing if you can resolve an external name.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setting up DNS Tamara Linux - Newbie 4 04-05-2005 08:14 AM
help setting DNS itabarau Linux - Newbie 3 02-04-2005 11:29 AM
Setting up DNS UnknownFear Linux - Networking 3 04-10-2004 01:39 AM
Setting up DNS Mneumonic Linux - Software 1 03-14-2003 04:15 PM
setting up DNS deepak Linux - Networking 4 03-31-2001 12:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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