Created
January 18, 2012 10:34
-
-
Save brokendish/1632362 to your computer and use it in GitHub Desktop.
ファイアウォール初期設定スクリプト3番目
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#-------------------------------------------------------------------- | |
#iptables-setup3 | |
# ファイアウォール初期設定スクリプト | |
# アクセス拒否IPアドレスの登録を行う | |
#---------------------------------------- | |
# 初期設定 | |
#---------------------------------------- | |
#アクセス拒否IP累積リスト | |
denyIpFile=/var/log/apache2/denyIP | |
#---------------------------------------- | |
#累積リストのIPをiptablesに登録 | |
for inIp in `cat $denyIpFile`; | |
do | |
iptables -I INPUT -s $inIp -j DROP | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment