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.
I am trying to configure Bind9 in a multihomed pc in my home
eth1 dhcp - cable modem
eth0 192.168.0.2
Another windows machine 192.168.0.3
What is the problem with DNS configuration?
***************************************************
named.conf
*************************************************************************
debian:/etc/bind/zones# cat /etc/bind/named.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
include "/etc/bind/named.conf.local";
**********************************************************************
/etc/bind/named.conf.local
********************************************************************
debian:/etc/bind/zones# cat /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 "homenet.net" {
type master;
file "/etc/bind/zones/db.homenet.net";
};
zone "0.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/db.0.168.192";
};
***************************************************************
Forward lookup -
debian:/etc/bind/zones# cat db.homenet.net
; BIND reverse data file for empty rfc1918 zone
;
; DO NOT EDIT THIS FILE - it is used for multiple zones.
; Instead, copy it, edit named.conf, and use that copy.
;
;
; DO NOT EDIT THIS FILE - it is used for multiple zones.
; Instead, copy it, edit named.conf, and use that copy.
;
$TTL 86400
@ IN SOA sun1.homenet.net.root.homenet.net. (
2009080408 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
@ IN NS sun1.homenet.net.
IN MX 10 sun1.homenet.net.
sun1 IN A 192.168.0.2
sun2 IN A 192.168.0.3
*****************************************************
Reverse lookup
***************************************************
debian:/etc/bind/zones# cat db.0.168.192
; BIND reverse data file for empty rfc1918 zone
;
; DO NOT EDIT THIS FILE - it is used for multiple zones.
; Instead, copy it, edit named.conf, and use that copy.
;
;
; DO NOT EDIT THIS FILE - it is used for multiple zones.
; Instead, copy it, edit named.conf, and use that copy.
;
$TTL 86400
@ IN SOA sun1.homenet.net.root.homenet.net. (
2009080408 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
@ IN NS sun1.homenet.net.
IN MX 10 sun1.homenet.net.
2 IN PTR sun1.homenet.net.
3 IN PTR sun2.homenet.net.
(For all files like db.0, db.127 db.local etc.. is it necessary to change all serial nos?)
Another problem
When I tried to edit the entries via sed, it corrupted
So I removed the package and also removed the /etc/bind directory.
After the new installation, there was no configuration files. How to obtain the configuration files
Though I have taken backup of the above files, I want the fresh configuration files
Every time you change a Bind file, change the serial number. Just the file you are changing, not all of them.
The widely used format is Year-Month-Day-0_to_99. YYYYMMDD##
This number can be anything you want it to be, as long as the new number is greater than the previous number. This is one of those things that you just need to know to change on your own when requesting help with Bind.
If there is a program to create new Bind files, I don't know what it is. I believe the default sample files are installed with the package.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.