FreeBSD 8.0 DNS (intranet & caching) 2010

FreeBSD 8.0 DNS (intranet & caching) 2010

??????? Domain Name server ?? FreeBSD 8.0

??????????????

1. ?????????????????? Domain ??????????????????????? ?????????????????

server ???? ? ???? , ftp. ??????????

2. ??? DNS ????????????? Caching DNS ???? ?????????????? Client ??????????? LAN ????????

??? DNS ????? Server ?????? (???????????(???) dns ???????) ??????????????????????????

???????????

#cd

/etc/namedb/master

#cp

empty.db

-for.db

????????? -for.db

#ee

-for.db

$TTL 3600

@

IN

SOA

ns.. noc..(

2010031401 ;serial

3600 ;refresh

900 ;retry

3600000 ;expire

3600) ;minimum

IN

NS

ns..

IN

MX

10

ns

IN

A

192.168.119.130

www

IN

A

192.168.119.130

ftp

IN

A

192.168.119.130

mail

IN

A

192.168.119.130

#cp

-for.db

mail..

-rev.db

????????? -rev.db

?  .

Page 1

FreeBSD 8.0 DNS (intranet & caching) 2010

$TTL 3600

@

IN

SOA

ns.. noc..(

2010031401 ;serial

3600 ;refresh

900 ;retry

3600000 ;expire

3600) ;minimum

IN

NS

ns..

IN

MX

10

130

IN

PTR

ns..

130

IN

PTR

.

130

IN

PTR

ftp..

130

IN

PTR

mail..

mail..

??????? Directory ?????????? config

#cd /etc/namedb/

?????????? named.conf (???????)

#cp

named.conf

named.

????????? rndc.conf

#rndc-confgen

>

rndc.conf

?????? rndc.conf ????????????? named.conf

#cat

rndc.conf

>>

named.conf

?  .

Page 2

FreeBSD 8.0 DNS (intranet & caching) 2010

????? config

#ee

named.conf

????????? hightlight ???????? ?? hightlight ????? ???????????????????????

listen-on

{ 127.0.0.1; 192.168.119.130; };

/*

forwarders {

127.0.0.1;

8.8.8.8;

8.8.4.4;

};

*/

???????? : ip 8.8.8.8 ??? 8.8.4.4 ???? public dns ??? google ?????????????????...

????? zone ???? forward ??? reverse ???? ?????? # Start of rndc.conf

zone "" {

type master;

file "master/-for.db";

};

zone "119.168.192.in-addr.arpa" {

type master;

file "master/-rev.db";

};

?? hightlight ????? ???????????

# Start of rndc.conf

key "rndc-key" {

algorithm hmac-md5;

secret "5gwcAsd9GVe9hBpLATf06A==";

?  .

Page 3

FreeBSD 8.0 DNS (intranet & caching) 2010

};

options {

default-key "rndc-key";

default-server 127.0.0.1;

default-port 953;

};

# End of rndc.conf

# Use with the following in named.conf, adjusting the allow list as needed:

# key "rndc-key" {

#

algorithm hmac-md5;

#

secret "5gwcAsd9GVe9hBpLATf06A==";

# };

#

# controls {

#

#

inet 127.0.0.1 port 953

allow { 127.0.0.1; } keys { "rndc-key"; };

# };

# End of named.conf

?????????? named.conf

????? /etc/resolv.conf

search

nameserver 127.0.0.1

????? /etc/ rc.conf

??????????? named_enable="YES"

?  .

Page 4

FreeBSD 8.0 DNS (intranet & caching) 2010

??????? named ??????

#/etc/rc.d/named

start

?????

#nslookup

#dig



@localhost



?  .

Page 5

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download