新型 HS-DHGL にハックキット(11)ftp サーバ、dhcp サーバ

HS-DHGL

新型 HS-DHGL も旧形や 新型 LS-GL と同じ手順で ハックキットがインストールできるとは思うが、 念のために検証しておく。

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

ftp サーバ

inetutils-ftpd のインストール

hackkit:~# 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 1s (46.0kB/s)
Selecting previously deselected package inetutils-ftpd.
(Reading database ... 14432 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) ...
hackkit:~#

/etc/inetd.cof への追加

hackkit:~# echo "ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  ftpd" >> /etc/inetd.conf
hackkit:~# 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
hackkit:~#

inetd.conf の再読込み

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

確認

yasunari@sil:~$ ftp gin.yamasita.jp
Connected to gin.yamasita.jp.
220 hackkit FTP server (GNU inetutils 1.5) ready.
Name (gin.yamasita.jp:yasunari):
331 Password required for yasunari.
Password:
230- Linux hackkit 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> ls
200 PORT command sucessful.
150 Opening ASCII mode data connection for '/bin/ls'.
total 16
-rw------- 1 yamasita  151 Feb  3 20:43 .bash_history
-rw-r--r-- 1 yamasita  220 Jan  9 11:52 .bash_logout
-rw-r--r-- 1 yamasita  414 Jan  9 11:52 .bash_profile
-rw-r--r-- 1 yamasita 2227 Jan  9 11:52 .bashrc
226 Transfer complete.
ftp> quit
221 Goodbye.
yasunari@sil:~$

dhcp サーバ

dhcp サーバのインストール

hackkit:~# 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 3s (33.8kB/s)
Selecting previously deselected package dhcp.
(Reading database ... 14442 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.

hackkit:~#

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

dhcp サーバの停止

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

/etc/dhcpd.conf

内向きサーバの HS-DHGL から持ってくる。
hackkit:~# cd /etc/
hackkit:/etc# mv dhcpd.conf dhcpd.conf.orig
hackkit:/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' (4317 bytes).
226 Transfer complete.
4317 bytes received in 0.02 secs (250.0 kB/s)
ftp> bye
221 Goodbye.
hackkit:/etc# ls -l dhcpd.conf*
-rw-r--r-- 1 root root 4317 Feb  6 12:06 dhcpd.conf
-rw-r--r-- 1 root root 3233 Oct 27 08:58 dhcpd.conf.orig
hackkit:/etc#

/etc/default/dhcp

変更無し
hackkit:/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=""
hackkit:/etc#

dhcp サーバの起動

hackkit:/etc# /etc/init.d/dhcp start
Starting DHCP server: dhcpd.
hackkit:/etc#

確認

DHCP クライアントを起動して、ログを確認する。
hackkit:/etc# tail -f /var/log/daemon.log
	:
	:

Feb  6 12:10:03 hackkit dhcpd: DHCPDISCOVER from 08:00:46:e0:c5:0a via eth0
Feb  6 12:10:03 hackkit dhcpd: DHCPOFFER on 192.168.2.29 to 08:00:46:e0:c5:0a via eth0
Feb  6 12:10:03 hackkit dhcpd: DHCPREQUEST for 192.168.2.29 from 08:00:46:e0:c5:0a via eth0
Feb  6 12:10:03 hackkit dhcpd: DHCPACK on 192.168.2.29 to 08:00:46:e0:c5:0a via eth0

ハックキット 2.1 確認完了

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

あとはハックde録!!の確認かぁ、、、
キャプチャボックスは実運用してるしなぁ、、




HS-DH320GL
楽天市場
Yahoo!ショッピング
somap.com
TSUKUMO ネットショップ
ValuMore!
ムラウチドットコム
アット・ニフティストア icon
Joshin web icon


インターネット経由で外出先からもアクセスできるLAN接続ハードディスク
ハックの記録
LinkStation/玄箱 をハックしよう

新型 HS-DHGL でハック de 録!!(1)標準ファームのコピー

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