The reason I want the chains saved, is because I'm uning sshdblackd (<a href="http://www.sshblack.com/">http://www.sshblack.com)</a> to block failed ssh attempts on my box<br><br>Here is everything that I did manually...<br>
<br>[root@mars ~]# iptables -L<br>Chain INPUT (policy ACCEPT)<br>target&nbsp;&nbsp;&nbsp;&nbsp; prot opt source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; destination&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>ACCEPT&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp; --&nbsp; anywhere&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; anywhere&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; state RELATED,ESTABLISHED <br>
ACCEPT&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp; --&nbsp; anywhere&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; anywhere&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>BLACKLIST&nbsp; tcp&nbsp; --&nbsp; anywhere&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; anywhere&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp dpt:ssh <br><br>Chain FORWARD (policy ACCEPT)<br>target&nbsp;&nbsp;&nbsp;&nbsp; prot opt source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; destination&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<br><br>Chain OUTPUT (policy ACCEPT)<br>target&nbsp;&nbsp;&nbsp;&nbsp; prot opt source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; destination&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br>Chain BLACKLIST (1 references)<br>target&nbsp;&nbsp;&nbsp;&nbsp; prot opt source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; destination&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>DROP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp; --&nbsp; 
<a href="http://uo82.internetdsl.tpnet.pl">uo82.internetdsl.tpnet.pl</a>&nbsp; anywhere&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>[root@mars ~]# cat /etc/cron.hourly/iptables.cron <br>#!/bin/sh<br>/sbin/iptables-save &gt;/dev/null 2&gt;&amp;1<br>[root@mars
 ~]# /sbin/iptables-save<br># Generated by iptables-save v1.3.5 on Sun Apr 23 09:24:51 2006<br>*filter<br>:INPUT ACCEPT [19025:2595521]<br>:FORWARD ACCEPT [0:0]<br>:OUTPUT ACCEPT [691823:184550717]<br>:BLACKLIST - [0:0]<br>
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT <br>-A INPUT -i lo -j ACCEPT <br>-A INPUT -p tcp -m tcp --dport 22 -j BLACKLIST <br>-A BLACKLIST -s <a href="http://80.55.144.82">80.55.144.82</a> -j DROP <br>COMMIT
<br># Completed on Sun Apr 23 09:24:51 2006<br>[root@mars ~]# cat /etc/sysconfig/iptables<br># Generated by iptables-save v1.3.5 on Sun Apr 23 09:01:15 2006<br>*filter<br>:INPUT ACCEPT [18650:2543690]<br>:FORWARD ACCEPT [0:0]
<br>:OUTPUT ACCEPT [690115:184341112]<br>:BLACKLIST - [0:0]<br>[664430:180357913] -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT <br>[3365:200808] -A INPUT -i lo -j ACCEPT <br>[6:360] -A INPUT -p tcp -m tcp --dport 22 -j BLACKLIST 
<br>[3:180] -A BLACKLIST -s <a href="http://80.55.144.82">80.55.144.82</a> -j DROP <br>COMMIT<br># Completed on Sun Apr 23 09:01:15 2006<br>[root@mars ~]# reboot&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br>Broadcast message from root (pts/0) (Sun Apr 23 09:25:40 2006):
<br><br>The system is going down for reboot NOW!<br>[root@mars ~]# <br><br>Last login: Sun Apr 23 09:20:19 2006 from <a href="http://pluto.domain.com">pluto.domain.com</a><br>[root@mars ~]# iptables -L<br>Chain INPUT (policy ACCEPT)
<br>target&nbsp;&nbsp;&nbsp;&nbsp; prot opt source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; destination&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br>Chain FORWARD (policy ACCEPT)<br>target&nbsp;&nbsp;&nbsp;&nbsp; prot opt source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; destination&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br>Chain OUTPUT (policy ACCEPT)<br>target&nbsp;&nbsp;&nbsp;&nbsp; prot opt source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; destination&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<br>[root@mars ~]# <br><br><br><div><span class="gmail_quote">On 4/23/06, <b class="gmail_sendername">Tim</b> &lt;<a href="mailto:ignored_mailbox@yahoo.com.au">ignored_mailbox@yahoo.com.au</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Sat, 2006-04-22 at 13:41 -0400, Devon Harding wrote:<br>&gt; I have a cron.hourly script set up to save my iptables chains.&nbsp;&nbsp;When I<br>&gt; reboot, the chain is empty &amp; /etc/sysconfig/iptables contains the<br>&gt; default settings.
<br>&gt;<br>&gt; Here is /etc/cron.hourly/iptables.cron:<br>&gt;<br>&gt; #!/bin/sh<br>&gt; /etc/init.d/iptables save &gt;/dev/null 2&gt;&amp;1<br><br>What about doing an &quot;iptables-save&quot; command, instead?&nbsp;&nbsp;(See near end of
<br>message.)<br><br>I would have thought that what you're doing saves them to the same place<br>that iptables loads its tables at boot time, but maybe you're getting<br>some strange race condition.&nbsp;&nbsp;And related to that, and in regards to
<br>another posting about &quot;/etc/sysconfig/iptables-config&quot;, you might want<br>to look at the same parameters that are inside the<br>&quot;/etc/sysconfig/iptables-config&quot; file.<br><br>My /etc/sysconfig/iptables-config file is the default:
<br><br>IPTABLES_MODULES=&quot;&quot;<br>IPTABLES_MODULES_UNLOAD=&quot;yes&quot;<br>IPTABLES_SAVE_ON_STOP=&quot;no&quot;<br>IPTABLES_SAVE_ON_RESTART=&quot;no&quot;<br>IPTABLES_SAVE_COUNTER=&quot;no&quot;<br>IPTABLES_STATUS_NUMERIC=&quot;yes&quot;
<br><br>I have custom rules stored (once) in the default place iptables reads<br>from at boot time (*), they seem to get read fine.<br><br>* Stored by using:&nbsp;&nbsp;iptables-save &gt; /etc/sysconfig/iptables<br><br>Something else that springs to mind:&nbsp;&nbsp;If you've got SELinux enabled,
<br>perhaps your CRON script needs appropriate SELinux contexts.<br><br>I am curious about why you need to keep saving the tables.<br><br>--<br>(Currently running FC4, occasionally trying FC5.)<br><br>Don't send private replies to my address, the mailbox is ignored.
<br>I read messages from the public lists.<br><br>--<br>fedora-list mailing list<br><a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a><br>To unsubscribe: <a href="https://www.redhat.com/mailman/listinfo/fedora-list">
https://www.redhat.com/mailman/listinfo/fedora-list</a><br></blockquote></div><br>