Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 7752 - Add a "save rules" feature to iptables init script?
Summary: Add a "save rules" feature to iptables init script?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Low enhancement (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
: 13459 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-09-10 10:50 UTC by Jason Costomiris
Modified: 2003-02-04 19:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Costomiris 2002-09-10 10:50:03 UTC
I recommend adding this to the /etc/init.d/iptables script:

save() {
        ebegin "Saving iptables state"
                /sbin/iptables-save > ${IPTABLES_SAVE}
        eend $?
}

and change the 2nd einfo line in the start() function to suggest they run this
same script with the "save" parameter.  This way, if you make future changes to
your rules without iptables running, it's a bit easier to save the rules - and
you'll never fat-finger the pathname to your ${IPTABLES_SAVE} file.

Just a thought...
Comment 1 Daniel Ahlberg (RETIRED) gentoo-dev 2003-01-07 06:48:13 UTC
Sorry, not possible. The initscripts doesn't support extra commands to be called from 
the command prompt. 
Comment 2 Daniel Ahlberg (RETIRED) gentoo-dev 2003-01-08 06:31:05 UTC
reopening... 
 
Comment 3 Daniel Ahlberg (RETIRED) gentoo-dev 2003-01-08 06:35:43 UTC
*** Bug 13459 has been marked as a duplicate of this bug. ***
Comment 4 Daniel Ahlberg (RETIRED) gentoo-dev 2003-01-08 06:37:20 UTC
Martin, runscript.sh must be modified to accept other arguments than start stop etc..  
I'm leavin the decision if and on how to handle this to you. 
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-08 14:17:09 UTC
Aliz, it already have the feature.  Checkout the latest bind rc-scipt (or named), 
and let on the $opts variable ...
Comment 6 Daniel Ahlberg (RETIRED) gentoo-dev 2003-01-09 03:47:03 UTC
Readded save() to iptables init script.