忍者ブログ

◆当blogは、Linuxサーバ構築する際の実際の設定手順を個人的メモとして記載しております。LinuC試験の役に立つ情報があるかも…?

LinuC(Linux技術者認定資格)&リナックスサーバ構築設定事例

   

【スーパーサーバ】の設定メモ

[root]# vi /etc/xinetd.conf←設定ファイル
■以下のように編集↓■
defaults
{
        instances               = 60
        log_type                = FILE /var/log/service.log←ログの出力先を指定
        log_on_success          = HOST PID EXIT DURATION
        log_on_failure          = HOST ATTEMPT
        only_from               = 192.168.0.0/24 127.0.0.1←ローカル、ループバック
        no_access               = 192.168.0.1←ルータのアドレス
        cps                     = 25 30
}
includedir /etc/xinetd.d

[root]# touch /var/log/service.log←ログ用ファイル作成

[root]# chmod 0600 /etc/xinetd.conf←権限変更

[root]# ls -al /etc/xinetd.conf
ls -al /etc/xinetd.conf
-rw-------    1 root     root          386 11月 23 14:37 /etc/xinetd.conf

[root]# vi /etc/xinetd.d/telnet←telnetをxinetd経由で起動する設定
■以下の箇所をコメント化↓■
#       disable         = yes

[root]# /etc/rc.d/init.d/xinetd restart←再起動
xinetdを停止中:                                            [  OK  ]
xinetdを起動中:                                            [  OK  ]

root]# tail /var/log/messages
Nov 23 14:04:23 reverie anacron: anacron startup succeeded
Nov 23 14:04:23 reverie atd: atd startup succeeded
Nov 23 14:04:28 reverie kernel: mice: PS/2 mouse device common for all mice
Nov 23 14:27:57 reverie sshd(pam_unix)[1347]: session opened for user reverie by (uid=500)
Nov 23 14:28:01 reverie 11月 23 14:28:01 su(pam_unix)[1377]: session opened for user root by reverie(uid=500)
Nov 23 14:51:50 reverie xinetd[1056]: Exiting...
Nov 23 14:51:50 reverie 11月 23 14:51:50 xinetd: xinetd停止 succeeded
Nov 23 14:51:51 reverie xinetd[1487]: xinetd Version 2.3.11 started with libwrap loadavg options compiled in.
Nov 23 14:51:51 reverie xinetd[1487]: Started working: 3 available services
Nov 23 14:51:53 reverie xinetd: ・ 鰯ucceeded

←Windowsクライアントからtelnetでログイン

[root]# tail /var/log/service.log
10/11/23@14:54:13: START: telnet pid=1491 from=192.168.0.50
10/11/23@14:54:58: EXIT: telnet status=0 pid=1491 duration=45(sec)

[root]# ls -l /etc/vsftpd*
-rw-------    1 root     root          125  3月  1  2003 /etc/vsftpd.ftpusers←ftp禁止ユーザ一覧
-rw-------    1 root     root          361  3月  1  2003 /etc/vsftpd.user_list←vsftpd禁止ユーザ一覧
/etc/vsftpd:
合計 4
-rw-------    1 root     root         3854  3月  1  2003 vsftpd.conf

[root]# cp -p /usr/share/doc/vsftpd-1.1.3/vsftpd.xinetd /etc/xinetd.d/vsftpd←xinetd用にvsftpdをコピー

[root]# vi /etc/xinetd.d/vsftpd←vsftpdをxinetd経由で起動する設定
■以下のように編集↓■
        server_args             = /etc/vsftpd/vsftpd.conf←vsftpd設定ファイルを引数に設定
        access_times            = 00:00-23:59←接続許可時間
#       disable                 = yes
←コメントアウトで有効化

[root]# vi /etc/vsftpd/vsftpd.conf←vsftpdの設定
■以下のように編集↓■
ascii_upload_enable=YES←アップロード許可
ascii_download_enable=YES←ダウンロード許可
# listen=YES
←スタンドアロンモードを無効化

[root]# /etc/rc.d/init.d/xinetd restart←再起動
xinetdを停止中:                                            [  OK  ]
xinetdを起動中:                                            [  OK  ]

[root]# tail /var/log/messages
Nov 23 14:55:13 reverie  -- reverie[1523]: LOGIN ON pts/1 BY reverie FROM win50
Nov 23 14:56:16 reverie login(pam_unix)[1523]: session closed for user reverie
Nov 23 14:56:26 reverie login(pam_unix)[1552]: session opened for user reverie by (uid=0)
Nov 23 14:56:26 reverie  -- reverie[1552]: LOGIN ON pts/1 BY reverie FROM win50
Nov 23 14:56:32 reverie login(pam_unix)[1552]: session closed for user reverie
Nov 23 15:16:57 reverie xinetd[1487]: Exiting...
Nov 23 15:16:57 reverie 11月 23 15:16:57 xinetd: xinetd停止 succeeded
Nov 23 15:16:58 reverie xinetd[1867]: xinetd Version 2.3.11 started with libwrap loadavg options compiled in.
Nov 23 15:16:58 reverie xinetd[1867]: Started working: 4 available services
Nov 23 15:17:00 reverie xinetd: ・ 鰯ucceeded

←Windowsクライアントからftp接続

[root]# tail /var/log/service.log←xinetdのログ
10/11/23@15:20:19: START: ftp pid=1884 from=192.168.0.50
10/11/23@15:21:34: EXIT: ftp status=0 pid=1884 duration=75(sec)

[root]# tail /var/log/vsftpd.log←vsftpdのファイル転送ログ
Tue Nov 23 15:21:29 2010 1 192.168.0.50 204 /home/reverie/.bash_profile a _ o r reverie ftp 0 * c

PR

COMMENT

Name
Title
Mail(非公開)
URL
Color
Emoji Vodafone絵文字 i-mode絵文字 Ezweb絵文字
Comment
Pass   コメント編集に必要です
 管理人のみ閲覧

TRACKBACK

Trackback URL:

更新日付

03 2025/04 05
S M T W T F S
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

RECOMMEND

プロフィール

HN:
Account
HP:
性別:
非公開
職業:
--- NODATA ---
趣味:
--- NODATA ---
自己紹介:
◆当blogは、Linuxサーバ構築する際の実際の設定手順を個人的メモとして記載しております。LinuC試験の役に立つ情報があるかも…?

リンク

<<【SSH】の設定メモ  | HOME |  【SAMBA】の設定メモ>>
Copyright ©  -- LinuC(Linux技術者認定資格)&リナックスサーバ構築設定事例 --  All Rights Reserved
Design by CriCri / Photo by Melonenmann / powered by NINJA TOOLS / 忍者ブログ / [PR]