Linux - ServerThis 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.
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.
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
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
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 ;
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;
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
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.