[Samba] Samba and Bind9 was (no subject)

Hoang Quynh hoangquynh03 at gmail.com
Sun Jan 17 12:10:23 UTC 2021


Dear Rowland

I send you file config.
please check it.

Thanks and best regards

On Sat, Jan 16, 2021 at 4:12 PM Rowland penny via samba <
samba at lists.samba.org> wrote:

> On 16/01/2021 09:06, Hoang Quynh wrote:
> > Dead Rowland.
> >
> > I had disabled Selinux and start service named
> > but it can not start. IT is an error.
>
>
> Please post your named.conf file
>
> Rowland
>
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>
-------------- next part --------------

-------------------------------------------------------------
https://www.youtube.com/watch?v=B6RprjoOdk4

# yum -y install bind*

# vi /etc/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; 192.168.0.146; };
//	listen-on-v6 port 53 { ::1; any; };
	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";
	secroots-file	"/var/named/data/named.secroots";
	recursing-file	"/var/named/data/named.recursing";
	allow-query     { localhost; 192.168.0.0/16; };

	/* 
	 - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
	 - If you are building a RECURSIVE (caching) DNS server, you need to enable 
	   recursion. 
	 - If your recursive DNS server has a public IP address, you MUST enable access 
	   control to limit queries to your legitimate users. Failing to do so will
	   cause your server to become part of large scale DNS amplification 
	   attacks. Implementing BCP38 within your network would greatly
	   reduce such attack surface 
	*/
	recursion yes;

	dnssec-enable yes;
	dnssec-validation yes;

	managed-keys-directory "/var/named/dynamic";

	pid-file "/run/named/named.pid";
	session-keyfile "/run/named/session.key";

	/* https://fedoraproject.org/wiki/Changes/CryptoPolicy */
	include "/etc/crypto-policies/back-ends/bind.config";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
	type hint;
	file "named.ca";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
include "/usr/local/samba/bind-dns/named.conf";

---------------------------------------------------

# vi /etc/named.rfc1912.zones

// named.rfc1912.zones:

//

// Provided by Red Hat caching-nameserver package 

//

// ISC BIND named zone configuration for zones recommended by

// RFC 1912 section 4.1 : localhost TLDs and address zone

// and https://tools.ietf.org/html/rfc6303

// (c)2007 R W Franks

// 

// See /usr/share/doc/bind*/sample/ for example named configuration files.

//

// Note: empty-zones-enable yes; option is default.

// If private ranges should be forwarded, add 

// disable-empty-zone "."; into options

// 
zone "localhost.localdomain" IN {
	
	type master;
	
	file "named.localhost";
	
	allow-update { none; };

};

zone "localhost" IN {
	
	type master;
	
	file "named.localhost";
	
	allow-update { none; };

};

zone "zenplaza.com" IN {
	
	type master;
	
	file "zenplaza.com.db";
	
	allow-update { none; };

};

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" IN {
	
	type master;
	
	file "named.loopback";
	
	allow-update { none; };

};



zone "20.168.192.in-addr.arpa" IN {

	type master;

	file "zenplaza.com.rev";

	allow-update { none; };

};



zone "1.0.0.127.in-addr.arpa" IN {

	type master;

	file "named.loopback";

	allow-update { none; };

};



zone "0.in-addr.arpa" IN {

	type master;
	
	file "named.empty";

	allow-update { none; };

};

-------------------------------------------------------

# cp /var/named/named.localhost /var/named/zenplaza.com.db
# cp /var/named/named.loopback /var/named/zenplaza.com.rev

#vim /var/named/zenplaza.com.db

$TTL 1D
@       IN SOA  zenplaza.com. root.zenplaza.com. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
        	NS      zenplaza.com
dc      	A       192.168.20.1
zenplaza.com    A       192.168.20.1
bachlan-pc      A       192.168.0.142

---------------------------------------------------------

#vim /var/named/zenplaza.com.rev

$TTL 1D
@       IN SOA  zenplaza.com root.zenplaza.com. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
        NS      zenplaza.com.
1       PTR     dc.zenplaza.com.
1       PTR     zenplaza.com.
142     PTR     bachlan-pc.zenplaza.com.
----------------------------------------------------------

# chown root:named /var/named/zenplaza.com.db
# chown root:named /var/named/zenplaza.com.rev

---------------------------------------------------------

# /usr/sbin/named-checkconf -z /etc/named.conf

# systemctl restart named





More information about the samba mailing list