Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Stopping bruteforcing
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
zyko
l33t
l33t


Joined: 01 Jun 2008
Posts: 620
Location: Munich, Germany

PostPosted: Sat Sep 27, 2008 5:49 pm    Post subject: Reply with quote

There is also http://denyhosts.sourceforge.net/

I manage to ban myself roughly once a month with denyhosts, so there are downsides ;)
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Sun Sep 28, 2008 12:35 am    Post subject: Reply with quote

fisk wrote:
Hmm... can't I instead do something like this:

(I don't really know bash_scripts, I just took a few lines out of a firewall_script I run)

I take the ip.blacklist generated by ie. awk from the /var/log/messages and somehow:

Code:

BAD_IP="/etc/ip.blacklist"

for NET in $BAD_IP
  do
  if [ $LOG != "no" ]
          then
          $IPTABLES -A INPUT -s $NET -m limit --limit $LOG -j LOG --log-level $LOGLVL
          $IPTABLES -A FORWARD -s $NET -m limit --limit $LOG -j LOG --log-level $LOGLVL
  fi
  $IPTABLES -A INPUT -s $NET -j $DROP
  $IPTABLES -A FORWARD -s $NET -j $DROP


Would this be simpler?


Fail2ban fleshes out this approach further by adding an iptables table for counting connections and banning hosts in realtime. It's a good system, I recommend you look into it.

Quote:
- I have taken the smart route and disabled logins for all but a single non-root user, who has a strong password.


and if you should have more than one user?
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum