ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: Timur Batyrshin <batyrshin@ieml.ru>
To: sysadmins@lists.altlinux.org
Subject: Re: [Sysadmins] I: sshutout
Date: Mon, 7 Jul 2008 14:48:01 +0400
Message-ID: <20080707144801.20a979eb@batyrshin.ieml.ru> (raw)
In-Reply-To: <200807070939.12816.a_s_y@sama.ru>

[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]

On Mon, 7 Jul 2008 09:39:12 +0500
Sergey wrote:

> > > меня вполне спасает iptables. Вроде бы никто не возвращается,
> > > наткнувшись на минутную блокировку по recent. Я уже писал
> > > вроде... И в настройки по-умолчанию предлагал добавить...
> > 
> > Э... а можешь форварднуть?
> 
> Примерно вот так:
> 
> -A INPUT -p tcp -m tcp --dport 22 --tcp-flags FIN,SYN,RST,ACK SYN -m
> recent --set --name ssh_rate_limit --rsource -A INPUT -p tcp -m tcp
> --dport 22 --tcp-flags FIN,SYN,RST,ACK SYN -m recent --update
> --seconds 60 --hitcount 4 --name ssh_rate_limit --rsource -j LOG -A
> INPUT -p tcp -m tcp --dport 22 --tcp-flags FIN,SYN,RST,ACK SYN -m
> recent --update --seconds 60 --hitcount 4 --name ssh_rate_limit
> --rsource -j DROP
> 

Здесь бы, кстати, еще принудительно интерфейс указывать, т.к. на veth
есть вполне реальная возможность не попасть на ssh вообще, когда
статистика об одном и тот же пакет будет складываться в очередь
несколько раз -- по разу на каждый из виртуальных интерфейсов.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-07-07 10:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-05 20:39 ` Michael Shigorin
2008-07-06 13:23   ` Sergey
2008-07-06 21:00     ` Michael Shigorin
2008-07-07  4:39       ` Sergey
2008-07-07 10:48         ` Timur Batyrshin [this message]
2008-07-07 17:33         ` Dmitry V. Levin
2008-07-08 12:26           ` Sergey
2008-07-08 12:32             ` Dmitry V. Levin
2008-07-08 12:39               ` Sergey
2008-07-07  5:16   ` Anton Kvashin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080707144801.20a979eb@batyrshin.ieml.ru \
    --to=batyrshin@ieml.ru \
    --cc=sysadmins@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git