<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>fabiolagana.net &#187; spam</title>
	<atom:link href="http://blog.fabiolagana.net/category/linux/spam/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fabiolagana.net</link>
	<description>640 Kb should be enough memory for anybody</description>
	<lastBuildDate>Mon, 26 Oct 2009 13:17:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Spamhaus droplist</title>
		<link>http://blog.fabiolagana.net/spamhaus-droplist/</link>
		<comments>http://blog.fabiolagana.net/spamhaus-droplist/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 07:55:39 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[droplist]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spamhaus]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=148</guid>
		<description><![CDATA[


&#160;Powered by Max Banner Ads&#160;
#!/bin/bash
&#160;
#Script to add firewall rules to a linux system to completely block
#all traffic to and from networks in the spamhaus drop list.
&#160;
#Copyright 2009, William Stearns, wstearns@pobox.com
#Released under the GPL.  This and other tools can be found at
#http://www.stearns.org/
&#160;
#Sole (optional) command line parameter is the file location of the
#drop list, such as:
&#160;
#cd [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox"><table><tr id="p1482"><td class="code" id="p148code2"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Script to add firewall rules to a linux system to completely block</span>
<span style="color: #666666; font-style: italic;">#all traffic to and from networks in the spamhaus drop list.</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Copyright 2009, William Stearns, wstearns@pobox.com</span>
<span style="color: #666666; font-style: italic;">#Released under the GPL.  This and other tools can be found at</span>
<span style="color: #666666; font-style: italic;">#http://www.stearns.org/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Sole (optional) command line parameter is the file location of the</span>
<span style="color: #666666; font-style: italic;">#drop list, such as:</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#cd /var/lib/</span>
<span style="color: #666666; font-style: italic;">#wget http://www.spamhaus.org/drop/drop.lasso</span>
<span style="color: #666666; font-style: italic;"># ./spamhaus-drop /var/lib/drop.lasso</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#While the DROP file should be regularly updated, this should</span>
<span style="color: #666666; font-style: italic;">#probably be about once per day or less frequently; do _not_</span>
<span style="color: #666666; font-style: italic;">#download DROP more than once an hour.</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #007800;">DropList</span>=<span style="color: #ff0000;">&quot;$1&quot;</span>
<span style="color: #000000; font-weight: bold;">else</span>
	<span style="color: #007800;">DropList</span>=<span style="color: #ff0000;">&quot;./drop.lasso&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DropList</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Unable to find drop list file <span style="color: #007800;">$DropList</span> .  Perhaps do:&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span>2
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;wget http://www.spamhaus.org/drop/drop.lasso -O <span style="color: #007800;">$DropList</span>&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;exiting.&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span>2
	<span style="color: #7a0874; font-weight: bold;">exit</span> 1
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Missing iptables command line tool, exiting.&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span>2
	<span style="color: #7a0874; font-weight: bold;">exit</span> 1
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DropList</span>&quot;</span> \
 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/;.*//'</span> \
 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> <span style="color: #ff0000;">'^ *$'</span> \
 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> OneNetBlock ; <span style="color: #000000; font-weight: bold;">do</span>
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-I</span> INPUT <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$OneNetBlock</span>&quot;</span> <span style="color: #660033;">-j</span> DROP
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-I</span> OUTPUT <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$OneNetBlock</span>&quot;</span> <span style="color: #660033;">-j</span> DROP
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-I</span> FORWARD <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$OneNetBlock</span>&quot;</span> <span style="color: #660033;">-j</span> DROP
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-I</span> FORWARD <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$OneNetBlock</span>&quot;</span> <span style="color: #660033;">-j</span> DROP
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/spamhaus-droplist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->