Jump to content
Sign in to follow this  
remonik

iptables скрипт "blacklist"

Recommended Posts

Добрый день

Помогите уважаемые гуру башскиптинга и иптаблеса

есть скрипт который стоит в автозагрузке вот он

#!/bin/sh

BLACKLIST=/etc/blackspisok.txt

for x in `grep -v ^# $BLACKLIST | awk '{print $1}'`; do

echo "Blocking IP_$x..."

#iptables -A INPUT -m state --state NEW -s $x -j DROP

iptables -A INPUT -i eth1 -p tcp -m state --state NEW -p all -s $x -m limit --limit 2/minute -j LOG --log-level debug --log-prefix "BLACKSP_"

iptables -A INPUT -i eth1 -p tcp -m state --state NEW -p all -s $x -j DROP

не происходит дропа и логирования тех айпи которые находятся в спике в чём трабл?

заранее спасибо за разьяснения

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...