2007年11月5日 星期一

freebsd named server

以master和slave架構實作

server:

/etc/namedb/named.conf
// listen-on { 127.0.0.1; };註解掉
//hsian.org master zone
zone "hsian.org" {
  type master;
   file "master/hsian.org.master";
   allow-transfer {
    140.138.145.192;
  };
};

/etc/namedb/master/hsian.org.master
$TTL 3600 ; 1 hour
@     IN SOA dns.hsian.org. root.hsian.org. (
              2007110603 ; serial
              3600 ; refresh (1 hour)
              900 ; retry (15 minutes)
              604800 ; expire (1 week)
              3600 ; minimum (1 hour)
              )
@     IN NS dns.hsian.org.
@     IN NS dns2.hsian.org.
dns    IN A 220.133.28.104
dns2    IN A 140.138.145.192
@     IN MX 10 mail.hsian.org.

@     IN A 140.138.145.192
blog    IN A 140.138.145.192
blogimg   IN A 140.138.145.192
www    IN A 140.138.145.192
ftp     IN A 140.138.145.192
mysql    IN A 140.138.145.192
freebsd   IN A 220.133.28.104
school    IN A 140.138.145.192

http://moon.cse.yzu.edu.tw/~s932361/hsian.org.txt

/etc/rc.conf
named_enable="YES"

/etc/rc.d/named start

Client:

/etc/namedb/named.conf
// listen-on { 127.0.0.1; };註解掉
//hsian.org master zone
zone "hsian.org" {
  type slave;
   file "slave/hsian.org.slave";
   masters {
    220.133.28.104;
  };
};

/etc/rc.conf
named_enable="YES"

/etc/rc.d/named start

沒有留言: