Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
zone "vitronix.lan" {
type master;
file "/etc/bind/db.vitronix.lan";
};
zone "10.168.192.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.10.168.192";
};
named.conf.options:
Code:
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 {
192.168.10.1;
};
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
db.virtual.lan:
Code:
;
; ZONE file for virtual.lan
;
$TTL 604800
@ IN SOA ns.virtual.lan. root.virtual.lan. (
2014040102 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.virtual.lan.
ns IN A 192.168.10.35
www IN A 192.168.10.35
db.10.168.192:
Code:
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.virtual.lan. root.virtual.lan. (
2013041502 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.
35 IN PTR ns.
35 IN PTR www.
now when I run host -l virtual.lan I get:
Code:
virtual.lan name server ns.
ns.virtual.lan has address 192.168.10.35
www.virtual.lan has address 192.168.10.35
ar 3 03:39:55 debian named[3704]: client 192.168.10.35#39135: transfer of 'virtual.lan/IN': AXFR started
Mar 3 03:39:55 debian named[3704]: client 192.168.10.35#39135: transfer of 'virtual.lan/IN': AXFR ended
Mar 3 03:41:48 debian named[3704]: client 192.168.10.35#50712: bad zone transfer request: 'www.virtual.lan/IN': non-authoritative zone (NOTAUTH)
Mar 3 03:41:49 debian named[3704]: client 192.168.10.35#59730: bad zone transfer request: 'www.virtual.lan.virtual.lan/IN': non-authoritative zone (NOTAUTH)
I wanted to reply to my post but I made a mess of it.
Sorry for that, maybe someone can delete my own reply without the whole message as a quote.
It may be strange for a newbie like me to go and try to setup servers, but it facinates me.
What I don't understand is that my local dns sever worked fine under Ubuntu, so what's the difference with Debian.
I'm not lazy, but some hints or good links would be great.
The problem lies definitly in using the www. prefix, I think that because it's a name intended for the web it get's forwarded.
Anyway let me show the content of the configuration files I've got.
Code:
named.conf.local:
zone "virtual.lan" {
type master;
file "/etc/bind/db.virtual.lan";
};
zone "10.168.192.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.10.168.192";
};
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
Code:
db.virtual.lan:
;
; ZONE file for virtual.lan
;
$TTL 604800
@ IN SOA debian.virtual.lan. root.virtual.lan. (
2014040102 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS debian.virtual.lan.
debian IN A 192.168.10.35
Code:
db.10.168.192:
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.virtual.lan. root.virtual.lan. (
2013041502 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS virtual.
35 IN PTR debian.virtual.lan.
I can now ping debian.virtual.lan
Code:
ping debian.virtual.lan
PING debian.virtual.lan (192.168.10.35) 56(84) bytes of data.
64 bytes from debian.virtual.lan (192.168.10.35): icmp_req=1 ttl=64 time=0.055 ms
64 bytes from debian.virtual.lan (192.168.10.35): icmp_req=2 ttl=64 time=0.036 ms
64 bytes from debian.virtual.lan (192.168.10.35): icmp_req=3 ttl=64 time=0.037 ms
64 bytes from debian.virtual.lan (192.168.10.35): icmp_req=4 ttl=64 time=0.039 ms
64 bytes from debian.virtual.lan (192.168.10.35): icmp_req=5 ttl=64 time=0.058 ms
^C
--- debian.virtual.lan ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3997ms
rtt min/avg/max/mdev = 0.036/0.045/0.058/0.009 ms
The lesson learned don't use www in your local domain!
Thanks for the replies, they are much appreciated.
Last edited by vitronix; 03-07-2014 at 07:07 PM.
Reason: wrong layout
The lesson learned don't use www in your local domain!
Not at all. Add an A record for www and it will resolve.
The catch is to use the dns that is authoritative for the domain virtual.lan (that is 192.168.10.35). You should add it first in /etc/resolv.conf
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.