Created
July 7, 2012 08:14
-
-
Save brokendish/3065389 to your computer and use it in GitHub Desktop.
ファイアウォール初期設定スクリプト。アクセス拒否IPアドレスの登録を行う
This file contains hidden or 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 | |
#---------------------------------------- | |
#アクセス拒否累積リストからiptablesに登録 | |
for inIp in `$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