<?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>Darie Petrov&#039;s Blog</title>
	<atom:link href="http://darie.cambriansoft.org/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://darie.cambriansoft.org</link>
	<description>What I let you know about me ...</description>
	<lastBuildDate>Fri, 27 Jan 2012 20:48:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Messing with IPTables is trouble</title>
		<link>http://darie.cambriansoft.org/?p=3&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=messing-with-iptables-is-trouble</link>
		<comments>http://darie.cambriansoft.org/?p=3#comments</comments>
		<pubDate>Fri, 27 Jan 2012 20:43:07 +0000</pubDate>
		<dc:creator>dori</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://darie.cambriansoft.org/?p=3</guid>
		<description><![CDATA[I use a VPS as my main hub for all of my work. That is: openvpn, routing and forwarding for facebook callbacks to my machine, hosting dev/staging apps, and so on and so forth. As I was trying to set &#8230; <a class="more-link" href="http://darie.cambriansoft.org/?p=3">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I use a VPS as my main hub for all of my work. That is: openvpn, routing and forwarding for facebook callbacks to my machine, hosting dev/staging apps, and so on and so forth.</p>
<p>As I was trying to set up some forwarding over the VPN that this server hosts, I mangled up IPTables (wrong forward ip or something) and locked myself out of ssh access. Luckily Linode can help with that. But the thing I did not notice before locking myself out was that I was no longer getting my mail forwarded. Postfix was blocked by IPTables&#8230; and thus I lost a day of email (It DID seem odd that I would get no email for a whole day when I usually get upwards from 20 emails).</p>
<p>Moral: be careful with IPTables&#8230; any rule you add from the console is cumulative. More is not better &#8230; you want to block evil, but alow good, and not forward the wrong thing.<br />
Keep a backup:<br />
/etc/iptables/rules.backup<br />
Restore the backup with:<br />
iptables-restore < /etc/iptables/rules.backup<br />
Save the settings after you&#8217;ve set new rules from the console with:<br />
iptables-save<br />
If you see any duplicate rules (I like nano!):<br />
nano /etc/iptables/rules<br />
and remove the offending lines.</p>
<p>In retrospect I don&#8217;t know if this experience was so destructive as I initially though&#8230; some emails that I was aware of before the blackout have come through once I fixed the setup. Postfix must have a queue. Despite my repeated rebooting of the server all seems good! I love it when things work even when they break! <img src='http://darie.cambriansoft.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Good luck!</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Messing+with+IPTables+is+trouble+http%3A%2F%2Fis.gd%2FVlC6ym" title="Post to Twitter"><img class="nothumb" src="http://darie.cambriansoft.org/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Messing+with+IPTables+is+trouble+http%3A%2F%2Fis.gd%2FVlC6ym" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://darie.cambriansoft.org/?feed=rss2&#038;p=3</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

