| >> HOME >> FC5 MENU >> DNSサーバー (bind) |
 |
|
|
|
|
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# yum -y install bind
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
core [1/3]
core 100% |=========================| 1.1 kB 00:00
updates [2/3]
updates 100% |=========================| 951 B 00:00
extras [3/3]
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
[root@linux ~]# yum -y install caching-nameserver
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
core [1/3]
updates [2/3]
extras [3/3]
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for caching-nameserver to pack into transaction set.
caching-nameserver-7.3-5. 100% |=========================| 7.4 kB 00:00
---> Package caching-nameserver.noarch 0:7.3-5.FC5 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
caching-nameserver noarch 7.3-5.FC5 core 23 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 23 k
Downloading Packages:
(1/1): caching-nameserver 100% |=========================| 23 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: caching-nameserver [1/2]
warning: /etc/named.conf created as /etc/named.conf.rpmnew
Installing: caching-nameserver ######################### [1/2]
Removing : bind-config ######################### [2/2]
Installed: caching-nameserver.noarch 0:7.3-5.FC5
Complete!
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# vi /etc/named.conf
//
// named.conf for Red Hat caching-nameserver
//
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
version "unknown";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
allow-query{
127.0.0.1;
192.168.1.1/24;
};
allow-recursion{
127.0.0.1;
192.168.1.1/24;
};
allow-transfer{
127.0.0.1;
192.168.1.1/24;
};
forwarders{
192.168.1.1;
};
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
logging {
category lame-servers { null; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none };
};
zone "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.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
include "/etc/rndc.key";
zone "mountainbigroad.jp" IN {
type master;
file "mountainbigroad.jp.db";
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.in-addr.arpa.db";
};
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# vi /var/named/mountainbigroad.jp.db
$TTL 86400
@ IN SOA mountainbigroad.jp. root.mountainbigroad.jp.(
2006070100 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS mountainbigroad.jp.
IN MX 10 mountainbigroad.jp.
IN A 192.168.1.11
www IN CNAME mountainbigroad.jp.
|
|
|
| |
|
|
| |
|
|
| |
[root@linux ~]# vi /var/named/1.168.192.in-addr.arpa.db
$TTL 86400
@ IN SOA mountainbigroad.jp. root.mountainbigroad.jp.(
2006070100 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS mountainbigroad.jp.
IN MX 10 mountainbigroad.jp.
11 IN PTR mountainbigroad.jp.
|
|
|
| |
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# wget ftp://ftp.nic.ad.jp/internet/rs.internic.net/domain/named.root
--02:30:09-- ftp://ftp.nic.ad.jp/internet/rs.internic.net/domain/named.root
=> `named.root'
ftp.nic.ad.jp をDNSに問いあわせています... 202.12.30.115
ftp.nic.ad.jp|202.12.30.115|:21 に接続しています... 接続しました。
anonymous としてログインしています... ログインしました!
==> SYST ... 完了しました。 ==> PWD ... 完了しました。
==> TYPE I ... 完了しました。 ==> CWD /internet/rs.internic.net/domain ... 完了しました。
==> PASV ... 完了しました。 ==> RETR named.root ... 完了しました。
長さ: 2,517 (2.5K) (確証はありません)
100%[============================================================================>] 2,517 --.--K/s
02:30:10 (390.41 KB/s) - `named.root' を保存しました [2517]
[root@linux ~]# mv named.root /var/named/named.ca
mv: `/var/named/named.ca' を上書きしてもよろしいですか(yes/no)? y 
|
|
|
|
|
|
| |
|
|
| |
|
|
| |
[root@linux ~]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 linux.mountainbigroad.jp linux localhost.localdomain localhost
#192.168.1.3 Client1
#192.168.1.4 Client2
|
|
|
| |
|
|
| |
|
|
| |
[root@linux ~]# vi /etc/resolv.conf
nameserver 192.168.1.11
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# service named start
namedを起動中: [ OK ]
|
|
|
| |
|
|
| |
[root@linux ~]# chkconfig named on
[root@linux ~]# chkconfig --list named
named 0:off 1:off 2:on 3:on 4:on 5:on 6:off
|
|
|
|
|
|
| |
|
|
| |
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\> nslookup
Default Server: mountainbigroad.jp
Address: 192.168.1.11
> mountainbigroad.jp
Server: mountainbigroad.jp
Address: 192.168.1.11
Name: mountainbigroad.jp
Address: 192.168.1.11
> 192.168.1.11
Server: mountainbigroad.jp
Address: 192.168.1.11
Name: mountainbigroad.jp
Address: 192.168.1.11
> www.mountainbigroad.jp
Server: mountainbigroad.jp
Address: 192.168.1.11
Name: mountainbigroad.jp
Address: 192.168.1.11
Aliases: www.mountainbigroad.jp
> set type=mx
> mountainbigroad.jp
Server: mountainbigroad.jp
Address: 192.168.1.11
mountainbigroad.jp MX preference = 10, mail exchanger = mountainbigroad.jp
mountainbigroad.jp nameserver = mountainbigroad.jp
mountainbigroad.jp internet address = 192.168.1.11
> exit
C:\>
|
|
|
 |
|
 |
 |