mod_spamhaus:DDoS対策SPAMHAUSの参照
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[Apache]]
*概要 [#v40bfdb6]
接続元IPアドレスをSPAMHAUSを参照することで、ブラックリス...
~
*インストール手順 [#y62ae71e]
# mod_spamhaus
# cd /usr/local/src
# wget http://downloads.sourceforge.net/project/mod-spam...
# tar xfvz mod-spamhaus-0.7.tar.gz
# cd mod-spamhaus
# which apxs2
/usr/bin/which: no apxs2 in (/usr/local/sbin:/usr/local/...
# which apxs
/usr/sbin/apxs
# vi Makefile
APXS=apxs2
>
APXS=apxs
# make
apxs -Wc, -Wc,-DDST_CLASS=3 -c src/mod_spamhaus.c
/usr/lib64/apr-1/build/libtool --silent --mode=compile g...
src/mod_spamhaus.c: In function ‘update_whitelist’:
src/mod_spamhaus.c:127: 警告: statement with no effect
src/mod_spamhaus.c:139: 警告: ignoring return value of ‘...
src/mod_spamhaus.c: In function ‘check_whitelist’:
src/mod_spamhaus.c:174: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘core’:
src/mod_spamhaus.c:249: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘white_list_conf’:
src/mod_spamhaus.c:328: 警告: statement with no effect
src/mod_spamhaus.c:339: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘dns_to_query’:
src/mod_spamhaus.c:351: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘looking_for’:
src/mod_spamhaus.c:363: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘num_cached_ip’:
src/mod_spamhaus.c:374: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘custom_err_cfg’:
src/mod_spamhaus.c:388: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘add_cache’:
src/mod_spamhaus.c:237: 警告: 制御が非 void 関数の終りに...
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc ...
write "make install" to install module
# make install
apxs -Wc, -Wc,-DDST_CLASS=3 -i -a -n spamhaus src/mod_sp...
/usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64...
/usr/lib64/apr-1/build/libtool --mode=install cp src/mod...
libtool: install: cp src/.libs/mod_spamhaus.so /usr/lib6...
libtool: install: cp src/.libs/mod_spamhaus.lai /usr/lib...
libtool: install: cp src/.libs/mod_spamhaus.a /usr/lib64...
libtool: install: chmod 644 /usr/lib64/httpd/modules/mod...
libtool: install: ranlib /usr/lib64/httpd/modules/mod_sp...
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/s...
--------------------------------------------------------...
Libraries have been installed in:
/usr/lib64/httpd/modules
If you ever happen to want to link against installed lib...
in a given directory, LIBDIR, you must either use libtoo...
specify the full pathname of the library, or use the `-L...
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment var...
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/...
See any operating system documentation about shared libr...
more information, such as the ld(1) and ld.so(8) manual ...
--------------------------------------------------------...
chmod 755 /usr/lib64/httpd/modules/mod_spamhaus.so
[activating module `spamhaus' in /etc/httpd/conf/httpd.c...
# cd /etc/httpd/conf/
# view httpd.conf
LoadModule spamhaus_module /usr/lib64/httpd/modules/m...
# cp -p hogehoge.conf hogehoge.conf.`date +%Y%m%d` <==設...
# vi hogehoge.conf <==対象の設定ファイルを参照。Virtual...
<IfModule mod_spamhaus.c>
MS_METHODS POST,PUT,OPTIONS,CONNECT
#MS_WhiteList /etc/spamhaus.wl
MS_WhiteList /etc/httpd/conf.d/spamhaus.wl
#MS_Dns local.rbldnsd.instance.of.sbl-xbl
MS_CacheSize 256
#MS_CustomError "My custom error"
</IfModule>
# service httpd configtest
# service httpd graceful
終了行:
[[Apache]]
*概要 [#v40bfdb6]
接続元IPアドレスをSPAMHAUSを参照することで、ブラックリス...
~
*インストール手順 [#y62ae71e]
# mod_spamhaus
# cd /usr/local/src
# wget http://downloads.sourceforge.net/project/mod-spam...
# tar xfvz mod-spamhaus-0.7.tar.gz
# cd mod-spamhaus
# which apxs2
/usr/bin/which: no apxs2 in (/usr/local/sbin:/usr/local/...
# which apxs
/usr/sbin/apxs
# vi Makefile
APXS=apxs2
>
APXS=apxs
# make
apxs -Wc, -Wc,-DDST_CLASS=3 -c src/mod_spamhaus.c
/usr/lib64/apr-1/build/libtool --silent --mode=compile g...
src/mod_spamhaus.c: In function ‘update_whitelist’:
src/mod_spamhaus.c:127: 警告: statement with no effect
src/mod_spamhaus.c:139: 警告: ignoring return value of ‘...
src/mod_spamhaus.c: In function ‘check_whitelist’:
src/mod_spamhaus.c:174: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘core’:
src/mod_spamhaus.c:249: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘white_list_conf’:
src/mod_spamhaus.c:328: 警告: statement with no effect
src/mod_spamhaus.c:339: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘dns_to_query’:
src/mod_spamhaus.c:351: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘looking_for’:
src/mod_spamhaus.c:363: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘num_cached_ip’:
src/mod_spamhaus.c:374: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘custom_err_cfg’:
src/mod_spamhaus.c:388: 警告: statement with no effect
src/mod_spamhaus.c: In function ‘add_cache’:
src/mod_spamhaus.c:237: 警告: 制御が非 void 関数の終りに...
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc ...
write "make install" to install module
# make install
apxs -Wc, -Wc,-DDST_CLASS=3 -i -a -n spamhaus src/mod_sp...
/usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64...
/usr/lib64/apr-1/build/libtool --mode=install cp src/mod...
libtool: install: cp src/.libs/mod_spamhaus.so /usr/lib6...
libtool: install: cp src/.libs/mod_spamhaus.lai /usr/lib...
libtool: install: cp src/.libs/mod_spamhaus.a /usr/lib64...
libtool: install: chmod 644 /usr/lib64/httpd/modules/mod...
libtool: install: ranlib /usr/lib64/httpd/modules/mod_sp...
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/s...
--------------------------------------------------------...
Libraries have been installed in:
/usr/lib64/httpd/modules
If you ever happen to want to link against installed lib...
in a given directory, LIBDIR, you must either use libtoo...
specify the full pathname of the library, or use the `-L...
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment var...
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/...
See any operating system documentation about shared libr...
more information, such as the ld(1) and ld.so(8) manual ...
--------------------------------------------------------...
chmod 755 /usr/lib64/httpd/modules/mod_spamhaus.so
[activating module `spamhaus' in /etc/httpd/conf/httpd.c...
# cd /etc/httpd/conf/
# view httpd.conf
LoadModule spamhaus_module /usr/lib64/httpd/modules/m...
# cp -p hogehoge.conf hogehoge.conf.`date +%Y%m%d` <==設...
# vi hogehoge.conf <==対象の設定ファイルを参照。Virtual...
<IfModule mod_spamhaus.c>
MS_METHODS POST,PUT,OPTIONS,CONNECT
#MS_WhiteList /etc/spamhaus.wl
MS_WhiteList /etc/httpd/conf.d/spamhaus.wl
#MS_Dns local.rbldnsd.instance.of.sbl-xbl
MS_CacheSize 256
#MS_CustomError "My custom error"
</IfModule>
# service httpd configtest
# service httpd graceful
ページ名: