--- /etc/init.d/iptables	2002-11-26 17:12:09 +0300
+++ iptables	2003-03-13 16:23:40 +0300
@@ -60,6 +60,10 @@
 fi
 }
 
+save_modules() {
+    lsmod | egrep "^ip_nat_|^ip_conntrack_" | cut -d " " -f1 | sort > $IPTABLES_MODCONFIG 
+}
+
 start() {
 	# don't do squat if we don't have the config file
 	if [ -f $IPTABLES_CONFIG ]; then
@@ -181,10 +185,17 @@
 	echo
 	;;
 
+  save-mod)
+	echo -n $"Saving config netfilter modules to $IPTABLES_MODCONFIG: " 
+	save_modules
+	  success $"Saving config netfilter modules to $IPTABLES_MODCONFIG" || \
+	  failure $"Saving config netfilter modules to $IPTABLES_MODCONFIG"
+	echo
+	;;
+
   *)
-	echo $"Usage: $0 {start|stop|restart|condrestart|status|panic|save}"
+	echo $"Usage: $0 {start|stop|restart|condrestart|status|panic|save|save-mod}"
 	exit 1
 esac
 
 exit 0
-
