Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
10-29-2010, 06:08 AM
|
#1
|
LQ Newbie
Registered: Oct 2010
Posts: 5
Rep:
|
CentOS Server - How to configure DNS
Hi everyone..
i am using CentOS 5.5 trying to install DNS
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/fnamed_stats.txt";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
//query-source address * port 53;
listen-on { 127.0.0.1; 192.168.1.1; };
allow-query { 127.0.0.1; 192.168.1.0/24; };
};
zone "." IN {
type hint;
file "named.named.root";
};
zone "wycdc.com" IN {
type master;
file "data/master-wycdc.com";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "data/reverse-192.168.1";
allow-update { none; };
};
---------------------------------------------------------------------------------------------------------------
vi /var/named/chroot/var/named/data/master-wycdc.com -----(no file was there so i made master-wycdc.com)
;
; Zone file for "wycdc.com" - Internal use Only
;
$TTL 1D
@ IN SOA wyc.wycdc.com. (
10 ; Serial
8H ; Refresh
2H ; Retry
4W ; Expire
1D ) ; Minimum
;
IN NS wyc ; Name Server for the domain
;
wycdc.com. IN A 192.168.1.1 ;
wyc IN A 192.168.1.1 ;
--------------------------------------------------------------------------------------------------------------
vi /var/named/chroot/var/named/data/reverse-192.168.1
;
; Reverse File for network "192.168.1.0/24" - Internal ONLY
;
$TTL 1D
@ IN SOA wyc.wycdc.com. (
10 ; Serial
8H ; Refresh
2H ; Retry
4W ; Expire
1D ) ; Minimum
;
IN NS wyc.wycdc.com.
1 IN PTR wyc.wycdc.com
-------------------------------------------------------
when i start service named it give error
Error in named configuration:
dns_rdata_fromtext: data/master-wycdc.com:6: near '8H': not a valid number
zone wycdc.com/IN: loading master file data/master-wycdc.com: not a valid number
_default/wycdc.com/IN: not a valid number
dns_rdata_fromtext: data/reverse-192.168.1:6: near '8H': not a valid number
zone 1.168.192.in-addr.arpa/IN: loading master file data/reverse-192.168.1: not a valid number
_default/1.168.192.in-addr.arpa./IN: not a valid number
please help me out
|
|
|
10-29-2010, 06:55 AM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,230
|
Hi,
You miss in both the zone files the email address, so bind gets confused. Use something like the following:
Code:
;
; Zone file for "wycdc.com" - Internal use Only
;
$TTL 1D
@ IN SOA wyc.wycdc.com. admin.wycdc.com. (
10 ; Serial
8H ; Refresh
2H ; Retry
4W ; Expire
1D ) ; Minimum
;
IN NS wyc ; Name Server for the domain
;
wycdc.com. IN A 192.168.1.1 ;
wyc IN A 192.168.1.1 ;
Last edited by bathory; 10-29-2010 at 07:08 AM.
|
|
|
10-31-2010, 05:11 PM
|
#3
|
LQ Newbie
Registered: Oct 2010
Posts: 5
Original Poster
Rep:
|
thanx i got the DNS and DHCP working. what i mean is both services are up and i am able to ping the server with the server name. but i am not able to ping the client back. what i mean to say is if a client gets a ipaddress from the DHCP pool, how that ipaddress and the system name be written to the dns, i have made it dynammic dns by file the same way as follows:-
Your dhcpd.conf should be as follows
#####################################################################################
ddns-updates on;
ddns-domainname “test.com”;
option ntp-servers 192.168.0.1;
ddns-update-style ad-hoc;
allow unknown-clients;
default-lease-time 86400;
max-lease-time 172800;
option domain-name “test.com”;
option domain-name-servers 192.168.0.1;
option netbios-name-servers 192.168.0.1;
option netbios-dd-server 192.168.0.1;
option netbios-node-type 8;
subnet 192.168.0.1 netmask 255.255.255.0 {
range dynamic-bootp 192.168.0.10 192.168.0.60;
option subnet-mask 255.255.255.0;
option routers 192.168.0.220;
allow unknown-clients;
}
In your named.conf file it should be as follows:
acl lan {
192.168.0.1/24;
127.0.0.1;
};
options {
directory “/var/named”;
listen-on-v6 { any; };
notify no;
forward first;
forwarders {
192.168.0.254;
};
auth-nxdomain yes;
multiple-cnames yes;---- cleared this line as it showerd error
listen-on {
lan;
};
};
zone “test.com” {
type master;
file “/var/named/test.com.zone”;
allow-query {
lan;
};
allow-transfer {
lan;
};
allow-update {
lan;
};
};
zone “0.168.192.in-addr.arpa” {
type master;
file “/var/named/192.168.0.rev.zone”;
allow-query {
lan;
};
allow-transfer {
lan;
};
allow-update {
lan;
};
};
######################################################################
But when i try to ping the client from the server with its ip address it work, but not with its name.
so pls help me to figure out the problem
Last edited by redh; 10-31-2010 at 05:14 PM.
|
|
|
11-01-2010, 01:45 PM
|
#4
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,230
|
Hi,
Change
Quote:
ddns-update-style ad-hoc;
|
to
Code:
ddns-update-style interim;
because ad-hoc is deprecated.
Also you miss the zone(s) you want your dhcpd server to update and the key that must be exchanged between bind and dhcpd server.
Take a look at this howto to see what you need to do
Regards
|
|
|
11-02-2010, 01:41 AM
|
#5
|
LQ Newbie
Registered: Dec 2008
Location: NP
Posts: 28
Rep:
|
Quote:
Originally Posted by redh
Hi everyone..
i am using CentOS 5.5 trying to install DNS
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/fnamed_stats.txt";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
//query-source address * port 53;
listen-on { 127.0.0.1; 192.168.1.1; };
allow-query { 127.0.0.1; 192.168.1.0/24; };
};
zone "." IN {
type hint;
file "named.named.root";
};
zone "wycdc.com" IN {
type master;
file "data/master-wycdc.com";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "data/reverse-192.168.1";
allow-update { none; };
};
---------------------------------------------------------------------------------------------------------------
vi /var/named/chroot/var/named/data/master-wycdc.com -----(no file was there so i made master-wycdc.com)
;
; Zone file for "wycdc.com" - Internal use Only
;
$TTL 1D
@ IN SOA wyc.wycdc.com. (
10 ; Serial
8H ; Refresh
2H ; Retry
4W ; Expire
1D ) ; Minimum
;
IN NS wyc ; Name Server for the domain
;
wycdc.com. IN A 192.168.1.1 ;
wyc IN A 192.168.1.1 ;
--------------------------------------------------------------------------------------------------------------
vi /var/named/chroot/var/named/data/reverse-192.168.1
;
; Reverse File for network "192.168.1.0/24" - Internal ONLY
;
$TTL 1D
@ IN SOA wyc.wycdc.com. (
10 ; Serial
8H ; Refresh
2H ; Retry
4W ; Expire
1D ) ; Minimum
;
IN NS wyc.wycdc.com.
1 IN PTR wyc.wycdc.com
-------------------------------------------------------
when i start service named it give error
Error in named configuration:
dns_rdata_fromtext: data/master-wycdc.com:6: near '8H': not a valid number
zone wycdc.com/IN: loading master file data/master-wycdc.com: not a valid number
_default/wycdc.com/IN: not a valid number
dns_rdata_fromtext: data/reverse-192.168.1:6: near '8H': not a valid number
zone 1.168.192.in-addr.arpa/IN: loading master file data/reverse-192.168.1: not a valid number
_default/1.168.192.in-addr.arpa./IN: not a valid number
please help me out
|
==============
Boss,
Go through this link for your DNS Server Configuration its. It really helps u.
http://www.ispexperts.com.np/?page_id=310
===============
|
|
|
All times are GMT -5. The time now is 04:49 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|