<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using iptables to prevent SSH brute force</title>
	<atom:link href="http://voituk.kiev.ua/2009/06/21/using-iptables-to-prevent-ssh-brute-force/feed/" rel="self" type="application/rss+xml" />
	<link>http://voituk.kiev.ua/2009/06/21/using-iptables-to-prevent-ssh-brute-force/</link>
	<description>while ( isAlive() ) {doCode(); doFun();}</description>
	<lastBuildDate>Wed, 01 Feb 2012 08:48:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Arkady</title>
		<link>http://voituk.kiev.ua/2009/06/21/using-iptables-to-prevent-ssh-brute-force/comment-page-1/#comment-44793</link>
		<dc:creator>Arkady</dc:creator>
		<pubDate>Wed, 11 Nov 2009 15:32:23 +0000</pubDate>
		<guid isPermaLink="false">http://voituk.kiev.ua/?p=1061#comment-44793</guid>
		<description>Мне больше всего нравится  http://denyhosts.sourceforge.net/
Он сканирует auth.log и через tcp-wrapers блокирует хост.</description>
		<content:encoded><![CDATA[<p>Мне больше всего нравится  <a href="http://denyhosts.sourceforge.net/" rel="nofollow">http://denyhosts.sourceforge.net/</a><br />
Он сканирует auth.log и через tcp-wrapers блокирует хост.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: squirL</title>
		<link>http://voituk.kiev.ua/2009/06/21/using-iptables-to-prevent-ssh-brute-force/comment-page-1/#comment-38701</link>
		<dc:creator>squirL</dc:creator>
		<pubDate>Sat, 18 Jul 2009 11:07:45 +0000</pubDate>
		<guid isPermaLink="false">http://voituk.kiev.ua/?p=1061#comment-38701</guid>
		<description>вот только злые боты - брутфорсят с ботнетов. адреса разные, т. е. за промежуток времени - никто не делает более 5 попыток. я, обычно, просто перевешиваю ssh на другой порт :)</description>
		<content:encoded><![CDATA[<p>вот только злые боты &#8211; брутфорсят с ботнетов. адреса разные, т. е. за промежуток времени &#8211; никто не делает более 5 попыток. я, обычно, просто перевешиваю ssh на другой порт :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: crud</title>
		<link>http://voituk.kiev.ua/2009/06/21/using-iptables-to-prevent-ssh-brute-force/comment-page-1/#comment-37572</link>
		<dc:creator>crud</dc:creator>
		<pubDate>Tue, 23 Jun 2009 11:31:34 +0000</pubDate>
		<guid isPermaLink="false">http://voituk.kiev.ua/?p=1061#comment-37572</guid>
		<description># занесенные в whitelist IP
for I in 88.81.251.200 88.81.251.194 213.227.195.211; do

# Пишем в лог
$IPTABLES -A SSH_BF -j LOG –log-prefix “SSH Brute Force Attempt: ”</description>
		<content:encoded><![CDATA[<p># занесенные в whitelist IP<br />
for I in 88.81.251.200 88.81.251.194 213.227.195.211; do</p>
<p># Пишем в лог<br />
$IPTABLES -A SSH_BF -j LOG –log-prefix “SSH Brute Force Attempt: ”</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: crud</title>
		<link>http://voituk.kiev.ua/2009/06/21/using-iptables-to-prevent-ssh-brute-force/comment-page-1/#comment-37571</link>
		<dc:creator>crud</dc:creator>
		<pubDate>Tue, 23 Jun 2009 11:27:24 +0000</pubDate>
		<guid isPermaLink="false">http://voituk.kiev.ua/?p=1061#comment-37571</guid>
		<description>как вариант также можно использовать следующую конструкцию 
$IPTABLES -F
$IPTABLES -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set --name SSH
$IPTABLES -N SSH_WHITELIST
$IPTABLES -N SSH_BF
$IPTABLES -A INPUT -p tcp --dport 22 -m state --state NEW -j SSH_WHITELIST
for I in 88.81.251.200 88.81.251.194 213.227.195.211; do
$IPTABLES -A SSH_WHITELIST -s $I -m recent --remove --name SSH -j ACCEPT
 done
$IPTABLES -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --name SSH --set --rsource -j SSH_BF
$IPTABLES -A SSH_BF -m recent ! --rcheck --seconds 60 --hitcount 3 --name SSH --rsource -j RETURN
$IPTABLES -A SSH_BF -j LOG --log-prefix &quot;SSH Brute Force Attempt:  &quot;
$IPTABLES -A SSH_BF -p tcp -j DROP

Здесь есть йункционеал занесения IP атакующего в лог (/var/log/messages) а также организатор whitelist в виде цикла. Как фишка IP в чёрном листе флушаются через 60 секунд.</description>
		<content:encoded><![CDATA[<p>как вариант также можно использовать следующую конструкцию<br />
$IPTABLES -F<br />
$IPTABLES -A INPUT -p tcp &#8211;dport 22 -m state &#8211;state NEW -m recent &#8211;set &#8211;name SSH<br />
$IPTABLES -N SSH_WHITELIST<br />
$IPTABLES -N SSH_BF<br />
$IPTABLES -A INPUT -p tcp &#8211;dport 22 -m state &#8211;state NEW -j SSH_WHITELIST<br />
for I in 88.81.251.200 88.81.251.194 213.227.195.211; do<br />
$IPTABLES -A SSH_WHITELIST -s $I -m recent &#8211;remove &#8211;name SSH -j ACCEPT<br />
 done<br />
$IPTABLES -A INPUT -p tcp &#8211;dport 22 -m state &#8211;state NEW -m recent &#8211;name SSH &#8211;set &#8211;rsource -j SSH_BF<br />
$IPTABLES -A SSH_BF -m recent ! &#8211;rcheck &#8211;seconds 60 &#8211;hitcount 3 &#8211;name SSH &#8211;rsource -j RETURN<br />
$IPTABLES -A SSH_BF -j LOG &#8211;log-prefix &#8220;SSH Brute Force Attempt:  &#8221;<br />
$IPTABLES -A SSH_BF -p tcp -j DROP</p>
<p>Здесь есть йункционеал занесения IP атакующего в лог (/var/log/messages) а также организатор whitelist в виде цикла. Как фишка IP в чёрном листе флушаются через 60 секунд.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

