Skip to contentSkip to conversation

How to safely unload netfilter modules for a fresh restart

DISCUSSION Adrian_Sanchez 1 participant 1 message Sep 8, 2005

lore
Share & tools
lore
#0 lore raw

Hi everyone.

Is there a safe way to unload the netfilter modules in order to force a clean iptables restart when needed? (especially regarding connection tracking, which I need to zap)

If not, I do need to clear my connection states: is there a way to do this without unloading the modules?

Most of the time I can cleanly unload the modules by flushing the tables first, and then unloading the unreferred modules, then the remaining ones.

But depending on what I've doing from my box (ie: establishing an FTP session), sometimes the "modprobe -r" / "rmmod" commands get stuck at 99% CPU usage and the only way to get back to normal is by rebooting the box.

- Tried on a fresh Fedora Core 2 installation (kernel 2.6.5-1.358 + iptables 1.2.9)
- Tried on a Fedora Core 2 upgraded installation (kernel 2.6.13 + iptables 1.3.3)
- Tried on a fresh Fedora Core 1 installation (kernel 2.4.22-1.2115.nptl + iptables 1.2.7)

Always the same results.

Thanks for your comments.