From: Martijn Lievaart <m@rtij.nl>
To: Steven Van Acker <deepstar+NRpGDEuW@singularity.be>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [RFC] iptables namespaces
Date: Fri, 07 Sep 2007 23:09:59 +0200 [thread overview]
Message-ID: <46E1BE27.3050401@rtij.nl> (raw)
In-Reply-To: <20070907190601.GA18714@ekonomika.be>
Steven Van Acker wrote:
> On Fri, Sep 07, 2007 at 08:46:42PM +0200, Maximilian Wilhelm wrote:
>
>>> The result is that for 1 minute, some traffic can get through the firewall rules
>>> while other can not. We have had problems with spam getting through to
>>> mailservers behind the firewall, because not all firewall rules were loaded.
>>>
>> That problem can be solved.
>> man iptables-restore
>>
>
> iptables-restore takes a file as input, not a series of iptables
> commands. This means I would have to edit the file manually, not
> something I want to do with 7000 firewall rules.
>
The write a script. I use Perl for this, but then, I'm a freak. But most
existing scripts can be trivialy modified to produce a file which can be
fed to iptables-restore.
Something along the lines of (completely untested, my bash is very rusty):
IPTABLES=writeit
>rulez
#IPTABLES=/sbin/iptables # To slow!
function writeit {
echo $@ >>rulez
}
$IPTABLES -A INPUT -p tcp ... etc
You'll have to write some preamble and COMMIT afterwards, that is left
as an execise for the reader.
HTH,
M4
next prev parent reply other threads:[~2007-09-07 21:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-07 18:02 [RFC] iptables namespaces Steven Van Acker
2007-09-07 18:46 ` Maximilian Wilhelm
2007-09-07 19:06 ` Steven Van Acker
2007-09-07 21:09 ` Martijn Lievaart [this message]
2007-09-08 7:26 ` Jan Engelhardt
2007-09-08 13:28 ` Steven Van Acker
2007-09-08 13:59 ` Jan Engelhardt
2007-09-19 15:05 ` Ludwig Nussel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46E1BE27.3050401@rtij.nl \
--to=m@rtij.nl \
--cc=deepstar+NRpGDEuW@singularity.be \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.