ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Dmitriy Kruglikov" <dmitriy.kruglikov@gmail.com>
To: "Vitalik Salomatin" <chelroot74@mail.ru>,
	 "ALT Linux Community general discussions"
	<community@lists.altlinux.org>
Subject: Re: [Comm] Как лучше закрыть сервер снаружи
Date: Fri, 3 Oct 2008 18:22:35 +0300
Message-ID: <6c7be88d0810030822p73180ad2o38312ea6e3bc1200@mail.gmail.com> (raw)
In-Reply-To: <E1Klm3m-0001wD-00.chelroot74-mail-ru@f139.mail.ru>

3 октября 2008 г. 17:55 пользователь Vitalik Salomatin написал:
>
> Что сейчас считается надежным способом прикрыть сервер максимально?
>

Надежнее всего - не выставлять в сеть ...

К вашему способу могу добавиьт только правило по умолчанию выставить в DROP ...
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]

Разрешить исходящие чтоб сервер мог, как минимум, за DNSом сходить и
время себе обновить ...
Открыть только один порт, который нужен, и на него повесить счетчик
пакетов в минуту ...
Чтоб при превышении разумного минимума все последующие соединения с
адреса источника дропались ...
Что-то вроде такого:

-A INPUT -i inet -p tcp -m state --state NEW --dport 22 -m recent
--name sshattack --set
-A INPUT -i inet -p tcp -m state --state ESTABLISHED --tcp-flags
FIN,ACK FIN,ACK --dport 22 -m recent --name sshattack --set
-A INPUT -i inet -p tcp -m state --state ESTABLISHED --tcp-flags RST
RST --dport 22 -m recent --name sshattack --set
-A INPUT -i inet --dport 22 -m recent --name sshattack --update
--seconds 60 --hitcount 4 -m limit --limit 4/minute -j LOG
--log-prefix SSH_attack:_
-A INPUT -i inet --dport 22 -m recent --name sshattack --update
--seconds 60 --hitcount 4 -j DROP

И не забыть бы
-A INPUT -i lo -j ACCEPT
А то всякое бывает ... :)

-- 
Как правильно задавать вопросы:
http://maddog.sitengine.ru/smart-question-ru.html

Помогает:
http://search.altlinux.org

Best regards,
 Dmitriy L. Kruglikov
 Dmitriy.Kruglikov_at_gmail_dot_com
 DKR6-RIPE
 DKR6-UANIC
 XMPP: Dmitriy.Kruglikov_at_gmail_dot_com

      reply	other threads:[~2008-10-03 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-03 14:55 Vitalik Salomatin
2008-10-03 15:22 ` Dmitriy Kruglikov [this message]

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=6c7be88d0810030822p73180ad2o38312ea6e3bc1200@mail.gmail.com \
    --to=dmitriy.kruglikov@gmail.com \
    --cc=chelroot74@mail.ru \
    --cc=community@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 Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

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


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