View previous topic :: View next topic |
Author |
Message |
zyko l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/1291073054843240492763.jpg)
Joined: 01 Jun 2008 Posts: 620 Location: Munich, Germany
|
Posted: Sat Sep 27, 2008 5:49 pm Post subject: |
|
|
There is also http://denyhosts.sourceforge.net/
I manage to ban myself roughly once a month with denyhosts, so there are downsides ![Wink ;)](images/smiles/icon_wink.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
erik258 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/18778702754589d89edad52.gif)
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Sun Sep 28, 2008 12:35 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|
|
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
|
|