All of lore.kernel.org
 help / color / mirror / Atom feed
* iptables script file
@ 2004-10-25 21:26 Deepak Seshadri
  2004-10-25 21:28 ` Kenneth Porter
  0 siblings, 1 reply; 8+ messages in thread
From: Deepak Seshadri @ 2004-10-25 21:26 UTC (permalink / raw)
  To: 'Netfilter Group'

Hello everybody,

So far I have been writing all the iptables commands in a file & ran it in a
terminal (bash filename). Then I do the "service iptables save" to save &
load the configuration during boot-up. Pretty soon the configuration file is
going to have around 800 commands & this file is modified quite often. So
for the changes to reflect in run-time I do a "bash <script-file>".
Somewhere I read that loading that many commands using "bash <script-file>"
is not recommended (Is this true?). So I started searching in Google for
other alternatives. I came across the following:

- Use rc.firewall (I don't know if its in /etc or /etc/init.d or what)
- Use /etc/firewall.conf
- Use /etc/init.d/firewall

Could someone tell me which file to use? In Fedora core 2 I found only
/etc/rc.d/init.d/iptables.
Which way would be easy to load a huge script that would be modified quite
often?

OS specs:
Fedora Core 2
Kernel 2.6.8.1
Iptables 1.2.11

Hardware:
2.8Ghz P4
1 GB RAM

Thank you,

Deepak Seshadri



^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: iptables script file
@ 2004-10-31  1:52 Gary Smith
  0 siblings, 0 replies; 8+ messages in thread
From: Gary Smith @ 2004-10-31  1:52 UTC (permalink / raw)
  To: Jose Maria Lopez, netfilter

I love and have iptables-save.  We have a bunch of rules governing our LAN to DMZ, DMZ to INET and LAN to INET.  For simplicity we also have comments referring to what each rule is for.  We have certain one of exceptions and a mess of complicated ptp holes.

Iptables-save and restores failure is that it doesn't retain the additional comment information that we insert.  Though it's trivial it would be nice.

Gary Wayne Smith

-----Original Message-----
From: netfilter-bounces@lists.netfilter.org [mailto:netfilter-bounces@lists.netfilter.org] On Behalf Of Jose Maria Lopez
Sent: Saturday, October 30, 2004 2:00 PM
To: netfilter@lists.netfilter.org
Subject: Re: iptables script file

El jue, 28 de 10 de 2004 a las 17:05, Jason Opperisano escribió:
> so, the upshot is this--if your ruleset is sufficiently large to make
> the inefficiency of scripted "iptables" commands a problem--you'll need
> to use "iptables-restore" to load your rules.  once you get the hang of
> it, it really isn't that hard to just edit the "iptables-restore" file
> format (even though this isn't "recommended").

Don't know why everybody talks about the problem of editing the
iptables-save file. You don't need to do it. You just save the script
that generates the iptables-save rules and you edit it when you need
it, then you generate the rules and do a new iptables-save. No problem
here.

-- 
Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
jkerouac@bgsec.com
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPAÑA

The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
                -- Jack Kerouac, "On the Road"





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-11-03 17:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-25 21:26 iptables script file Deepak Seshadri
2004-10-25 21:28 ` Kenneth Porter
2004-10-28 13:56   ` Deepak Seshadri
2004-10-28 15:05     ` Jason Opperisano
2004-10-30 21:00       ` Jose Maria Lopez
2004-11-03 17:14       ` Deepak Seshadri
2004-10-28 15:14     ` Michael Gale
  -- strict thread matches above, loose matches on Subject: below --
2004-10-31  1:52 Gary Smith

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.