DNS & DHCP configuration


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers DNS & DHCP configuration
# 1  
Old 03-12-2010
Data DNS & DHCP configuration

Hi to all.
Sorry for my bad english.
For pure self-educational, not professional, purposes, I am studying how to configure a server with several services operating on it.
For my experiment I'm using VirtualBox 3.1.4 on a WinXP host with 3 FreeBSD guests; one acts as a DHCP + DNS server; the others as clients on two different subnets.
The problems relate to the cooperation between DNS and DHCP; in a first stage I configured the DNS (single master) with success.
Digging into the great FreeBSD documentation (books, HOWTOs on the net, forums) I put together the file server configuration filea reproduced below.
The problem is that the client, configured as a DHCP client, receives the address assigned by DHCP server; the client can be reached with IP; it pings the other client and the server using their names, but it is not recognized by name by the other virtual PCs.
At startup, named warns that the "working directory is not writable";
when the client seeks and gets its address, the DNS + DHCP server console warns it can not create the file /etc/db.marbosoft.org.jnl,
"Permission denied".
Named
runs under the bind user-id; the name working directory is owned by root / wheel with write right only for the owner.
Changing owner permissions does not work, because they are restored on restart.
Where am I wrong?
Thank you.
Marco

Code:
#/etc/rc.conf
hostname="fbsdgw.marbosoft.org"
defaultrouter="192.168.0.1"
ifconfig_em0="DHCP"
inetd_enable="YES"
ifconfig_em1="inet 172.16.1.1 netmask 255.255.255.0"
ifconfig_em2="inet 172.16.2.1 netmask 255.255.255.0"
gateway_enable="YES"
named_enable="YES"
dhcpd_enable="YES"
dhcpd_ifaces="em1"
dhcpd_conf="/usr/local/etc/dhcpd.conf"
#end

#/etc/namedb/named.conf
options {
    directory    "/etc/namedb";
    pid-file    "/var/run/named/pid";
    dump-file    "/var/dump/named_dump.db";
    statistics-file    "/var/stats/named.stats";
};

include "/etc/namedb/dhcp-dns.key";

zone "marbosoft.org" in {
    type master;
    file "db.marbosoft.org";
    allow-update { key DHCP_UPDATER; };
};
;this is the zone with a  DHCP client
zone "1.16.172.in-addr.arpa" in {
    type master;
    file "db.172.16.1.0";
    allow-update { key DHCP_UPDATER; };
};
;this zone still has static addresses
zone "2.16.172.in-addr.arpa" in {
    type master;
     file "db.172.16.2.0";
};

zone "." in {
    type hint;
    file "named.root";
};
#end

#file /etc/namedb/db.marbosoft.org
$TTL 1h
marbosoft.org. IN SOA fbsdgw.marbosoft.org. root.marbosoft.org. (
    2    ; serial
    1h    ; refresh
    1h    ; retry
    1w    ; ends
    1H    ; negative cashing
);

;name servers
marbosoft.org. IN NS    fbsdgw.marbosoft.org.

;canonical names
localhost.marbosoft.org.  IN A    127.0.0.1
;this is the client in DHCP; so I've excluded it from static addresses
;fbsdnw11.marbosoft.org.   IN A  172.16.1.2
fbsdnw21.marbosoft.org.   IN A  172.16.2.2
#I've excluded some rows like aliases
#end

#/etc/namedb/db.172.16.1.0
$TTL 1h
1.16.172.in-addr.arpa. IN SOA fbsdgw.marbosoft.org. root.fbsdgw.marbosoft.org. (
    1    
    1h 
    1h 
    1w
    1h 
);

;name servers
1.16.172.in-addr.arpa.    IN NS fbsdgw.marbosoft.org.

;canonical names
1.1.16.172.in-addr.arpa.    IN PTR fbsdgw.marbosoft.org.
;DHCP client
;2.1.16.172.in-addr.arpa.    IN PTR fbsdnw11.marbosoft.org.
#end

#the file /etc/namedb/named.root is the one installed by BIND9 itself

#file /usr/local/etc/dhcp.conf
authoritative;
option domain-name "marbosoft.org";
option domain-name-servers 172.16.1.1;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style interim;
subnet 172.16.1.0 netmask 255.255.255.0 {
    range 172.16.1.100 172.16.1.150;
    option routers 172.16.1.1;
}
include "/etc/namedb/dhcp-dns.key";

zone marbosoft.org {
  primary 127.0.0.1;
  key DHCP_UPDATER;
}

zone 1.16.172.in-addr.arpa {
  primary 127.0.0.1;
  key DHCP_UPDATER;
}
#end

#file /etc/namedb/dhcp-dns.key
key DHCP_UPDATER {
    algorithm hmac-md5;
    secret "+4J+tLcLuwvnm/epVb96DYri4Ood1OG5M+IvN7RBgDgIuNpdmKCFkbyw5pmMXMCDGVuiVI/qokDTyyDVc0OoWw==";
};

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

DHCP and DNS on a home network

Let's say I have a home network containing a server that acts as the resident gateway and serves dhcp and dns requests. Laptop A is frequently connected and disconnected from the network as it is used as a travel computer. Is there a secure way to make sure that whenever laptop A is connected to... (3 Replies)
Discussion started by: Zygomorph
3 Replies

2. Red Hat

DHCP & DNS - Clients get IP but don't register in DNS

I am trying to setup a CentOS 6.2 server that will be doing 3 things DHCP, DNS & Samba for a very small office (2 users). The idea being this will replace a very old Win2k server. The users are all windows based clients so only the server will be Linux based. I've installed CentOS 6.2 with... (4 Replies)
Discussion started by: FireBIade
4 Replies

3. UNIX for Advanced & Expert Users

dnsmasq for dhcp to setup dns

Is dnsmasq important for dhcp to setup dns? (3 Replies)
Discussion started by: cokedude
3 Replies

4. IP Networking

configuring dns and dhcp

hello i am running my sipx server in 192.168.2.14 i would like to configure domain name and host name for this ..... can anyone tell me how to configure dns server and dhcp server so that any body both outside and inside the lan could access the sipx server by their host.domain.com name (1 Reply)
Discussion started by: sudeepiit
1 Replies

5. Red Hat

DHCP configuration

Hi, I'm just wanna configure dhcp server using redhat enterprise 4.0 as. can anyone help me on this, on setting using two NICs. Thankx. (1 Reply)
Discussion started by: johan_sysv
1 Replies

6. Solaris

DHCP DNS Config

I'm running Solaris 9 and I need my box to request it's DNS servers off a DHCP server - can I do this? (1 Reply)
Discussion started by: Jdogg
1 Replies

7. IP Networking

DHCP and DNS

I asked a similar type question in the solaris forum but i think this relates closer to networking. I am trying to setup a small NIS environment that is contained within a large company network. The client machines are getting an IP from the companys' Windows DHCP server. The NIS server has a... (3 Replies)
Discussion started by: meyersp
3 Replies

8. UNIX for Dummies Questions & Answers

DHCP update DNS ?

Hi all, I'm in the dark about this. I have setup a dhcp server and a DNS server. I'm confuss as to how to have DNS auto update any new clinet that the dhcp has given an ip address for. Can this be done. I think that I'm missing something in the configuration of DHCP. I was told that when a DHCPD... (3 Replies)
Discussion started by: larry
3 Replies

9. IP Networking

Solaris DHCP and DNS

I have managed to setup my Solaris box to receive an IP number from a DHCP server. In addition, I can ping and telnet between my dhcp server and my solaris box using the IP number. However, I can't resolve addresses by name from my solaris box. In my nsswitch.conf file I have: hosts: dns ... (4 Replies)
Discussion started by: marist89
4 Replies

10. IP Networking

DHCP, DNS and LDAP

I have just started learning Unix on Solaris and have been asked to learn DHCP, DNS and LDAP very quick in order to implement them and maintain. Does anyone know how to do this or a decent book that will include all the above three which tells you how to install and maintain. All i have found so... (2 Replies)
Discussion started by: ollyparkhouse
2 Replies
Login or Register to Ask a Question