Bug 65389 - /etc/init.d/iptables stop should rmmod iptables
Summary: /etc/init.d/iptables stop should rmmod iptables
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: iptables
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-23 01:42 UTC by kenneth_porter
Modified: 2007-04-18 16:42 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-07-03 09:32:56 UTC
Embargoed:


Attachments (Terms of Use)

Description kenneth_porter 2002-05-23 01:42:43 UTC
To allow iptables and ipchains initscripts to be used on the same box (eg. during a system's 
transition from firewall scripts written for kernel-2.2 systems), each initscript should rmmod 
its modules on service stop to allow the other service to load its (incompatible) modules. This 
has already been done for ipchains (see bug 63792).

Note that iptables's version may need to 
be more complicated, requiring at least a -r to remove directly dependent modules such as the 
connection tracking and NAT subsystems. There is some risk here as the current tracking modules 
may not clean up well when removed while an existing connection is being tracked. Some input from 
the netfilter people would be desirable.

Comment 1 Need Real Name 2002-05-23 06:19:03 UTC
The problem with iptables is it is made up of a bunch of modules.  So it's not
as simple as ipchains.

It would probably be better to modprobe -r iptables here rather than rmmod iptables.

Here's what I suggest it do at the end of the stop section:

/sbin/lsmod |egrep "^ipt_|^iptable|^ip_tables" | awk '{print $1}' |xargs
/sbin/modprobe -r


Comment 2 Thomas Woerner 2003-07-03 09:32:56 UTC
Fixed in the new 1.2.8-4.x version. This version has a new startup script and an
additional config file.


/etc/sysconfig/iptables-config:
> # Additional iptables modules (nat helper)
> # Default: -empty-
> #IPTABLES_MODULES="ip_nat_ftp"
> 
> # Save current firewall rules on stop.
> # Value: yes|no,  default: no
> #IPTABLES_SAVE_ON_STOP="no"
> 
> # Save current firewall rules on restart.
> # Value: yes|no,  default: no
> #IPTABLES_SAVE_ON_RESTART="no"
> 
> # Save rule counter.
> # Value: yes|no,  default: yes
> #IPTABLES_SAVE_COUNTER="yes"
> 
> # Numeric status output
> # Value: yes|no,  default: no
> #IPTABLES_STATUS_NUMERIC="no"


RPM packages for 7.x:
http://people.redhat.com/twoerner/RPMS/7.x/iptables-1.2.8-4.73.1.i386.rpm
http://people.redhat.com/twoerner/RPMS/7.x/iptables-ipv6-1.2.8-4.73.1.i386.rpm
http://people.redhat.com/twoerner/SRPMS/iptables-1.2.8-4.73.1.src.rpm

RPM packages for 8.0:
http://people.redhat.com/twoerner/RPMS/8.0/iptables-1.2.8-4.80.1.i386.rpm
http://people.redhat.com/twoerner/RPMS/8.0/iptables-ipv6-1.2.8-4.80.1.i386.rpm
http://people.redhat.com/twoerner/SRPMS/iptables-1.2.8-4.80.1.src.rpm

RPM packages for 9:
http://people.redhat.com/twoerner/RPMS/9/iptables-1.2.8-4.90.1.i386.rpm
http://people.redhat.com/twoerner/RPMS/9/iptables-ipv6-1.2.8-4.90.1.i386.rpm
http://people.redhat.com/twoerner/SRPMS/iptables-1.2.8-4.90.1.src.rpm



Note You need to log in before you can comment on or make changes to this bug.