Server can't find NXDOMAIN - dns

I'm just tring to configure a DNS server in my local
I configure the /etc/named.conf
options {
listen-on port 53 {
127.0.0.1; 192.168.220.135;
};
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query {
localhost; 192.168.220.0/24;
};
allow-transfer{
localhost; 192.168.220.136;
};
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
also-notify {
};
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "ayoub.local" IN {
type master;
file "direct.zone";
#allow-update {none;};
};
zone "220.168.192.in-addr.arpa" IN {
type master;
file "inverse.zone";
#allow-update {none;};};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
and /var/named/direct.zone
**$TTL 3H
# IN SOA MasterDNS.ayoub.local. root.ayoub.local. (
20160421 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minim
# IN NS MasterDNS.ayoub.local.
# IN NS SlaveDNS.ayoub.local.
# IN A 192.168.220.135
# IN A 192.168.220.136
# IN A 192.168.220.137
MasterDNS IN A 192.168.220.135
SlaveDNS IN A 192.168.220.136
Client IN A 192.168.220.137
and the /var/named/inverse.zone
$TTL 3H
# IN SOA MasterDNS.ayoub.local. root.ayoub.local. (
20160418 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
# IN NS MasterDNS.ayoub.local.
# IN NS SlaveDNS.ayoub.local.
# IN PTR ayoub.local.
MasterDNS IN A 192.168.220.135
SlaveDNS IN A 192.168.220.136
Client IN A 192.168.220.137
135 IN PTR MasterDNS.ayoub.local.
136 IN PTR SlaveDNS.ayoub.local.
137 IN PTR Client1.ayoub.local.
and the /etc/resolv.conf
domain ayoub.local
search ayoub.local
nameserver 127.0.0.1
nameserver 192.168.220.136
when i test the domaine with nslookup
;; Got SERVFAIL reply from 127.0.0.1, trying next server
;; connection timed out; trying next origin
;; Got SERVFAIL reply from 127.0.0.1, trying next server
;; connection timed out; no servers could be reached
and when i set /etc/resolv.conf with that
search localdomain
nameserver 192.168.220.2
i see comme result of nslookup
Server: 192.168.220.2
Address: 192.168.220.2#53
** server can't find ayoub.local: NXDOMAIN

Sometimes error happens due to nameserver 127.0.0.1
So in resolve.conf use following or any other name server you like.
Here is my resolve.conf file
nameserver 8.8.8.8
nameserver 1.1.1.1

I resolved the problem. I just forgot to change the group of direct. zone and inverse.zone from the root to named, command is :
chgroup named /var/named/direct.zone
and I force resolve to not changing by the DHCP :
chattr +i /etc/resolv.conf

Related

root nameservers doesn't return a Top-Level Domain NS record

Refer to this nslookup session:
>
> a.root-servers.net
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: a.root-servers.net
Address: 198.41.0.4
Name: a.root-servers.net
Address: 2001:503:ba3e::2:30
>
> server 198.41.0.4
Default server: 198.41.0.4
Address: 198.41.0.4#53
>
> set type=ns
> com.
;; connection timed out; no servers could be reached
This is when I tried from a linux server.
When I try from my own Windows machine:
> a.root-servers.net
Server: ip-10-220-201-1.eu-west-3.compute.internal
Address: 10.220.201.1
Non-authoritative answer:
DNS request timed out.
timeout was 2 seconds.
Name: a.root-servers.net
Address: 198.41.0.4
> server 198.41.0.4
Default Server: a.root-servers.net
Address: 198.41.0.4
> set type=ns
> com.
Server: a.root-servers.net
Address: 198.41.0.4
*** a.root-servers.net can't find com.: Non-existent domain
> com
Server: a.root-servers.net
Address: 198.41.0.4
*** a.root-servers.net can't find com: Non-existent domain
As far as I know, the root servers should be able to tell me about the Top-Level Domains, so why isn't it working?

Istio retry isn't triggered when an error occurs at transport layer

Over the last few days, I was trying to understand the Istio retry policy. Then, I found a field named "retry-on". The default value of this field is below (I use version 1.14.3 Istio).
RetryOn: "connect-failure,refused-stream,unavailable,cancelled,retriable-status-codes"
link to the source code
I want to know which case is included in "connect-failure". From the document, They explain like this.
connect-failure
Envoy will attempt a retry if a request is failed because of a connection failure to the upstream server (connect timeout, etc.). (Included in 5xx)
NOTE: A connection failure/timeout is a the TCP level, not the request level. This does not include upstream request timeouts specified via x-envoy-upstream-rq-timeout-ms or via route configuration or via virtual host retry policy.
link to doc
So, I think it will retry if any error occurs in the TCP protocol at the transport layer. I tried to prove that by creating 2 pods in the Kubernetes cluster. First is Nginx forwarding every HTTP request to the Second. The Second is the NodeJS TCP server that will break the TCP connection if you send an HTTP request with "/error" path. I show it below.
Nginx
user nginx;
error_log /var/log/nginx/error.log warn;
events {
worker_connections 65535;
use epoll;
multi_accept on;
}
http {
log_format main escape=json
'{'
'"clientIP":"$remote_addr",'
'"time-local":"$time_local",'
'"server-port":"$server_port",'
'"message":"$request",'
'"statusCode":"$status",'
'"dataLength":"$body_bytes_sent",'
'"referer":"$http_referer",'
'"userAgent":"$http_user_agent",'
'"xForwardedFor":"$http_x_forwarded_for",'
'"upstream-response-time":"$upstream_response_time",'
'"correlation-id":"$http_x_correlation_id",'
'"user-tier":"$http_x_neo_user_tier",'
'"session-id":"$http_x_session_id"'
'}';
access_log /var/log/nginx/access.log main;
client_max_body_size 100m;
client_header_timeout 5m; # default 60s
client_body_timeout 5m; # default 60s
send_timeout 5m; # default 60s
proxy_connect_timeout 5m;
proxy_send_timeout 5m;
proxy_read_timeout 5m;
server {
listen 8080;
location / {
proxy_pass http://ice-node-service.neo-platform.svc.cluster.local:8080;
}
}
}
NodeJS
var net = require('net');
var server = net.createServer();
server.listen(8080, '127.0.0.1');
server.addListener('close', () => {
console.log('close');
})
server.addListener('connection', socket => {
console.log('connect');
socket.addListener('data', data => {
try {
const [method, path] = data.toString().split("\n")[0].split(" ")
console.log(method, path);
if (path === "/error") {
socket.destroy(new Error("force error"))
} else {
socket.write(respond())
socket.end()
}
} catch (e) {
console.log(e);
}
})
})
server.addListener('error', err => {
console.log('error', err);
})
server.addListener('listening', () => {
console.log('listening');
})
function respond() {
const body = `<html><body>Hello</body></html>`
return `HTTP/1.1 200 OK
Date: ${new Date().toGMTString()}
Server: Apache
Last-Modified: Tue, 01 Dec 2009 20:18:22 GMT
ETag: "51142bc1-7449-479b075b2891b"
Accept-Ranges: bytes
Content-Length: ${body.length + 2}
Content-Type: text/html
${body}\r\n`
}
So, I tried to send a request through Nginx to the NodeJS server on "/error" path. I expected Istio would resend the request if the TCP connection is broken. But, It wasn't retried. So, I want to know why it wasn't.

DNS with BIND9 on Debian

I am trying to create my own dns using Bind9 and Debian 11
One Virtual Machine in Google Computing Engine has these configuration
Server 1 Google Cloud IP 35.206.115.212
The file /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
35.206.115.212 ns1.itinfrastructuretest.info ns1
10.128.0.2 instance-1.us-central1-a.c.dns-1902.internal instance-1 # Added by Google
169.254.169.254 metadata.google.internal # Added by Google
The file /etc/hostname
ns1
The File /etc/bind/zones/db.35.206.115
; BIND reverse data file for local loopback interface
;
$TTL 604800
# IN SOA itinfrastructuretest.info. root.itinfrastructuretest.info. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS ns1.itinfrastructuretest.info.
IN NS ns2.itinfrastructuretest.info.
1 IN PTR ns1.itinfrastructuretest.info.
2 IN PTR ns2.itinfrastructuretest.info.
3 IN PTR www.itinfrastructuretest.info.
The File /etc/bind/zones/db.itinfrastructuretest.info
$TTL 604800
# IN SOA ns1.itinfrastructuretest.info. root.itinfrastructuretest.info. (
5 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
; Name servers
itinfrastructuretest.info. IN NS ns1.itinfrastructuretest.info.
itinfrastructuretest.info. IN NS ns2.itinfrastructuretest.info.
; A records for name servers
ns1 IN A 35.206.115.212
ns2 IN A 15.236.156.144
; Other A records
# IN A 15.236.147.109
www IN A 15.236.147.109
IN TXT google-site-verification=EdC5AxyrHZ-HnRwyCgjckdIiFgFDzLniOyS2Tm6MwAk
; Mail server MX record
The File /etc/bind/named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "itinfrastructuretest.info" {
type master;
file "/etc/bind/zones/db.itinfrastructuretest.info";
allow-transfer { 15.236.156.144; };
};
zone "115.206.35.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/zones/db.35.206.115";
};
The File /etc/bind/named.conf.options
options {
directory "/var/cache/bind";
dnssec-validation auto;
listen-on-v6 { any; };
recursion no;
allow-transfer { none; };
auth-nxdomain no;
};
Server 2 Amazon Cloud IP 15.236.156.144
The Second Server on AWS
The /etc/hosts
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data
#
127.0.1.1 ip-172-31-45-28.eu-west-3.compute.internal ip-172-31-45-28 ns2 ns2
127.0.0.1 localhost
15.236.156.144 ns2.itinfrastructuretest.info ns2
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
The file /etc/hostname
ns2
The File /etc/bind/named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "itinfrastructuretest.info"{
type slave;
file "db.itinfrastructuretest.info";
masters { 35.206.115.212;};
};
zone "156.236.15.in-addr.arpa" {
type slave;
file "db.15.236.156";
masters {35.206.115.212 ;};
};
The File /etc/bind/named.conf.options
options {
directory "/var/cache/bind";
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
allow-transfer { none; };
recursion no;
};
I was following these tutorials
How To Configure Bind as an Authoritative-Only DNS Server on Ubuntu 14.04
and
BIND9ServerHowto
The uploaded image shows that nothing was transferred from the master dns to the slave dns.
enter image description here
When I run dig command in the master dns server I got this
dig 35.206.115.212 115.206.35.in-addr.arpa. AXFR
; <<>> DiG 9.11.5-P4-5.1-Debian <<>> 35.206.115.212 115.206.35.in-addr.arpa. AXFR
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 39639
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;35.206.115.212. IN A
;; AUTHORITY SECTION:
. 86385 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2020051700 1800 900 604800 86400
;; Query time: 1 msec
;; SERVER: 169.254.169.254#53(169.254.169.254)
;; WHEN: Sun May 17 09:38:42 UTC 2020
;; MSG SIZE rcvd: 118
; Transfer failed.

Issues Setting Up DNS on Linux BIND

I am actually try to setup a DNS and adding an A record for an host that is locally on the network . It looks it seems to have some issues .
[root#vxctf8500 ~]# nslookup N8500
Server: 10.209.194.15
Address: 10.209.194.15#53
Non-authoritative answer:
*** Can't find N8500: No answer
Following The Configuration Files ::
named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
listen-on port 53 { 127.0.0.1;10.209.194.15; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query {any;};
allow-recursion {any;};
recursion no;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone"vxctf8500.com" IN {
type master;
file "forward.vxctf8500.com";
allow-update { none; };
};
zone"0.209.10.in-addr.arpa" IN {
type master;
file "reverse.vxctf8500.com";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
Forward Zone ::
$TTL 1D
# IN SOA ns1.vxctf8500.com. root.vxctf8500.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
# IN NS vxctf8500.com.
# IN A 10.209.194.15
N8500 A 10.209.194.22
~
With , keeping recursion as YES, the query never completes and gives network error. However the local server resolves
[root#vxctf8500 ~]# nslookup vxctf8500.com
Server: 10.209.194.15
Address: 10.209.194.15#53
Name: vxctf8500.com
Address: 10.209.194.15
[root#vxctf8500 ~]#
Tried With Following Again ::
$TTL 1D
# IN SOA ns1.vxctf8500.com. root.vxctf8500.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS vxctf8500.com.
IN A 10.209.194.15
ns1.vxctf8500.com IN A 10.209.194.15
N8500 IN A 10.209.194.22
[root#vxctf8500 ~]# nslookup N8500
Server: 10.209.194.15
Address: 10.209.194.15#53
Non-authoritative answer:
*** Can't find N8500: No answer
[root#vxctf8500 ~]#
Have also restart the named services.
Any Clues on Setting up Reverse Lookup ::
$TTL 1D
# IN SOA ns1.vxctf8500.com. root.vxctf8500.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS #
A 127.0.0.1
AAAA ::1
IN NS 10.209.194.15.
22 IN PTR nclusters.vxctf8500.com
23 IN PTR nclusters.vxctf8500.com
24 IN PTR nclusters.vxctf8500.com
25 IN PTR nclusters.vxctf8500.com
26 IN PTR nclusters.vxctf8500.com
in forward zone
you need to write
(fully qualified domain ) IN A (ip address of domain)
================================================
IN SOA
ns1.vxctf8500.com. root.vxctf8500.com.
(
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS vxctf8500.com.
IN A 10.209.194.15
ns1.vxctf8500.com. IN A 10.209.194.15
N8500. IN A 10.209.194.22
:wq! save it

DNS debian SERVFAIL server can't find, no ping [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm trying create a DNS server in my environment of test, but i don't know bind. The settings from my server is created with result of search in google. The bind start without error, but don't resolve my domain. I'm trying create a domain: lunarinterativa.labs to use in my solutions.
i receive this error:
server can't find www.lunarinterativa.labs.lunarinterativa.labs: SERVFAIL
when i execute the command below:
nslookup
> server interativa32
Default server: interativa32
Address: 172.224.116.100#53
> www.lunarinterativa.labs
Server: interativa32
Address: 172.224.116.100#53
My internal netwotk settings is:
ip address: 172.224.116.100
netmask: 255.255.255.0
gateway: 172.224.116.254
I ping to interativa32.lunarinterativa.labs: is OK
PING interativa32.lunarinterativa.labs (172.224.116.100) 56(84) bytes of data.64 bytes from interativa32.lunarinterativa.labs (172.224.116.100): icmp_req=1 ttl=64 time=0.049 ms
I ping to www.interativa32.lunarinterativa.labs: is Wrong
ping: unknown host www.interativa32.lunarinterativa.labs
This is the content of file of settings from my domain (file: /etc/bind/db.lunarinterativa.labs) :
; -------------------------------------------------------------------
; Created by Lunar Interativa Scripts
; type: Bind9
; author: Sileno de Oliveira Brito
; since: 09 Mar 2013
; created: 10 Mar 2013
; domain: lunarinterativa.labs
; ip address: 172.224.116.100
; hostname: interativa32
; -------------------------------------------------------------------
$TTL 604800
# IN SOA interativa32.lunarinterativa.labs. root.interativa32.lunarinterativa.labs. (
2004111700 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
# IN A 172.224.116.100
interativa32 IN A 172.224.116.100
www IN CNAME #
ftp IN CNAME #
repo IN CNAME #
ns1 IN CNAME #
This is the content of file of settings from my reverse domain (file: /etc/bind/db.lunarinterativa.labs):
; -------------------------------------------------------------------
; Created by Lunar Interativa Scripts
; type: Bind9 Reverse
; author: Sileno de Oliveira Brito
; since: 09 Mar 2013
; created: 10 Mar 2013
; domain: lunarinterativa.labs
; reverse: 116.224.172.in-addr.arpa
; ip address: 172.224.116.100
; hostname: interativa32
; -------------------------------------------------------------------
# IN SOA interativa32.lunarinterativa.labs. root.interativa32.lunarinterativa.labs. (
2004111700 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
# IN NS ns.lunarinterativa.labs.
# IN A 172.224.116.100
100 IN PTR interativa32.lunarinterativa.labs
This is the entry in /etc/bind/named.conf.local
zone "116.224.172.in-addr.arpa" {
type master;
file "/etc/bind/db.116.224.172.in-addr.arpa";
};
zone "lunarinterativa.labs" {
type master;
file "/etc/bind/db.lunarinterativa.labs";
};
This is my /etc/resolv.conf
domain lunarinterativa.labs
search lunarinterativa.labs
nameserver 127.0.0.1
This is my /etc/hosts
127.0.0.1 localhost
172.224.116.100 interativa32.lunarinterativa.labs interativa32
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
This is my /etc/bind/named.conf.options
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders {
8.8.8.8;
// 0.0.0.0;
172.224.116.254;
};
auth-nxdomain no; # conform to RFC1035
listen-on port 53 { 127.0.0.1; 172.224.116.100; };
allow-query { 127.0.0.1; 172.224.116.0/24; };
allow-recursion { 127.0.0.1; 172.224.116.0/24; };
allow-transfer { none; };
listen-on-v6 { any; };
The error is in my file of configuration i found in web a script and see my error.
This is the correct content of file of settings from my domain (file: /etc/bind/db.lunarinterativa.labs) :
; -------------------------------------------------------------------
; Created by Lunar Interativa Scripts
; type: Bind9
; author: Sileno de Oliveira Brito
; credit: OLIVEIRA , Willian:CONFIGURAÃO APACHE E DNS (BIND). Viva o Linux, Disponíl em: http://www.vivaolinux.com.br/script/Configuracao-Apache-e-DNS-(bind), Acesso em 10/03/2012 à20h 00min
; since: 09 Mar 2013
; created: 10 Mar 2013
; domain: labs.lunarinterativa
; ip address: 172.224.116.100
; hostname: interativa32
; -------------------------------------------------------------------
$TTL 604800
# IN SOA labs.lunarinterativa. root.labs.lunarinterativa. (
2004111700 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
# IN NS labs.lunarinterativa.
# IN A 172.224.116.100
interativa32 IN A 172.224.116.100
www IN CNAME interativa32.labs.lunarinterativa.
ftp IN CNAME interativa32.labs.lunarinterativa.
repo IN CNAME interativa32.labs.lunarinterativa.
ns1 IN CNAME interativa32.labs.lunarinterativa.
This is the correct content of file of settings from my reverse domain (file: /etc/bind/db.lunarinterativa.labs):
; -------------------------------------------------------------------
; Created by Lunar Interativa Scripts
; type: Bind9 Reverse
; author: Sileno de Oliveira Brito
; since: 09 Mar 2013
; created: 10 Mar 2013
; domain: labs.lunarinterativa
; reverse: 116.224.172.in-addr.arpa
; ip address: 172.224.116.100
; hostname: interativa32
; -------------------------------------------------------------------
# IN SOA labs.lunarinterativa. root.labs.lunarinterativa. (
2004111700 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
# IN NS labs.lunarinterativa.
# IN A 172.224.116.100
100 IN PTR interativa32.labs.lunarinterativa.
Responses:
nslookup to domain
nslookup www.labs.lunarinterativa
Server: 172.224.116.100
Address: 172.224.116.100#53
nslookup to ip reverse:
nslookup 172.224.116.100
Server: 172.224.116.100
Address: 172.224.116.100#53
100.116.224.172.in-addr.arpa name = interativa32.labs.lunarinterativa.
Now the ping is ok.
To me understand the problem i used the script from Wiliam Oliveira available in http://www.vivaolinux.com.br/script/Configuracao-Apache-e-DNS-(bind)
one special thanks to he. Your scripts not have error in my enviroment.

Resources