Ga naar inhoud


Fail2ban Probleem met IPTABLE - HULP! HULP!!


faxme

Aanbevolen berichten

Ik heb dit error uit mijn "/var/log/fail2ban.log" gelezen:

 

2011-05-18 01:07:10,766 fail2ban.actions.action: ERROR iptables -N fail2ban-cccam_signaturefailed

iptables -A fail2ban-cccam_signaturefailed -j RETURN

iptables -I INPUT -p tcp -m multiport --dports 6677 -j fail2ban-cccam_signaturefailed returned 200

 

 

Hier onder mijn JAIL.CONF:

 

# Fail2Ban configuration file.

#

# This file was composed for Debian systems from the original one

# provided now under /usr/share/doc/fail2ban/examples/jail.conf

# for additional examples.

#

# To avoid merges during upgrades DO NOT MODIFY THIS FILE

# and rather provide your changes in /etc/fail2ban/jail.local

#

# Author: Yaroslav O. Halchenko <debian@onerussian.com>

#

# $Revision: 281 $

#

 

# The DEFAULT allows a global definition of the options. They can be override

# in each jail afterwards.

 

[DEFAULT]

 

# "ignoreip" can be an IP address, a CIDR mask or a DNS host

ignoreip = 127.0.0.1 192.168.0.0/24

bantime = 600

maxretry = 3

 

# "backend" specifies the backend used to get files modification. Available

# options are "gamin", "polling" and "auto".

# yoh: For some reason Debian shipped python-gamin didn't work as expected

# This issue left ToDo, so polling is default backend for now

backend = polling

 

#

# Destination email address used solely for the interpolations in

# jail.{conf,local} configuration files.

destemail = root@localhost

 

#

# ACTIONS

#

 

# Default banning action (e.g. iptables, iptables-new,

# iptables-multiport, shorewall, etc) It is used to define

# action_* variables. Can be overriden globally or per

# section within jail.local file

banaction = iptables-multiport

 

# email action. Since 0.8.1 upstream fail2ban uses sendmail

# MTA for the mailing. Change mta configuration parameter to mail

# if you want to revert to conventional 'mail'.

mta = sendmail

 

# Default protocol

protocol = tcp

 

#

# Action shortcuts. To be used to define action parameter

 

# The simplest action to take: ban only

action_ = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s]

 

# ban & send an e-mail with whois report to the destemail.

action_mw = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s]

%(mta)s-whois[name=%(__name__)s, dest="%(destemail)s", protocol="%(protocol)s]

 

# ban & send an e-mail with whois report and relevant log lines

# to the destemail.

action_mwl = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s]

%(mta)s-whois-lines[name=%(__name__)s, dest="%(destemail)s", logpath=%(logpath)s]

 

# Choose default action. To change, just override value of 'action' with the

# interpolation to the chosen action shortcut (e.g. action_mw, action_mwl, etc) in jail.local

# globally (section [DEFAULT]) or per specific section

action = %(action_)s

 

#

# JAILS

#

 

# Next jails corresponds to the standard configuration in Fail2ban 0.6 which

# was shipped in Debian. Enable any defined here jail by including

#

# [sECTION_NAME]

# enabled = true

 

#

# in /etc/fail2ban/jail.local.

#

# Optionally you may override any other parameter (e.g. banaction,

# action, port, logpath, etc) in that section within jail.local

 

[cccam_signaturefailed]

enabled = true

port = 6677

filter = cccam-signature

logpath = /var/log/syslog

bantime = 6000

maxretry = 20

 

[ssh]

 

enabled = true

port = ssh

filter = sshd

logpath = /var/log/auth.log

maxretry = 6

 

Work is work if you're paid to do it. It's a HOBBY if you've to pay to be allowed to do it.

 

2X Amiko 8900HD SPARK(Schiterrend!!!). T90 in aankoop......

Link naar reactie
Delen op andere sites


Wanneer gebeuren deze errors, wat wil je ? Een google op fail2ban cccam levert mij allemaal voorbeelden op, kijk daar eens naar !

Mythbuntu 12.04

Celeron 220 op Mini-ITX D201GLY2, 1 GB Ram,2x1,5 TB HDD, Digitenne op TerraTec Cinergy, CCcam

Link naar reactie
Delen op andere sites

Inderdaad, er is geen specifieke aantwoord op mijn vraag door te GOOGLEN:

 

Als iemand een DIREKT Handeling weet om van dit error af te komen en eventueel FAIL2BAN werkend te krijgen.

 

 

Alvast dank

Work is work if you're paid to do it. It's a HOBBY if you've to pay to be allowed to do it.

 

2X Amiko 8900HD SPARK(Schiterrend!!!). T90 in aankoop......

Link naar reactie
Delen op andere sites

  • Moderator

Ik heb wat zitten googlen, en kwam onder meer dit tegen:

 

Error messages are similar to the following:

iptables -I INPUT -p tcp -m multiport --dports smtp -j fail2ban-rulename returned 400

 

The error codes can have different values like 200, 100, 400.

It seems to be a timing error with iptables.

 

A fix can be added to the /usr/bin/fail2ban-client python application:

 

Add the line

time.sleep(0.1)

 

to the function

def __processCmd(self, cmd, showRet = True):

beautifier = Beautifier() for c in cmd:

beautifier.setInputCmd©

 

in front of the beautifier.setInputCmd© command.

 

The result will look like:

def __processCmd(self, cmd, showRet = True):

beautifier = Beautifier() for c in cmd:

time.sleep(0.1) <--- DEZE zou je moeten toevoegen

beautifier.setInputCmd©

 

Restart fail2ban and it should now work without any problem.

 

bron: http://oschgan.com/drupal/index.php?q=node/52

 

Ik ken zelf fail2ban niet, maar je zou bovenstaande eens kunnen proberen om te zien of het inderdaad een timing probleem is met het starten van fail2ban.

 

groet,

 

Wiz

VU+ Duo2  met VTi  13 VU+ Uno met VTi  9.0.2

geen Canal Digitaal meer en geen Sparql iptv meer
Triax 78, astra 1,2,3, HB

Link naar reactie
Delen op andere sites

Sorry zonder duidelijke antwoord op mijn vraag kan ik niet zoveel als ik niet weet wat je zelf al gedaan hebt.

Ik kan hier wel wat linkjes hier neer gooien maar dat blijft puur gokken. Het programma en de foutmelding is niet zo heel moeilijk om in google te gooien dat is het probleem niet.

Mythbuntu 12.04

Celeron 220 op Mini-ITX D201GLY2, 1 GB Ram,2x1,5 TB HDD, Digitenne op TerraTec Cinergy, CCcam

Link naar reactie
Delen op andere sites

Wiz,

 

Dank voor je hulp. Gedaan en ik blijf het volgende krijgen:

 

2011-05-19 23:04:47,323 fail2ban.actions.action: ERROR iptables -N fail2ban-cccam_signaturefailed

iptables -A fail2ban-cccam_signaturefailed -j RETURN

iptables -I INPUT -p tcp -m multiport --dports 6677 -j fail2ban-cccam_signaturefailed returned 200

Ter volledigheid:

"cccam_signaturefailed" is mijn filter_d conf naam

 

 

 

Alvast dank

 

 

 

Origineel bericht van: wiz
Ik heb wat zitten googlen, en kwam onder meer dit tegen:

 

Error messages are similar to the following:

iptables -I INPUT -p tcp -m multiport --dports smtp -j fail2ban-rulename returned 400

 

The error codes can have different values like 200, 100, 400.

It seems to be a timing error with iptables.

 

A fix can be added to the /usr/bin/fail2ban-client python application:

 

Add the line

time.sleep(0.1)

 

to the function

def __processCmd(self, cmd, showRet = True):

beautifier = Beautifier() for c in cmd:

beautifier.setInputCmd©

 

in front of the beautifier.setInputCmd© command.

 

The result will look like:

def __processCmd(self, cmd, showRet = True):

beautifier = Beautifier() for c in cmd:

time.sleep(0.1) <--- DEZE zou je moeten toevoegen

beautifier.setInputCmd©

 

Restart fail2ban and it should now work without any problem.

 

bron: http://oschgan.com/drupal/index.php?q=node/52

 

Ik ken zelf fail2ban niet, maar je zou bovenstaande eens kunnen proberen om te zien of het inderdaad een timing probleem is met het starten van fail2ban.

 

groet,

 

Wiz

Work is work if you're paid to do it. It's a HOBBY if you've to pay to be allowed to do it.

 

2X Amiko 8900HD SPARK(Schiterrend!!!). T90 in aankoop......

Link naar reactie
Delen op andere sites

Dit wordt debuggen dus begin zo simpel mogelijk en bouw het uit. Regel voor regel handmatig invoeren in de shell en kijk of het fouten oplevert.

Mythbuntu 12.04

Celeron 220 op Mini-ITX D201GLY2, 1 GB Ram,2x1,5 TB HDD, Digitenne op TerraTec Cinergy, CCcam

Link naar reactie
Delen op andere sites

No offence maar waarom zou je fail2ban gebruiken?

 

$IPT -A tcp_inbound -p TCP -s IPADRES1-OF-DNS1 --destination-port 6677 -j ACCEPT

$IPT -A tcp_inbound -p TCP -s IPADRES2-OF-DNS2 --destination-port 6677 -j ACCEPT

 

etc.

 

zet een "service iptables restart" in cron en laat hem ieder uur uitvoeren, dan worden de IP's van de dnssen ook geupdate mocht een client IP veranderen.

 

Voeg gewoon de IP's of dnssen toe en mocht er 1 geblokkeerd moeten worden dan # je hem gewoon uit.

 

 

 

CDS: Wij bieden goede beeldkwaliteit, dat u geen goed beeld heeft ligt niet aan onze bandbreedte.

Link naar reactie
Delen op andere sites

Maak een account aan of log in om te reageren

Je moet een lid zijn om een reactie te kunnen achterlaten

Account aanmaken

Registreer voor een nieuwe account in onze community. Het is erg gemakkelijk!

Registreer een nieuwe account

Inloggen

Heb je reeds een account? Log hier in.

Nu inloggen
  • Wie is er online   0 leden

    • Er zijn geen geregistreerde gebruikers deze pagina aan het bekijken
×
×
  • Nieuwe aanmaken...