LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-11-2011, 07:42 AM   #1
Bono
LQ Newbie
 
Registered: Dec 2008
Location: Croatia
Distribution: Debian Squeeze, Redhat 5
Posts: 24

Rep: Reputation: 0
Fail2ban fresh install doesn't work


Hello, I installed on debian fresh version of fail2ban and it seems it doesn't work.

Debian 6.0
fail2ban version: 0.8.4-3

When I try to start fail2ban I get this error msg:

Code:
2011-12-11 14:33:40,692 fail2ban.server : INFO   Changed logging target to /var/log/fail2ban.log for Fail2ban v0.8.4-SVN
2011-12-11 14:33:40,693 fail2ban.jail   : INFO   Creating new jail 'ssh'
2011-12-11 14:33:40,694 fail2ban.jail   : INFO   Jail 'ssh' uses poller
2011-12-11 14:33:40,712 fail2ban.filter : INFO   Added logfile = /var/log/auth.log
2011-12-11 14:33:40,713 fail2ban.filter : INFO   Set maxRetry = 6
2011-12-11 14:33:40,715 fail2ban.filter : INFO   Set findtime = 600
2011-12-11 14:33:40,716 fail2ban.actions: INFO   Set banTime = 600
2011-12-11 14:33:40,783 fail2ban.jail   : INFO   Jail 'ssh' started
2011-12-11 14:33:40,817 fail2ban.actions.action: ERROR  iptables -N fail2ban-ssh
iptables -A fail2ban-ssh -j RETURN
iptables -I INPUT -p tcp -m multiport --dports ssh -j fail2ban-ssh returned 100
So if fail2ban managed to catch bad IP it cannot pass it to IPTABLES.

I have tried this solutions:
http://oschgan.com/drupal/index.php?q=node/52
If I add this line fail2ban doesn't want to start.
http://www.fail2ban.org/wiki/index.p...Misc_Questions
It says add this to your startup script: PATH=$PATH:/sbin

And in startup script I already have path sbin
PATH=/usr/sbin:/usr/bin:/sbin:/bin
 
Old 12-11-2011, 07:46 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Where is iptables located?
Is it in your PATH?
Code:
whereis iptables

Kind regards
 
Old 12-11-2011, 07:48 AM   #3
Bono
LQ Newbie
 
Registered: Dec 2008
Location: Croatia
Distribution: Debian Squeeze, Redhat 5
Posts: 24

Original Poster
Rep: Reputation: 0
whereis iptables
iptables: /sbin/iptables /usr/share/iptables /usr/share/man/man8/iptables.8.gz

iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N fail2ban-ssh
-A fail2ban-ssh -j RETURN
 
Old 12-11-2011, 08:05 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Are you starting fail2ban as root?

Kind regards
 
Old 12-11-2011, 08:06 AM   #5
Bono
LQ Newbie
 
Registered: Dec 2008
Location: Croatia
Distribution: Debian Squeeze, Redhat 5
Posts: 24

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
Are you starting fail2ban as root?

Kind regards
root 22272 0.0 0.5 25128 4612 ? Sl 15:04 0:00 /usr/bin/python /usr/bin/fail2ban-server -b -s /var/run/fail2ban/fail2ban.sock


I found solution, last answer in this url:
http://unix.stackexchange.com/questi...moved-ssh-port

I didn't move sshd from default port but that fixed my error.

Last edited by Bono; 12-11-2011 at 08:08 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Why doesm my Fail2Ban work? baldur2630 Linux - Security 22 05-23-2011 07:40 AM
Fluxbox - Fresh Install - Double Click *Doesn't* Shade Windows mrclisdue Linux - Desktop 4 08-23-2008 04:37 AM
Can't get sound to work on fresh install. I have tried just about everything. dreamscaper Ubuntu 9 08-05-2008 01:49 PM
Cable Internet won't work with Suse 9.1 Personal Fresh Install RazielX SUSE / openSUSE 6 01-23-2005 12:57 AM
dvd and eth0 doesnt work on fresh install mdk 10.1 triaydev Mandriva 15 12-09-2004 06:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration