|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Junior Member
Iscritto dal: May 2010
Messaggi: 1
|
cooperazione DNS+DHCP
Ciao. A puro scopo auto-educativo e non professionale, sto studiando come configurare un server FreeBSD su cui girano diversi servizi. Per i miei esperimenti sto usando VirtualBox 3.1 su un host WinXP con, per ora, 3 guest: uno che dovrebbe funzionare dal server DNS e DHCP (ed altro in futuro), e 2 come client, attestati su sottoreti diverse. Il problema riguarda la cooperazione fra DNS e DHCP; ho correttamente configurato il DNS (singolo master), che risolve (dall'interno della rete virtuale) gli indirizzi interni ed esterni. Ho poi configurato il server DHCP, che ha assegnato correttamente l'indirizzo all'unico client virtuale su cui l'ho attivato. Scavando nell'immensa documentazione su FreeBSD (libri, HOWTO sulla rete, forum), ho messo insieme i file di configurazione riprodotti qua sotto. Il mio problema è che il client riceve l'indirizzo assegnato dal server; lo stesso client può essere raggiunto via IP; pinga sial il server che l'altro client per mezzo del nome, ma il suo nome non viene riconosciuto dal server DNS+DHCP né dall'altro client. All'avvio, named segnala che: "working directory is not writable"; quando il client ottiene il suo indirizzo, la console del server DNS+DHCP avvisa che non può creare il file /etc/db.marbosoft.org.jnl, "Permission denied". named gira sotto l'utenza bind; la directory di lavoro è di proprietà root/wheel con diritti di scrittura riservati al proprietario. Cambiare il permessi di accesso non serve, e comunque i diritti originali sono ripristinati al riavvio. Sia BIND che il server DHCP sono stati installati dai port FreeBSD senza problemi. Chi può svelarmi il mio errore? Marco #/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=="; }; |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 19:56.



















