Skip to content

Instantly share code, notes, and snippets.

@brokendish
Created January 18, 2012 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brokendish/1632362 to your computer and use it in GitHub Desktop.
Save brokendish/1632362 to your computer and use it in GitHub Desktop.
ファイアウォール初期設定スクリプト3番目
#!/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