[solved]Bind9 - działa ale nie działa - Ruthwen - 05-16-2011 09:01 PM
Witam.
Mama taki problem z dnsem, dodałem sobie przykładową domenę: mojadomena.kom:
Code:
$TTL 12H
$ORIGIN mojadomena.kom.
@ IN SOA ns1.mojadomena.kom. postmaster.mojadomena.kom. (
; dmn [mojadomena.kom] timestamp entry BEGIN.
2011051503 ; Serial
; dmn [mojadomena.kom] timestamp entry END.
8H ; Refresh
2H ; Retry
7D ; Expire
1D ; Minimum TTL
)
IN NS ns1.mojadomena.kom.
IN NS ns2.mojadomena.kom.
IN MX 10 mail.mojadomena.kom.
mojadomena.kom. IN A xx.xx.xx.xx
www IN A xx.xx.xx.xx
mojadomena.kom. IN TXT "v=spf1 a mx ip4:xx.xx.xx.xx ip4:xx.xx.xx.xx ~all"
localhost IN A 127.0.0.1
mail IN A xx.xx.xx.xx
ns1 IN A xx.xx.xx.xx
ns2 IN A xx.xx.xx.xx
; CNAME for VHCS compatibility
ns IN CNAME ns1
; CNAME for mail transfer
imap IN CNAME mail
pop IN CNAME mail
pop3 IN CNAME mail
relay IN CNAME mail
smtp IN CNAME mail
; CNAME for web transfer
ftp IN CNAME www
; sub [{SUB_NAME}] entry BEGIN.
; sub [{SUB_NAME}] entry END.
Bind podobno działa:
netstat:
Code:
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 17750/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 17750/named
tcp6 0 0 ::1:953 :::* LISTEN 17750/named
tcp6 0 0 ::1:53 :::* LISTEN 17750/named
Firewalla na chwilę obecną tam nie ma żadnego.
W panelu widzę coś takiego jak w załączniku, natomiast jak próbuję na serwerze rozwiązać tamtą domenę to widzę coś takiego:
Code:
nslookup
> server 127.0.0.1
Default server: 127.0.0.1
Address: 127.0.0.1#53
> mojadomena.kom
Server: 127.0.0.1
Address: 127.0.0.1#53
** server can't find mojadomena.kom: SERVFAIL
Tak wygląda log restartu bind-a:
Code:
May 16 12:29:59 mojhost named[30674]: shutting down
May 16 12:29:59 mojhost named[30674]: no longer listening on 127.0.0.1#53
May 16 12:29:59 mojhost named[30674]: no longer listening on ::1#53
May 16 12:29:59 mojhost named[30674]: exiting
May 16 12:30:00 mojhost named[17750]: starting BIND 9.7.3 -u bind
May 16 12:30:00 mojhost named[17750]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-dlz-postgres=no' '--with-dlz-mysql=no' '--with-dlz-bdb=yes' '--with-dlz-filesystem=yes' '--with-dlz-ldap=yes' '--with-dlz-stub=yes' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=' 'CPPFLAGS='
May 16 12:30:00 mojhost named[17750]: adjusted limit on open files from 1024 to 1048576
May 16 12:30:00 mojhost named[17750]: found 2 CPUs, using 2 worker threads
May 16 12:30:00 mojhost named[17750]: using up to 4096 sockets
May 16 12:30:00 mojhost named[17750]: loading configuration from '/etc/bind/named.conf'
May 16 12:30:00 mojhost named[17750]: reading built-in trusted keys from file '/etc/bind/bind.keys'
May 16 12:30:00 mojhost named[17750]: using default UDP/IPv4 port range: [1024, 65535]
May 16 12:30:00 mojhost named[17750]: using default UDP/IPv6 port range: [1024, 65535]
May 16 12:30:00 mojhost named[17750]: listening on IPv4 interface lo, 127.0.0.1#53
May 16 12:30:00 mojhost named[17750]: listening on IPv6 interface lo, ::1#53
May 16 12:30:00 mojhost named[17750]: generating session key for dynamic DNS
May 16 12:30:00 mojhost named[17750]: set up managed keys zone for view _default, file 'managed-keys.bind'
May 16 12:30:00 mojhost named[17750]: automatic empty zone: 254.169.IN-ADDR.ARPA
May 16 12:30:00 mojhost named[17750]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
May 16 12:30:00 mojhost named[17750]: automatic empty zone: 100.51.198.IN-ADDR.ARPA
May 16 12:30:00 mojhost named[17750]: automatic empty zone: 113.0.203.IN-ADDR.ARPA
May 16 12:30:00 mojhost named[17750]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
May 16 12:30:00 mojhost named[17750]: automatic empty 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.0.IP6.ARPA
May 16 12:30:00 mojhost named[17750]: automatic empty zone: 1.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
May 16 12:30:00 mojhost named[17750]: automatic empty zone: D.F.IP6.ARPA
May 16 12:30:00 mojhost named[17750]: automatic empty zone: 8.E.F.IP6.ARPA
May 16 12:30:00 mojhost named[17750]: automatic empty zone: 9.E.F.IP6.ARPA
May 16 12:30:00 mojhost named[17750]: automatic empty zone: A.E.F.IP6.ARPA
May 16 12:30:00 mojhost named[17750]: automatic empty zone: B.E.F.IP6.ARPA
May 16 12:30:00 mojhost named[17750]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
May 16 12:30:00 mojhost named[17750]: command channel listening on 127.0.0.1#953
May 16 12:30:00 mojhost named[17750]: command channel listening on ::1#953
May 16 12:30:00 mojhost named[17750]: the working directory is not writable
May 16 12:30:00 mojhost named[17750]: zone 0.in-addr.arpa/IN: loaded serial 1
May 16 12:30:00 mojhost named[17750]: zone 127.in-addr.arpa/IN: loaded serial 1
May 16 12:30:00 mojhost named[17750]: zone 255.in-addr.arpa/IN: loaded serial 1
May 16 12:30:00 mojhost named[17750]: zone localhost/IN: loaded serial 2
May 16 12:30:00 mojhost named[17750]: zone mojadomena.kom/IN: loaded serial 2011051602
May 16 12:30:00 mojhost named[17750]: managed-keys-zone ./IN: loading from master file managed-keys.bind failed: file not found
May 16 12:30:00 mojhost named[17750]: managed-keys-zone ./IN: loaded serial 0
May 16 12:30:00 mojhost named[17750]: zone mojadomena.kom/IN: sending notifies (serial 2011051602)
May 16 12:30:00 mojhost named[17750]: running
Zakładam, że to o to chodzi:
Code:
May 16 12:30:00 mojhost named[17750]: managed-keys-zone ./IN: loading from master file managed-keys.bind failed: file not found
May 16 12:30:00 mojhost named[17750]: managed-keys-zone ./IN: loaded serial 0
Tylko teraz pytanie jak się tego pozbyć.
Stworzyłem plik managed-keys.bind i obecnie mam w logach:
Code:
managed-keys-zone ./IN: loaded serial 0
Ale to nic nie zmieniło.
//pogrzebałem głębiej w ustawieniach binda, już działa jak trzeba
RE: [solved]Bind9 - działa ale nie działa - jakub.artur - 06-26-2011 04:50 PM
dodaj w bind conf listen ip twojego servera bo jest na pewno 127.0.0.1
|