JP's Room
[
トップ
|
一覧
|
単語検索
|
最終更新
|
バックアップ
|
ヘルプ
]
Misc/DDNSセットアップ
をテンプレートにして作成
開始行:
#contents
*DDNSインストール [#x515575a]
[[ISC DHCP Production Release Info:http://www.isc.org/sw/...
$ wget http://ftp.isc.org/isc/dhcp/dhcp-3.0.4.tar.gz
$ tar xzvf dhcp-3.0.4.tar.gz
$ cd dhcp-3.0.4
$ ./configure
$ make
$ su
# make install
# touch /var/state/dhcp/dhcpd.leases
*設定 [#nba7ce3a]
**/etc/dhcp.conf [#c8e17e1c]
#Sample configuration file for ISC dhcpd
#
ddns-update-style interim;
default-lease-time 600; #クライアントIPアドレスのデフォ...
max-lease-time 7200; #クライアントIPアドレスの最大リ...
log-facility local7; #ログ出力の指定
option domain-name "xx.net"; #クライアントに...
option domain-name-servers 192.168.1.10; #クライアントに...
subnet 192.168.1.0 netmask 255.255.255.0 { #DHCPを動作...
range 192.168.1.100 192.168.1.200; #クライアン...
option routers 192.168.1.1; #クライアン...
}
zone xx.net. {
primary 192.168.1.10;
}
zone 1.168.192.in-addr.arpa. {
primary 192.168.1.10;
}
**/etc/named.conf [#p0109495]
変更点のみ
// xx.net の正引きの設定(内部用ドメイン)
zone "xx.net" {
// Master DNS Serverであることを明示
// 内部から *.xx.net を引いたときにきちんと見えるよう...
type master;
// ファイル名
file "xx.net";
allow-update{ # <- DNSをUpdate可能な範囲を指定しておく
192.168.1.10;
127.0.0.1;
};
};
// 192.168.1.* の逆引きの設定
zone "1.168.192.in-addr.arpa" {
// Master DNS Serverであることを明示
type master;
// ファイル名
file "1.168.192.in-addr.arpa";
allow-update{ # <- DNSをUpdate可能な範囲を指定しておく
192.168.1.10;
127.0.0.1;
};
};
**設定ファイル権限設定 [#k8a906da]
# cd /var/named
# chown named:named *
*動作確認 [#l4b6232e]
$ nsupdate -d
> update add ryvius.xx.net. 3600 in a 192.168.1.100
> send
> update add 100.1.168.192.in-addr.arpa. 3600 in ptr ryv...
> send
> quit
$ host ryvius.xx.net
$ host 192.168.1.100
$ nsupdate -d
> update delete ryvius.xx.net.
> send
> update delete 100.1.168.192.in-addr.arpa.
> send
> quit
$ host ryvius.xx.net
$ host 192.168.1.100
*自動起動設定 [#k65c5713]
-/etc/init.d/dhcpd
#!/bin/bash
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
[ -f /usr/sbin/dhcpd ] || exit 0
[ -r /etc/dhcpd.conf ] || exit 0
RETVAL=0
prog="dhcpd"
start() {
# Start daemons.
echo -n $"Starting $prog: "
daemon /usr/sbin/dhcpd ${OPTIONS}
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd
echo
return $RETVAL
}
stop() {
# Stop daemons.
echo -n $"Shutting down $prog: "
# /usr/sbin/rndc stop
killproc dhcpd
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dhcpd
echo
return $RETVAL
}
restart() {
stop
sleep 2
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condrestart)
[ -f /var/lock/subsys/named ] && restart || :
;;
*)
echo "Usage: named {start|stop|restart|condre...
exit 1
esac
exit $?
# cd /etc/rc3.d
# ln -s ../init.d/dhcpd S99dhcpd
# cd /etc/rc5.d
# ln -s ../init.d/dhcpd S99dhcpd
*参考サイト [#lb9fd4d2]
-[[ISC DHCP Production Release Info:http://www.isc.org/sw...
-[[@IT:DHCPとDynamic DNSの連携システム(1/2):http://ww...
-[[ISC DHCPのインストール:http://unix-study.com/unix/inst...
-[[nsupdate command:http://wwwj2.comp.eng.himeji-tech.ac....
終了行:
#contents
*DDNSインストール [#x515575a]
[[ISC DHCP Production Release Info:http://www.isc.org/sw/...
$ wget http://ftp.isc.org/isc/dhcp/dhcp-3.0.4.tar.gz
$ tar xzvf dhcp-3.0.4.tar.gz
$ cd dhcp-3.0.4
$ ./configure
$ make
$ su
# make install
# touch /var/state/dhcp/dhcpd.leases
*設定 [#nba7ce3a]
**/etc/dhcp.conf [#c8e17e1c]
#Sample configuration file for ISC dhcpd
#
ddns-update-style interim;
default-lease-time 600; #クライアントIPアドレスのデフォ...
max-lease-time 7200; #クライアントIPアドレスの最大リ...
log-facility local7; #ログ出力の指定
option domain-name "xx.net"; #クライアントに...
option domain-name-servers 192.168.1.10; #クライアントに...
subnet 192.168.1.0 netmask 255.255.255.0 { #DHCPを動作...
range 192.168.1.100 192.168.1.200; #クライアン...
option routers 192.168.1.1; #クライアン...
}
zone xx.net. {
primary 192.168.1.10;
}
zone 1.168.192.in-addr.arpa. {
primary 192.168.1.10;
}
**/etc/named.conf [#p0109495]
変更点のみ
// xx.net の正引きの設定(内部用ドメイン)
zone "xx.net" {
// Master DNS Serverであることを明示
// 内部から *.xx.net を引いたときにきちんと見えるよう...
type master;
// ファイル名
file "xx.net";
allow-update{ # <- DNSをUpdate可能な範囲を指定しておく
192.168.1.10;
127.0.0.1;
};
};
// 192.168.1.* の逆引きの設定
zone "1.168.192.in-addr.arpa" {
// Master DNS Serverであることを明示
type master;
// ファイル名
file "1.168.192.in-addr.arpa";
allow-update{ # <- DNSをUpdate可能な範囲を指定しておく
192.168.1.10;
127.0.0.1;
};
};
**設定ファイル権限設定 [#k8a906da]
# cd /var/named
# chown named:named *
*動作確認 [#l4b6232e]
$ nsupdate -d
> update add ryvius.xx.net. 3600 in a 192.168.1.100
> send
> update add 100.1.168.192.in-addr.arpa. 3600 in ptr ryv...
> send
> quit
$ host ryvius.xx.net
$ host 192.168.1.100
$ nsupdate -d
> update delete ryvius.xx.net.
> send
> update delete 100.1.168.192.in-addr.arpa.
> send
> quit
$ host ryvius.xx.net
$ host 192.168.1.100
*自動起動設定 [#k65c5713]
-/etc/init.d/dhcpd
#!/bin/bash
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
[ -f /usr/sbin/dhcpd ] || exit 0
[ -r /etc/dhcpd.conf ] || exit 0
RETVAL=0
prog="dhcpd"
start() {
# Start daemons.
echo -n $"Starting $prog: "
daemon /usr/sbin/dhcpd ${OPTIONS}
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd
echo
return $RETVAL
}
stop() {
# Stop daemons.
echo -n $"Shutting down $prog: "
# /usr/sbin/rndc stop
killproc dhcpd
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dhcpd
echo
return $RETVAL
}
restart() {
stop
sleep 2
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condrestart)
[ -f /var/lock/subsys/named ] && restart || :
;;
*)
echo "Usage: named {start|stop|restart|condre...
exit 1
esac
exit $?
# cd /etc/rc3.d
# ln -s ../init.d/dhcpd S99dhcpd
# cd /etc/rc5.d
# ln -s ../init.d/dhcpd S99dhcpd
*参考サイト [#lb9fd4d2]
-[[ISC DHCP Production Release Info:http://www.isc.org/sw...
-[[@IT:DHCPとDynamic DNSの連携システム(1/2):http://ww...
-[[ISC DHCPのインストール:http://unix-study.com/unix/inst...
-[[nsupdate command:http://wwwj2.comp.eng.himeji-tech.ac....
ページ名:
注意)このバージョンのsafariではjavascriptがうまく動作しないので、recaptchaはページ切り替え版を利用しています。