|
Blue Forest http://www.lslnet.com at 20:18 on April 6, 2006
[1] Implementation of the above BIND 3.5 configuration services OPENBSD Welcome posted this article, but to retain the copyright information below :
Author : llzqq
Source : www.chinaunix.net
Contact : llzqq@126.com
In recent OPENBSD configure BIND DNS caching server used for LAN access, the LAN for several analytic domain. BIND OPENBSD acquiescence installed because there is no longer installed, but I still in the process of distribution of BIND encountered a lot of problems, with the help of everyone eventually resolved. OPENBSD files on the Internet compared to other revenue OS is relatively small. So put me in the allocation process into CU offering reference.
1. Bind to create the configuration file :
# Vi /var/named/etc/named.conf
[code]
Acl "trust-lan" -- 127.0.0.1/8; 192.168.0.0/24;};
4003rd BIND basically set up (because of such acquiescence openbsd "named_chroot=/var/named" Therefore, we should pay attention here
4003rd the setup directory)
Options --
Directory "/";
Version "0.0.0";
Datasize 40M;
Allow-transfer --
"Trust-lan" ;};
Recursion yes;
Allow-notify --
"Trust-lan";
};
Listen-on) (any;
Allow-recursion --
"Trust-lan";
};
Auth-nxdomain no;
Forwarders (
202.99.160.68;
202.99.168.8;};
};
4003rd log installed BIND
Logging --
Channel warning
-- File "/log/dns_warnings" versions 3 size 1240k;
Severity warning;
Print-category yes;
Print-severity yes;
Print-time yes;
};
Channel general_dns
-- File "/log/dns_logs" versions 3 size 1240k;
Severity info;
Print-category yes;
Print-severity yes;
Print-time yes;
};
Category default) (warning;
Category queries -- general_dns;)
};
4003rd BIND root zone set up
Zone. " "--
Type hint;
File "standard/named.root";
};
4003rd Local Loop
Zone "localhost" --
Type master;
File "master/localhost";
Allow-transfer) (localhost;
};
Zone "127.in-addr.arpa" --
Type master;
File "master/loopback";
Allow-transfer) (localhost;
};
4003rd own definition of a district
Zone "home.com" --
Type slave;
File "slave/home.com";
Masters --
192.168.0.1;
};
};
Zone "0.168.192.in-addr.arpa" --
Type slave;
File "slave/0.168.192.in-addr";
Masters --
192.168.0.1;
};
};
[/code]
# Vi /var/named/slave/home.com
[code]
$TTL Anticipate
$ORIGIN Home.com.
@ IN SOA openbsd.home.com. Root.openbsd.home.com (
2001111601; serial
28800; refresh
14400; retry
3600000; expire
86400; default_ttl
)
IN NS openbsd.home.com.
-- Default; to address -
@ IN A 192.168.0.1
-- OPENBSD server -- are;
Openbsd IN A 192.168.0.1
IN MX 0 openbsd.home.com.
IN MX 10 dns.home.com.
IN HINFO "bsd 3.5."
IN TXT "The internet gateway."
------- ------- WIN2K server are;
Win2k IN A 192.168.0.10
IN MX 0 win2k.home.com.
IN MX 10 windows.home.com.
IN HINFO "Windows 2000 server."
------ ------ Cnames are;
Dns IN CNAME openbsd
Www IN CNAME openbsd
Mail IN CNAME openbsd
Ftp IN CNAME openbsd
Windows IN CNAME win2k
Win IN CNAME win2k
[/code]
# Vi /var/named/slave/0.168.192.in-addr
[code]
$TTL Anticipate
@ IN SOA openbsd.home.com. Root.openbsd.home.com. (
2001111601; Serial
28800; refresh
14400; retry
3600000; expire
86,400); minimum
@ IN NS openbsd.home.com.
1 IN PTR dns.home.com.
1 IN PTR www.home.com.
1 IN PTR mail.home.com.
1 IN PTR ftp.home.com.
10 IN PTR win2k.home.com.
10 IN PTR windows.home.com.
10 IN PTR win.home.com.
[/code]
2. Root document to the latest update :
# Cd /var/named/standard
# Wget ftp://ftp.internic.org/domain/named.root
3. BIND create log files :
# Cd /var/named
# Mkdir log
# Touch. /log/dns_warnings
# Touch. /log/dns_logs
# Chown-R named:named. /log
4. Generation rndc-key :
# Rndc-confgen "; Rndc.conf
Rndc.conf put :
# Use with the following in named.conf, adjusting the allow list as needed :
/var/named/etc/named.conf Were removed and added to the back of the Notes
5. Operation BIND test :
/usr/sbin/named -gc /etc/named.conf & #
BIND : whether to initiate inspection
# Netstat-an
6. Feeling that the system is suitable for start-up script control BIND The BIND too inconvenient to switch on their own to create a script started months BIND :
# Vi /etc/init.d/named.sh
[code]
#!/bin/bash
# Made by llzqq
# Mail:llzqq@126.com
# 02/08/ 2004
# A network name service startup scripts
Case "$ 1" in
Start)
[X] then if /usr/sbin/named
/usr/sbin/named-U-c /etc/named.conf named, named echo. Echo, named 'BIND9 server started. '
Fi
;;
Stop)
Kill `cat /var/run/named.pid`, named echo. Echo, named 'BIND9 server stopped. '
;;
Restart)
Echo.
Echo "Restart BIND9 server"
$ 0 stop
Sleep 10
$ 0 start
;;
*)
Echo "$ 0 start | stop | restart"
;;
Esac
[/code]
# 744 /etc/init.d/named.sh chomd
# Chown root:sys /etc/init.d/named.sh
Meanwhile Zhushidiao BIND system since the launch of the script :
# Vi /etc/rc
BIND find relevant and then Zhushidiao, as follows :
[code]
# $named_flags Is imported from /etc/rc.conf;
# If $named_flags> NO, named is run.
#if [ "X${named_flags}"> X "NO" then];
# If! Cmp s /etc/rndc.key /var/named/etc/rndc.key; then
# Echo-n "rndc-confgen : generating new shared secret. . . "
# If /var/named /usr/sbin/rndc-confgen-t, "then ;/dev/null 2>;&1;
# Chmod 0640 /var/named/etc/rndc.key ";/dev/null 2>;&1
# Echo done.
# Else
# Echo failed.
# Fi
# Fi
#
# Echo 'starting named'; Named $named_flags
#fi
[/code]
7. Setting up start-up BIND :
# Vi /etc/rc.local
This increase in the final line :
/etc/init.d/named.sh Start |
[1] Implementation of the above BIND 3.5 configuration services OPENBSD OPENBSD engage in the past two days, the first bit larger. |
[1] Implementation of the above BIND 3.5 configuration services OPENBSD OPENBSD because of the security, it could be considered the first erected platform.
However, the resources OPENBSD really very small. Not domestic, and even discussed bsdforum.org
OP were not many. |
[1] Implementation of the above BIND 3.5 configuration services OPENBSD OPENBSD ah done a lot of packages that meet basic needs. |
[1] Implementation of the above BIND 3.5 configuration services OPENBSD I have used OPENBSD, 02, or 3.0 server installed |
[1] Implementation of the above BIND 3.5 configuration services OPENBSD First collection |
[1] Implementation of the above BIND 3.5 configuration services OPENBSD This seems to operate with a common platform *nix no distinction should bind? Want to know? |
Op information is! ! ! |
So long before the articles also found here.
But I OPENBSD deployment in the BIND : http://www.aidns.cn application has been put into commercial operation, I read this evaluation is to test the use of other OS OPENBSD made after the decision. |
| |