hi ARC, thanks for the input, iv now got DHCP updating as it should now i need to get the DNS server to resolve domains for me.
did a bit more playing i now have DHCP updating the forward and reverse DNS fine now, i cant seem to get the DNS server to resolve out side domains to IPs
if i do a nslookup
www.google.com from dhcp client i get
Code:
can't find server name for address 192.168.0.2: timed out
default servers are not available
server:unknown
address: 192.168.0.2
unknown cant find www.googel.com: no responce from server
the DNS server will resolve fine
Code:
nslookup www.google.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
www.google.com canonical name = www.l.google.com.
Name: www.l.google.com
Address: 64.233.183.99
Name: www.l.google.com
Address: 64.233.183.104
Name: www.l.google.com
Address: 64.233.183.147
if i put in a google IP all is ok google page will come up i cant ping it search on it.
here are my final config files as they stand
DHCPD.conf
Code:
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
include "/etc/rndc.key";
ddns-domainname "dpsmn.sch.uk";
ddns-update-style interim;
ddns-rev-domainname "in-addr.arpa";
ddns-updates on; #allow dynamic dns
authoritative;
#master server for this domain
# Allow only the DHCP server to update DNS
#ignore client-updates;
allow client-updates;
allow unknown-clients;
zone 0.168.192.in-addr.arpa. {
primary 127.0.0.1;
key "rndckey";
}
zone dpsmn.sch.uk. {
primary 127.0.0.1;
key "rndckey";
}
#
# Fixed IP addresses - will not be entered in the leases file.
#
host pdc {
# you can find the mac address of the machine by doing an ifconfig on the machine
hardware ethernet 00:0B:2B:17:2F:00;
fixed-address 192.168.0.2;
ddns-hostname pdc;
# dnns-rev-domainname "2.0.168.192";
}
# Subnet entries for 192.168.0.X
subnet 192.168.0.0 netmask 255.255.255.0 {
# Range of DHCP IP Addresses for this scope
range 192.168.0.20 192.168.0.126;
# Lease assignments Default = 1 day, Max = 2 days
default-lease-time 86400;
max-lease-time 172800;
# Configure Clients Default Gateway
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
# Configure the clients DNS Settings
option domain-name "dpsmn.sch.uk.";
option domain-name-servers 192.168.0.2;
}
named.caching-nameserver.conf
Code:
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
acl trusted {
192.168.0.0/24;
127.0.0.0/8;
};
options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
// query-source port 53;
query-source-v6 port 53;
allow-query { trusted; };
allow-transfer { trusted;};
//internet dns
// forwarders {208.67.22.222; 208.67.220.220;};
};
controls {
inet 127.0.0.1 port 953
allow {127.0.0.1;} keys {"rndckey";};
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
//view localhost_resolver {
// match-clients { trusted; };
// match-destinations { trusted; };
// recursion yes;
include "/etc/named.rfc1912.zones";
//};
named.rfc1912.zones
Code:
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
include "/etc/rndc.key";
zone "." IN {
type hint;
file "named.ca";
};
zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
//forward zone for internal domain
zone "dpsmn.sch.uk" {
type master;
file "dpsmn.sch.uk.zone";
allow-update { key "rndckey"; };
};
//This zone is for reverse lookups.
zone "0.168.192.in-addr.arpa" {
type master;
file "reverse.zone";//this file resides in /var/named/chroot/var/named
allow-update {key "rndckey";};
};
dpsmn.sch.uk.zone
Code:
$ORIGIN .
$TTL 86400 ; 1 day
dpsmn.sch.uk IN SOA pdc.dpsmn.sch.uk. admin.dpsmn.norfolk.sch.uk. (
14062013 ; serial
10800 ; refresh (3 hours)
900 ; retry (15 minutes)
604800 ; expire (1 week)
86400 ; minimum (1 day)
)
NS pdc.dpsmn.sch.uk.
A 192.168.0.2
$ORIGIN dpsmn.sch.uk.
pdc A 192.168.0.2
reverse.zone
Code:
$ORIGIN .
$TTL 86400 ; 1 day
0.168.192.in-addr.arpa IN SOA pdc.dpsmn.sch.uk. admin.dpsmn.norfolk.sch.uk. (
1406190721 ; serial
21600 ; refresh (6 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
86400 ; minimum (1 day)
)
NS pdc.dpsmn.sch.uk.
$ORIGIN 0.168.192.in-addr.arpa.
2 PTR pdc.dpsmn.sch.uk.
any one looking over this problem with above scripts are missing " on the keys, missing . with in the zone reverse file few minor tweaks on dhcp file almade allow client-update in dhcpd.conf.
if any one can help me getting the clients to retrive domain info from the DNS this would be grate.
thanks for any help
robert