Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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'.
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...
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:
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.
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...
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.
.....
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
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!
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!
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.