Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 18131 Details for
Bug 27087
iptables init.d script should be 'before net' not 'need net'
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
New iptables initscript
iptables (text/plain), 1.67 KB, created by
Michael C. Ferguson
on 2003-09-22 09:56:56 UTC
(
hide
)
Description:
New iptables initscript
Filename:
MIME Type:
Creator:
Michael C. Ferguson
Created:
2003-09-22 09:56:56 UTC
Size:
1.67 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2003 Gentoo Technologies, Inc. ># Distributed under the terms of the GNU General Public License, v2 or ># later ># $Header: /home/cvsroot/gentoo-x86/net-firewall/iptables/files/iptables.init,v 1.2 2003/05/04 18:19:03 aliz Exp $ > >opts="start stop save reload" > >depend() { > before net > use logger >} > >checkrules() { > if [ ! -f ${IPTABLES_SAVE} ] > then > eerror "Not starting iptables. First create some rules then run" > eerror "/etc/init.d/iptables save" > return 1 > fi >} > >start() { > checkrules || return 1 > ebegin "Loading iptables state and starting firewall" > einfo "Restoring iptables ruleset" > /sbin/iptables-restore ${SAVE_RESTORE_OPTIONS} < ${IPTABLES_SAVE} > > eend $? >} > >stop() { > save > > ebegin "Stopping firewall" > > for a in `cat /proc/net/ip_tables_names`; do > iptables -F -t $a > iptables -X -t $a > > if [ $a == nat ]; then > iptables -t nat -P PREROUTING ACCEPT > iptables -t nat -P POSTROUTING ACCEPT > iptables -t nat -P OUTPUT ACCEPT > elif [ $a == mangle ]; then > iptables -t mangle -P PREROUTING ACCEPT > iptables -t mangle -P INPUT ACCEPT > iptables -t mangle -P FORWARD ACCEPT > iptables -t mangle -P OUTPUT ACCEPT > iptables -t mangle -P POSTROUTING ACCEPT > elif [ $a == filter ]; then > iptables -t filter -P INPUT ACCEPT > iptables -t filter -P FORWARD ACCEPT > iptables -t filter -P OUTPUT ACCEPT > fi > done > eend $? >} > >save() { > ebegin "Saving iptables state" > /sbin/iptables-save ${SAVE_RESTORE_OPTIONS} > ${IPTABLES_SAVE} > eend $? >} > >reload() { > ebegin "Flushing firewall" > for a in `cat /proc/net/ip_tables_names`; do > /sbin/iptables -F -t $a > /sbin/iptables -X -t $a > done; > eend $? > > start >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 27087
: 18131 |
21506