<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.7" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Make your router guard your mail</title>
	<link>http://spamhuntress.com/2005/10/29/make-your-router-guard-your-mail/</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Sat, 17 May 2008 05:21:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.7</generator>

	<item>
		<title>by: Administrator</title>
		<link>http://spamhuntress.com/2005/10/29/make-your-router-guard-your-mail/#comment-1685</link>
		<pubDate>Sat, 29 Oct 2005 15:10:03 +0000</pubDate>
		<guid>http://spamhuntress.com/2005/10/29/make-your-router-guard-your-mail/#comment-1685</guid>
					<description>And if you set up a router (for windows machines) or a linux machine for noobs who only use webmail (and won't ever use anything else), firewall off port 25 entirely.</description>
		<content:encoded><![CDATA[<p>And if you set up a router (for windows machines) or a linux machine for noobs who only use webmail (and won&#8217;t ever use anything else), firewall off port 25 entirely.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Lemat</title>
		<link>http://spamhuntress.com/2005/10/29/make-your-router-guard-your-mail/#comment-1684</link>
		<pubDate>Sat, 29 Oct 2005 15:01:42 +0000</pubDate>
		<guid>http://spamhuntress.com/2005/10/29/make-your-router-guard-your-mail/#comment-1684</guid>
					<description>while using linux and iptables:

modprobe ipt_recent ip_list_tot=32
${IPTABLES} -A FORWARD -m state --state RELATED, ESTABLISHED -j ACCEPT
${IPTABLES} -A FORWARD -p tcp --dport 25 -m recent --name SMTP --seconds 60 --update -j DROP
${IPTABLES} -A FORWARD -p tcp --dport 25 -m limit --limit 1/second --limit-burst 5 -j LOG --log-level info --log-prefix "smtp "
${IPTABLES} -A FORWARD -p tcp --dport 25 -m recent --name SMTP --set -j ACCEPT

assuming that human being will not send email more often than 60s and virus will try to connect far more often than every 60s - the above code will allow only first connection to the port 25, and every connection to this port made in 60s time will extend this ban for another 60s.
Full ban or redirecting the http traffic to "You have a virus" web page is also possible.</description>
		<content:encoded><![CDATA[<p>while using linux and iptables:</p>
<p>modprobe ipt_recent ip_list_tot=32<br />
${IPTABLES} -A FORWARD -m state &#8211;state RELATED, ESTABLISHED -j ACCEPT<br />
${IPTABLES} -A FORWARD -p tcp &#8211;dport 25 -m recent &#8211;name SMTP &#8211;seconds 60 &#8211;update -j DROP<br />
${IPTABLES} -A FORWARD -p tcp &#8211;dport 25 -m limit &#8211;limit 1/second &#8211;limit-burst 5 -j LOG &#8211;log-level info &#8211;log-prefix &#8220;smtp &#8221;<br />
${IPTABLES} -A FORWARD -p tcp &#8211;dport 25 -m recent &#8211;name SMTP &#8211;set -j ACCEPT</p>
<p>assuming that human being will not send email more often than 60s and virus will try to connect far more often than every 60s - the above code will allow only first connection to the port 25, and every connection to this port made in 60s time will extend this ban for another 60s.<br />
Full ban or redirecting the http traffic to &#8220;You have a virus&#8221; web page is also possible.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
