[vine-users:080845] Re: <ご教授願い>Vine5.2へのsnortの導入手法

Hajime Satono hsatono @ iodata.jp
2011年 2月 22日 (火) 00:02:35 JST


岸様。

里野@金沢です

On 2011/02/21 11:15,, swing4jazzy @ gmail.com-san wrote:
> おめでとうございます(^^)。

ありがとうございます_(_ _)_


>> ところでこれでsnortの導入は完了したと考えて良いのでしょうか?
> まあ考え方にもよるのですが、ようやくスタートラインに立ったというところで
> はないでしょうか。これからは各自の環境下でのセッティングになっていくと思
> います。私も必要なもの必要でないもの等の切り分けをこれから行っていきたい
> と思っています。
> (例えば /etc/snort/snort.conf の preprocessor.rules 等)

とりあえず、snortのお勉強をすべくamazonでIDSの書籍を買ってみました。
何か新しい情報等、おつかみになった際には是非ご指導下さいませ。


>> ちなみにsnortは当たり前ですが、性悪説ベースでルール更新していると
>> 思っておるのですが、portや一部のネットワークグループの為に
>> 穴を開ける手法はご存じでしょうか?
> これを含め私もそんなに詳しい訳ではないので、ここでの解答は留保させていた
> だきます。とりあえず snort が動く環境が出来上がった訳ですから、少しづつ
> 進めていってはどうでしょうか。では。

了解いたしました。
といいつつ、本日外部から確認してみたら、
port10000とかアクセスできる状況でした(謎)
先日までと挙動が違ってきており困惑してます。。

さらに、

/var/log/apache2/error_log

に・・・

[Sun Feb 20 22:03:03 2011] [error] [client 192.168.0.(client)] PHP
Warning:  date(): It is not safe to rely on the system's timezone
settings. You are *required* to use the date.timezone setting or the
date_default_timezone_set() function. In case you used any of those
methods and you are still getting this warning, you most likely
misspelled the timezone identifier. We selected 'Asia/Tokyo' for
'JST/9.0/no DST' instead in /home/httpd/html/base/base_main.php on line
xxx, referer: http://www.hogehoge.com/base/admin/index.php

(xxxは138〜271ぐらいまで)

・・・という大量のエラーログが残る為、

/etc/php5/php.iniで

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;


[Date]

; Defines the default timezone used by the date functions

; http://php.net/date.timezone
;date.timezone =


これをこちら・・・

http://cakephp.jp/modules/newbb/viewtopic.php?topic_id=1400&forum=5
http://www.res-system.com/weblog/item/563

・・・を参考にさせていただき、

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;


[Date]

; Defines the default timezone used by the date functions

; http://php.net/date.timezone
;date.timezone =
date.timezone = Asia/Tokyo


と「date.timezone = Asia/Tokyo」の1行を追加しました。
これでtimezone系のエラーは無くなったようなんですが、


他にも
/var/log/apache2/error_log
に

[Mon Feb 21 22:25:26 2011] [error] [client 192.168.0.(client)] PHP
Warning:  include_once(Mail.php): failed to open stream: No such file or
directory in /home/httpd/html/base/includes/base_action.inc.php on line 29

[Mon Feb 21 22:25:26 2011] [error] [client 192.168.0.(client)] PHP
Warning:  include_once(): Failed opening 'Mail.php' for inclusion
(include_path='.:/usr/share/php5-pear') in
/home/httpd/html/base/includes/base_action.inc.php on line 29

[Mon Feb 21 22:25:26 2011] [error] [client 192.168.0.(client)] PHP
Warning:  include_once(Mail/mime.php): failed to open stream: No such
file or directory in /home/httpd/html/base/includes/base_action.inc.php
on line 30

[Mon Feb 21 22:25:26 2011] [error] [client 192.168.0.(client)] PHP
Warning:  include_once(): Failed opening 'Mail/mime.php' for inclusion
(include_path='.:/usr/share/php5-pear') in
/home/httpd/html/base/includes/base_action.inc.php on line 30

というエラーが残っていた為、こちら

http://fiasco.ddo.jp/cgi-bin/mt/mt-search.cgi?IncludeBlogs=1&search=PHP

を参考に調べてみると・・・

# pear list

Installed packages, channel pear.php.net:
=========================================
Package          Version State
Archive_Tar      1.3.7   stable
Console_Getopt   1.2.3   stable
Image_Canvas     0.3.3   alpha
Image_Color      1.0.4   stable
Image_Graph      0.8.0   alpha
Math_BigInteger  1.0.0   stable
Numbers_Roman    1.0.2   stable
Numbers_Words    0.16.2  beta
PEAR             1.9.1   stable
Structures_Graph 1.0.3   stable
XML_Util         1.2.1   stable

・・・Mail関係の方々がいらっしゃらない(^^;)

ので

#pear install Mail
Did not download optional dependencies: pear/Net_SMTP, use --alldeps to
download automatically
pear/Mail can optionally use package "pear/Net_SMTP" (version >= 1.4.1)
downloading Mail-1.2.0.tgz ...
Starting to download Mail-1.2.0.tgz (23,214 bytes)
........done: 23,214 bytes
install ok: channel://pear.php.net/Mail-1.2.0

# pear install Mail_Mime
downloading Mail_Mime-1.8.1.tgz ...
Starting to download Mail_Mime-1.8.1.tgz (31,530 bytes)
.........done: 31,530 bytes
install ok: channel://pear.php.net/Mail_Mime-1.8.1

# pear install Mail_MimeDecode
downloading Mail_mimeDecode-1.5.5.tgz ...
Starting to download Mail_mimeDecode-1.5.5.tgz (11,554 bytes)
.....done: 11,554 bytes
install ok: channel://pear.php.net/Mail_mimeDecode-1.5.5

# pear list

Installed packages, channel pear.php.net:
=========================================
Package          Version State
Archive_Tar      1.3.7   stable
Console_Getopt   1.2.3   stable
Image_Canvas     0.3.3   alpha
Image_Color      1.0.4   stable
Image_Graph      0.8.0   alpha
Mail             1.2.0   stable
Mail_Mime        1.8.1   stable
Mail_mimeDecode  1.5.5   stable
Math_BigInteger  1.0.0   stable
Numbers_Roman    1.0.2   stable
Numbers_Words    0.16.2  beta
PEAR             1.9.1   stable
Structures_Graph 1.0.3   stable
XML_Util         1.2.1   stable

で「Mail」と「Mail_Mime」と「Mail_mimeDecode」を確保。


/home/httpd/html/base/includes/base_action.inc.php

の

;include_once("Mail.php"); // r.rioux added for PEAR::Mail

;include_once("Mail/mime.php"); //r.rioux added for PEAR::Mail attachments

を

include_once("/usr/share/php5-pear/MailMail.php"); // r.rioux added for
PEAR::Mail

include_once("/usr/share/php5-pear/mime.php"); //r.rioux added for
PEAR::Mail attachments


に書き換えてみました。すると・・・


[Mon Feb 21 23:45:14 2011] [notice] child pid 10342 exit signal
Segmentation fault (11)

[Mon Feb 21 23:45:39 2011] [error] [client 192.168.0.(client)] PHP Parse
error:  syntax error, unexpected T_STRING in
/home/httpd/html/base/includes/base_action.inc.php on line 34

とかと言われる始末。。

ついには何かの修正を間違えたのか、http://hogehoge.com/base/

で何も出なくなりました。

先は長そうです(泣)


	By Hajime-Satono / hsatono @ iodata.jp




vine-users メーリングリストの案内