新型 LS-GL に ハックキット 2.1(8)ftp サーバ、dhcp サーバ

LS-GL

新型 LS-GL に LS-GL/HS-DHGL ハックキット 2.0 をインストールしたら、 電源ボタンで電源が落ちなかった。
原因は LS-GL が新型であることではなく、 標準ファームの変更にインストーラが追従できていなかったため。

標準ファームへの依存を減らし、 追従の必要を減らす形でハックキットを作り直したので、 インストールしてテストする。

続いて、、、
ftp サーバ dhcp サーバ

ftp サーバ

inetutils-ftpd のインストール

nino:~# apt-get install inetutils-ftpd
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  inetutils-ftpd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 91.6kB of archives.
After unpacking 193kB of additional disk space will be used.
Get:1 http://ftp2.jp.debian.org etch/main inetutils-ftpd 2:1.5.dfsg.1-2 [91.6kB]
Fetched 91.6kB in 0s (122kB/s)
Selecting previously deselected package inetutils-ftpd.
(Reading database ... 14381 files and directories currently installed.)
Unpacking inetutils-ftpd (from .../inetutils-ftpd_2%3a1.5.dfsg.1-2_arm.deb) ...
Setting up inetutils-ftpd (1.5.dfsg.1-2) ...
nino:~#

/etc/inetd.cof への追加

nino:~# echo "ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  ftpd" >> /etc/inetd.conf
nino:~# tail /etc/inetd.conf
# run this only on machines acting as "boot servers."

#:RPC: RPC based services

#:HAM-RADIO: amateur-radio services

#:OTHER: Other services
## netbios-ssn     stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/smbd

ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  ftpd
nino:~#

inetd.conf の再読込み

nino:~# kill -HUP `cat /var/run/inetd.pid `
nino:~#

確認

yasunari@sil:~$ ftp nino.yamasita.jp
Connected to nino.yamasita.jp.
220 nino FTP server (GNU inetutils 1.5) ready.
Name (nino.yamasita.jp:yasunari): yasunari
331 Password required for yasunari.
Password:
230- Linux nino 2.6.16.16-arm1 #6 Fri Oct 12 21:23:48 JST 2007 armv5tejl
230-
230- The programs included with the Debian GNU/Linux system are free software;
230- the exact distribution terms for each program are described in the
230- individual files in /usr/share/doc/*/copyright.
230-
230- Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
230- permitted by applicable law.
230 User yasunari logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quit
221 Goodbye.
yasunari@sil:~$

dhcp サーバ

dhcp サーバのインストール

nino:~# apt-get install dhcp
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  dhcp
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 114kB of archives.
After unpacking 340kB of additional disk space will be used.
Get:1 http://ftp2.jp.debian.org etch/main dhcp 2.0pl5-19.5etch2 [114kB]
Fetched 114kB in 0s (530kB/s)
Selecting previously deselected package dhcp.
(Reading database ... 14391 files and directories currently installed.)
Unpacking dhcp (from .../dhcp_2.0pl5-19.5etch2_arm.deb) ...
Setting up dhcp (2.0pl5-19.5etch2) ...
Generating /etc/default/dhcp...

Please note that if you are installing the DHCP server for the first
time you need to configure it first. Please stop (/etc/init.d/dhcp
stop) the DHCP server daemon, edit /etc/dhcpd.conf to suit your needs
and particular configuration, and restart the DHCP server daemon
(/etc/init.d/dhcp start).

You also need to edit /etc/default/dhcp to specify the interfaces dhcpd
should listen to. By default it listens to eth0.

NOTE: dhcpd's messages are being sent to syslog. Look there for
diagnostics messages.

Starting DHCP server: dhcpd failed to start - check syslog for diagnostics.

nino:~#

dhcp サーバのコンフィギュレーション

dhcp サーバの停止

nino:~# /etc/init.d/dhcp stop
Stopping DHCP server: dhcp.
nino:~#

/etc/dhcpd.conf

内向きサーバの HS-DHGL から持ってくる。
nino:~# cd /etc/
nino:/etc# mv dhcpd.conf dhcpd.conf.orig
nino:/etc# ftp sil.yamasita.jp
Connected to sil.yamasita.jp.
220 sil FTP server (GNU inetutils 1.5) ready.
Name (sil.yamasita.jp:yasunari):
331 Password required for yasunari.
Password:
230- Linux sil 2.6.16.16-arm1 #9 Wed Mar 7 14:17:36 JST 2007 armv5tejl
230-
230- The programs included with the Debian GNU/Linux system are free software;
230- the exact distribution terms for each program are described in the
230- individual files in /usr/share/doc/*/copyright.
230-
230- Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
230- permitted by applicable law.
230 User yasunari logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /etc
250 CWD command successful.
ftp> get dhcpd.conf
local: dhcpd.conf remote: dhcpd.conf
200 PORT command sucessful.
150 Opening BINARY mode data connection for 'dhcpd.conf' (4236 bytes).
226 Transfer complete.
4236 bytes received in 0.01 secs (619.5 kB/s)
ftp> bye
221 Goodbye.
nino:/etc# ls -l dhcpd.conf*
-rw-r--r-- 1 root root 4236 Jan 25 22:23 dhcpd.conf
-rw-r--r-- 1 root root 3233 Oct 27 08:58 dhcpd.conf.orig
nino:/etc#

/etc/default/dhcp

変更無し
nino:/etc# cat /etc/default/dhcp
# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/dhcp by the maintainer scripts

#
# This is a POSIX shell fragment
#

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES=""
nino:/etc#

dhcp サーバの起動

nino:/etc# /etc/init.d/dhcp start
Starting DHCP server: dhcpd.
nino:/etc# tail /var/log/daemon.log
	:
	:
Jan 25 22:20:35 nino dhcpd: No subnet declaration for eth0 (192.168.2.42).
Jan 25 22:20:35 nino dhcpd: Please write a subnet declaration in your dhcpd.conf file for the
Jan 25 22:20:35 nino dhcpd: network segment to which interface eth0 is attached.
Jan 25 22:20:35 nino dhcpd: exiting.
nino:/etc# 
一瞬どきっとするが、、、、
nino:/etc# date
Fri Jan 25 22:27:26 JST 2008
nino:/etc#
時間を見ると、今起動した dhcpd のログではなく インストール時に起動された dhcpd のログだった。

確認

DHCP クライアントを起動して、ログを確認する。
nino:/etc# tail -f /var/log/daemon.log
	:
	:
Jan 25 22:29:16 nino dhcpd: DHCPDISCOVER from 00:02:a8:0a:67:18 via eth0
Jan 25 22:29:16 nino dhcpd: DHCPOFFER on 192.168.2.50 to 00:02:a8:0a:67:18 via eth0
Jan 25 22:29:16 nino dhcpd: DHCPREQUEST for 192.168.2.50 from 00:02:a8:0a:67:18 via eth0
Jan 25 22:29:16 nino dhcpd: DHCPACK on 192.168.2.50 to 00:02:a8:0a:67:18 via eth0

ハックキット 2.1 確認完了

というわけで、新型 LS-GL で LS-GL/HS-DHGL ハックキットの全手順の確認が完了した。

あとは HS-DHGL での確認かぁ、、、



LS-160GL
楽天市場
Amazon
Yahoo!ショッピング
ソフマップ
ツクモネットショプ
livedoor デパート
ドスパラ


新型 LS-GL に ハックキット 2.1(7)開発環境のインストール
ハックの記録
LinkStation/玄箱 をハックしよう

LAN 接続ハードディスク価格改定

Copyright (C) 2003-2008 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市