<p>Hi to all.<br>Sorry for my bad english.<br>For pure self-educational, not professional, purposes, I am studying how to configure a server with several services operating on it.<br>For my experiment I'm using VirtualBox 3.1.x on a WinXP host with 3 FreeBSD guests; one acts as a DHCP + DNS server; the others as clients on two different subnets.<br>The problems relate to the cooperation between DNS and DHCP; in a first stage I configured the DNS (single master) with success.<br>Digging into the great FreeBSD documentation (books, HOWTOs on the net, forums) I put together the file server configuration filea reproduced below.<br>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; <br>it pings the other client and the server using their names, but it is not recognized by name by the other virtual PCs.<br>At startup, named warns that the "working directory is not writable";<br>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,<br>"Permission denied".<br>Named runs under the bind user-id; the name working directory is owned by root / wheel with write right only for the owner.<br>Changing owner permissions does not work, because they are restored on restart.</p><p>Both BIND and DHCP server programs have been installed from FreeBSD port collections without problems.<br>Where am I wrong?<br>Thank you.<br>Marco</p><p><span mce_style="font-size: x-small;" style="font-size: x-small;"><span mce_style="font-family: courier new,courier;" style="font-family: courier new,courier;">#/etc/rc.conf<br>hostname="fbsdgw.marbosoft.org"<br>defaultrouter="192.168.0.1"<br>ifconfig_em0="DHCP"<br>inetd_enable="YES"<br>ifconfig_em1="inet 172.16.1.1 netmask 255.255.255.0"<br>ifconfig_em2="inet 172.16.2.1 netmask 255.255.255.0"<br>gateway_enable="YES"<br>named_enable="YES"<br>dhcpd_enable="YES"<br>dhcpd_ifaces="em1"<br>dhcpd_conf="/usr/local/etc/dhcpd.conf"<br>#end<br><br>#/etc/namedb/named.conf<br>options {<br>    directory    "/etc/namedb";<br>    pid-file    "/var/run/named/pid";<br>    dump-file    "/var/dump/named_dump.db";<br>    statistics-file    "/var/stats/named.stats";<br>};<br><br>include "/etc/namedb/dhcp-dns.key";<br><br>zone "marbosoft.org" in {<br>    type master;<br>    file "db.marbosoft.org";<br>    allow-update { key DHCP_UPDATER; };<br>};<br>;this is the zone with a  DHCP client<br>zone "1.16.172.in-addr.arpa" in {<br>    type master;<br>    file "db.172.16.1.0";<br>    allow-update { key DHCP_UPDATER; };<br>};<br>;this zone still has static addresses<br>zone "2.16.172.in-addr.arpa" in {<br>    type master;<br>     file "db.172.16.2.0";<br>};<br><br>zone "." in {<br>    type hint;<br>    file "named.root";<br>};<br>#end<br><br>#file /etc/namedb/db.marbosoft.org<br>$TTL 1h<br>marbosoft.org. IN SOA fbsdgw.marbosoft.org. root.marbosoft.org. (<br>    2    ; serial<br>    1h    ; refresh<br>    1h    ; retry<br>    1w    ; ends<br>    1H    ; negative cashing<br>);<br><br>;name servers<br>marbosoft.org. IN NS    fbsdgw.marbosoft.org.<br><br>;canonical names<br>localhost.marbosoft.org.  IN A    127.0.0.1<br>;this is the client in DHCP; so I've excluded it from static addresses<br>;fbsdnw11.marbosoft.org.   IN A  172.16.1.2<br>fbsdnw21.marbosoft.org.   IN A  172.16.2.2<br>#I've excluded some rows like aliases<br>#end<br><br>#/etc/namedb/db.172.16.1.0<br>$TTL 1h<br>1.16.172.in-addr.arpa. IN SOA fbsdgw.marbosoft.org. root.fbsdgw.marbosoft.org. (<br>    1    <br>    1h <br>    1h <br>    1w<br>    1h <br>);<br><br>;name servers<br>1.16.172.in-addr.arpa.    IN NS fbsdgw.marbosoft.org.<br><br>;canonical names<br>1.1.16.172.in-addr.arpa.    IN PTR fbsdgw.marbosoft.org.<br>;DHCP client<br>;2.1.16.172.in-addr.arpa.    IN PTR fbsdnw11.marbosoft.org.<br>#end<br><br>#the file /etc/namedb/named.root is the one installed by BIND9 itself<br><br>#file /usr/local/etc/dhcp.conf<br>authoritative;<br>option domain-name "marbosoft.org";<br>option domain-name-servers 172.16.1.1;<br>default-lease-time 600;<br>max-lease-time 7200;<br>ddns-update-style interim;<br>subnet 172.16.1.0 netmask 255.255.255.0 {<br>    range 172.16.1.100 172.16.1.150;<br>    option routers 172.16.1.1;<br>}<br>include "/etc/namedb/dhcp-dns.key";<br><br>zone marbosoft.org {<br>  primary 127.0.0.1;<br>  key DHCP_UPDATER;<br>}<br><br>zone 1.16.172.in-addr.arpa {<br>  primary 127.0.0.1;<br>  key DHCP_UPDATER;<br>}<br>#end<br><br>#file /etc/namedb/dhcp-dns.key<br>key DHCP_UPDATER {<br>    algorithm hmac-md5;<br>    secret "+4J+tLcLuwvnm/epVb96DYri4Ood1OG5M+IvN7RBgDgIuNpdmKCFkbyw5pmMXMCDGVuiVI/qokDTyyDVc0OoWw==";<br>};</span></span></p><p><br></p>