<?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: Standard Process for Restoring IPtables at Boot?</title>
	<atom:link href="http://ubuntu-tutorials.com/2009/02/28/standard-process-for-restoring-iptables-at-boot/feed/" rel="self" type="application/rss+xml" />
	<link>http://ubuntu-tutorials.com/2009/02/28/standard-process-for-restoring-iptables-at-boot/</link>
	<description>Enhancing your Ubuntu experience!</description>
	<lastBuildDate>Fri, 11 May 2012 05:04:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Tig</title>
		<link>http://ubuntu-tutorials.com/2009/02/28/standard-process-for-restoring-iptables-at-boot/#comment-8057</link>
		<dc:creator>Tig</dc:creator>
		<pubDate>Sun, 08 Mar 2009 12:20:20 +0000</pubDate>
		<guid isPermaLink="false">http://ubuntu-tutorials.com/?p=961#comment-8057</guid>
		<description>Got to love Google and the Debian community. Thank you for helping me to decide which way is best for this very task.

I use Firewall Builder to create my rules (God I love that program) and save the rules into defaults as per the way you advise. However, I&#039;m with Adam on using a script in if-up.d to restore, it just makes more sense to me personally.

Great advice from all, however.

/Tig</description>
		<content:encoded><![CDATA[<p>Got to love Google and the Debian community. Thank you for helping me to decide which way is best for this very task.</p>
<p>I use Firewall Builder to create my rules (God I love that program) and save the rules into defaults as per the way you advise. However, I&#8217;m with Adam on using a script in if-up.d to restore, it just makes more sense to me personally.</p>
<p>Great advice from all, however.</p>
<p>/Tig</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MTecknology</title>
		<link>http://ubuntu-tutorials.com/2009/02/28/standard-process-for-restoring-iptables-at-boot/#comment-8003</link>
		<dc:creator>MTecknology</dc:creator>
		<pubDate>Wed, 04 Mar 2009 18:03:43 +0000</pubDate>
		<guid isPermaLink="false">http://ubuntu-tutorials.com/?p=961#comment-8003</guid>
		<description>I do the rc.local as well.</description>
		<content:encoded><![CDATA[<p>I do the rc.local as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: budiw</title>
		<link>http://ubuntu-tutorials.com/2009/02/28/standard-process-for-restoring-iptables-at-boot/#comment-7976</link>
		<dc:creator>budiw</dc:creator>
		<pubDate>Tue, 03 Mar 2009 09:06:23 +0000</pubDate>
		<guid isPermaLink="false">http://ubuntu-tutorials.com/?p=961#comment-7976</guid>
		<description>I&#039;m using /etc/rc.local. The script of iptables I save in some file, and then loaded in rc.local

--budiw</description>
		<content:encoded><![CDATA[<p>I&#8217;m using /etc/rc.local. The script of iptables I save in some file, and then loaded in rc.local</p>
<p>&#8211;budiw</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Nachbar</title>
		<link>http://ubuntu-tutorials.com/2009/02/28/standard-process-for-restoring-iptables-at-boot/#comment-7964</link>
		<dc:creator>James Nachbar</dc:creator>
		<pubDate>Sun, 01 Mar 2009 21:45:20 +0000</pubDate>
		<guid isPermaLink="false">http://ubuntu-tutorials.com/?p=961#comment-7964</guid>
		<description>With the new Upstart init system, I just create a new file, /etc/event.d/iptables :

# Script to start firewall
# Save rules with   iptables-save &gt; /etc/default/iptables

start on runlevel 1
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5

exec /sbin/iptables-restore &lt; /etc/default/iptables


That way, you aren&#039;t changing any existing files, just adding the new one.  On every reboot, the iptables rules get loaded.  You can check that they are loaded with:

sudo /sbin/iptables-save &#124; less</description>
		<content:encoded><![CDATA[<p>With the new Upstart init system, I just create a new file, /etc/event.d/iptables :</p>
<p># Script to start firewall<br />
# Save rules with   iptables-save &gt; /etc/default/iptables</p>
<p>start on runlevel 1<br />
start on runlevel 2<br />
start on runlevel 3<br />
start on runlevel 4<br />
start on runlevel 5</p>
<p>exec /sbin/iptables-restore &lt; /etc/default/iptables</p>
<p>That way, you aren&#8217;t changing any existing files, just adding the new one.  On every reboot, the iptables rules get loaded.  You can check that they are loaded with:</p>
<p>sudo /sbin/iptables-save | less</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zonky</title>
		<link>http://ubuntu-tutorials.com/2009/02/28/standard-process-for-restoring-iptables-at-boot/#comment-7963</link>
		<dc:creator>zonky</dc:creator>
		<pubDate>Sun, 01 Mar 2009 19:15:38 +0000</pubDate>
		<guid isPermaLink="false">http://ubuntu-tutorials.com/?p=961#comment-7963</guid>
		<description>It&#039;s worth remembering with the proliferation of Xen based Virtual Hosting, that /etc/network/interfaces seems to be commonly replaced at bootup.

You&#039;re probably safer to stick this in 
/etc/network/if-up.d</description>
		<content:encoded><![CDATA[<p>It&#8217;s worth remembering with the proliferation of Xen based Virtual Hosting, that /etc/network/interfaces seems to be commonly replaced at bootup.</p>
<p>You&#8217;re probably safer to stick this in<br />
/etc/network/if-up.d</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim.</title>
		<link>http://ubuntu-tutorials.com/2009/02/28/standard-process-for-restoring-iptables-at-boot/#comment-7961</link>
		<dc:creator>Tim.</dc:creator>
		<pubDate>Sun, 01 Mar 2009 15:45:13 +0000</pubDate>
		<guid isPermaLink="false">http://ubuntu-tutorials.com/?p=961#comment-7961</guid>
		<description>I just use something like shorewall... way easier to maintain in the long run.</description>
		<content:encoded><![CDATA[<p>I just use something like shorewall&#8230; way easier to maintain in the long run.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: agentk</title>
		<link>http://ubuntu-tutorials.com/2009/02/28/standard-process-for-restoring-iptables-at-boot/#comment-7955</link>
		<dc:creator>agentk</dc:creator>
		<pubDate>Sat, 28 Feb 2009 21:52:43 +0000</pubDate>
		<guid isPermaLink="false">http://ubuntu-tutorials.com/?p=961#comment-7955</guid>
		<description>I actually liked the Redhat init script that much that I just copied to my Ubuntu install and made come changes from there.
It just saves the tables to /etc/iptables/config now.</description>
		<content:encoded><![CDATA[<p>I actually liked the Redhat init script that much that I just copied to my Ubuntu install and made come changes from there.<br />
It just saves the tables to /etc/iptables/config now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony</title>
		<link>http://ubuntu-tutorials.com/2009/02/28/standard-process-for-restoring-iptables-at-boot/#comment-7954</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Sat, 28 Feb 2009 21:28:43 +0000</pubDate>
		<guid isPermaLink="false">http://ubuntu-tutorials.com/?p=961#comment-7954</guid>
		<description>I&#039;m using ufw on my boxes and it seems to take care of that on it&#039;s own, storing the rules in /var/lib/ufw/user.rules.  However your solution seems fairly solid to me.</description>
		<content:encoded><![CDATA[<p>I&#8217;m using ufw on my boxes and it seems to take care of that on it&#8217;s own, storing the rules in /var/lib/ufw/user.rules.  However your solution seems fairly solid to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Mossholder</title>
		<link>http://ubuntu-tutorials.com/2009/02/28/standard-process-for-restoring-iptables-at-boot/#comment-7953</link>
		<dc:creator>Matt Mossholder</dc:creator>
		<pubDate>Sat, 28 Feb 2009 19:03:38 +0000</pubDate>
		<guid isPermaLink="false">http://ubuntu-tutorials.com/?p=961#comment-7953</guid>
		<description>The only gotcha I can think of with doing it in /etc/network/interfaces is that you are tying the ruleset to a specific interface.  If that interface doesn&#039;t come up for some reason, the iptables rules don&#039;t get loaded.

It is too bad that iptables-save doesn&#039;t have options to save the rules by interface, such that we could save global rules, and load them when lo starts, and interface specific rules that could be loaded with each interface.

As things stand, I would probably have the pre-up bound to lo, rather than eth0.</description>
		<content:encoded><![CDATA[<p>The only gotcha I can think of with doing it in /etc/network/interfaces is that you are tying the ruleset to a specific interface.  If that interface doesn&#8217;t come up for some reason, the iptables rules don&#8217;t get loaded.</p>
<p>It is too bad that iptables-save doesn&#8217;t have options to save the rules by interface, such that we could save global rules, and load them when lo starts, and interface specific rules that could be loaded with each interface.</p>
<p>As things stand, I would probably have the pre-up bound to lo, rather than eth0.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://ubuntu-tutorials.com/2009/02/28/standard-process-for-restoring-iptables-at-boot/#comment-7952</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Sat, 28 Feb 2009 18:47:58 +0000</pubDate>
		<guid isPermaLink="false">http://ubuntu-tutorials.com/?p=961#comment-7952</guid>
		<description>I use a short script in /etc/network/if-up.d which contains other scripts such as reloading OpenSSH so it can bind to the new address, running ntpdate, etc.

$ cat /etc/network/if-up.d/iptables
iptables-restore &lt; /etc/iptables.up.rules</description>
		<content:encoded><![CDATA[<p>I use a short script in /etc/network/if-up.d which contains other scripts such as reloading OpenSSH so it can bind to the new address, running ntpdate, etc.</p>
<p>$ cat /etc/network/if-up.d/iptables<br />
iptables-restore &lt; /etc/iptables.up.rules</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: basic (User agent is rejected)
Database Caching 1/5 queries in 0.002 seconds using disk: basic
Object Caching 315/315 objects using disk: basic

Served from: ubuntu-tutorials.com @ 2012-05-25 03:52:35 -->
