- Home
- Categorie
- Coding e Sistemistica
- Hosting, Server e Domini
- Configurare DNS Server senza ausilio di pannelli di controllo
-
Configurare DNS Server senza ausilio di pannelli di controllo
Ciao,
la mia situazione è questa ho un server dedicato con Fedora Core 6, ho installato LightTPD, e fino a qua tutto ok.
Il mio problema è quello di configurare correttamente gli ZONE file per far funzionare tutto a regime con il mio nome di dominio. Per fare questo ho cominciato ad aggiungere al mio file named.conf:zone "mywebsite.net" { type master; file "/var/named/mywebsite.net.db"; }; zone "ns1.mywebsite.net" { type master; file "/var/named/ns1.mywebsite.net.db"; }; zone "ns2.mywebsite.net" { type master; file "/var/named/ns2.mywebsite.net.db"; }; ```I file inclusi nel named.conf sono qui di seguito indicati: mywebsite.net.db
; Zone file for mywebsite.net
$TTL 14400
@ 86400 IN SOA ns1.mywebsite.net. admin.fastwebnet.com. (
2007081900 ; serial, todays date+todays
86400 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, secondsmywebsite.net. 86400 IN NS ns1.mywebsite.net.
mywebsite.net. 86400 IN NS ns2.mywebsite.net.mywebsite.net. IN A 208.109.108.10
localhost.mywebsite.net. IN A 127.0.0.1
mywebsite.net. IN MX 0 mywebsite.net.
mail IN CNAME mywebsite.net.
www IN CNAME mywebsite.net.
ftp IN A 208.109.108.10@ IN SOA ns1.mywebsite.net. admin.fastwebnet.com. (
2007081900 ; serial, todays date+todays serial #
28800 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, secondsns1.mywebsite.net. IN NS ns1.mywebsite.net.
ns1.mywebsite.net. IN NS ns2.mywebsite.net.
ns1.mywebsite.net. IN A 208.109.108.10localhost.ns1.mywebsite.net. IN A 127.0.0.1
ns1.mywebsite.net. IN MX 0 ns1.mywebsite.net.
mail IN CNAME ns1.mywebsite.net.
www IN CNAME ns1.mywebsite.net.
ftp IN CNAME ns1.mywebsite.net.@ IN SOA ns1.mywebsite.net. admin.fastwebnet.com. (
2007081900 ; serial, todays date+todays serial #
28800 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, secondsns2.mywebsite.net. IN NS ns1.mywebsite.net.
ns2.mywebsite.net. IN NS ns2.mywebsite.net.
ns2.mywebsite.net. IN A 208.109.108.10localhost.ns2.mywebsite.net. IN A 127.0.0.1
ns2.mywebsite.net. IN MX 0 ns2.mywebsite.net.
mail IN CNAME ns2.mywebsite.net.
www IN CNAME ns2.mywebsite.net.
ftp IN CNAME ns2.mywebsite.net.After i have restartet named : service named start This is the output in /val/log/message
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: starting BIND 9.3.4-P1 -u named -c /etc/named.caching-nameserver.conf -t /var/named/chroot
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: found 2 CPUs, using 2 worker threads
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: loading configuration from '/etc/named.caching-nameserver.conf'
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: listening on IPv6 interface lo, ::1#53
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: listening on IPv4 interface lo, 127.0.0.1#53
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: command channel listening on 127.0.0.1#953
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: command channel listening on ::1#953
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone 0.in-addr.arpa/IN/localhost_resolver: loaded serial 42
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone 0.0.127.in-addr.arpa/IN/localhost_resolver: loaded serial 1997022700
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone 255.in-addr.arpa/IN/localhost_resolver: loaded serial 42
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: 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/localhost_resolver: loaded serial 1997022700
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone localdomain/IN/localhost_resolver: loaded serial 42
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone localhost/IN/localhost_resolver: loaded serial 42
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone mywebsite.net/IN/localhost_resolver: loaded serial 2007081900
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: /var/named/ns1.mywebsite.net.db no TTL specified; using SOA MINTTL instead
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone ns1.mywebsite.net/IN/localhost_resolver: loaded serial 2007081900
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: /var/named/ns2.mywebsite.net.db no TTL specified; using SOA MINTTL instead
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone ns2.mywebsite.net/IN/localhost_resolver: loaded serial 2007081900
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: running
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone mywebsite.net/IN/localhost_resolver: sending notifies (serial 2007081900)
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone ns1.mywebsite.net/IN/localhost_resolver: sending notifies (serial 2007081900)
Aug 19 07:54:33 ip-208-109-108-10 named[12209]: zone ns2.mywebsite.net/IN/localhost_resolver: sending notifies (serial 2007081900)Per concludere ho registrato i miei DNS prezzo il mio registrar ed ora purtroppo sono nelle canne, infatti funziona solo l' NS1
http://www.mywebsite.net --> non va
http://ns1.mywebsite.net --> funziona
http://ns2.mywebsite.net --> non vaQualcuno che mi sa aiutare ? Grazie Thanks in advance for any suggestion
-
ti rispondo anche se non sono ferratissimo in DNS .
Per quello che ho capito io i DNS devi impostarli solo se hai una rete locale e un server centrale dove ci sono i DNS.
Se hai un solo server remoto non ne hai bisogno (chi interroga il tuo DNS?, solo la macchina locale).
spero di aver detto giusto
ciao
sergio
-
quella configurazione è sbagliata, ecco perchè non funziona
suppongo tu stia usando bind, in questo caso devi aggiungere al file /etc/named.conf
zone "mywebsite.net" IN { type master; file "mywebsite.net.zone"; };
e poi creare il file mywebsite.net.zone in /var/named e metterci questo
$TTL 604800 @ IN SOA ns1.mywebsite.net. admin.mywebsite.net. ( 2007031001 43200 7200 2419200 604800); fine SOA ; @ IN NS ns1 IN NS ns2 IN A IP del webserver IN MX 10 mail ; servers ns1 IN A IP del DNS primario ns2 IN A IP del DNS secondario www IN A IP del webserver ftp IN A IP del server FTP mail IN A IP del mail server *.miosito.com. IN A IP del webserver
alcuni parametri possono variare ma l'ossatura è questa.....inoltre bisogna che nel pannello di controllo del dominio vengano specificati i nuovi DNS server....suppongo che tu abbia bind che gira sul tuo server, e sullo stesso server hai anche il webserver, il mailserver, il server FTP, ecc..... in questo caso i vari IP corrispondono all'IP del server
non vanno creati file di zona per i DNS server, in quanto questi ultimi devono essere specificati in maniera esplicita ( scrivendo url e IP ) nel pannello di controllo apposito che il registrar del dominio ti ha fornito