ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] [feature request] загрузка нужных модулей iptables
@ 2002-11-14 12:58 Андрей Булава
  2002-11-14 13:16 ` Konstantin Volckov
  2002-11-15 10:26 ` [sisyphus] " Michael Shigorin
  0 siblings, 2 replies; 8+ messages in thread
From: Андрей Булава @ 2002-11-14 12:58 UTC (permalink / raw)
  To: ALT Sisyphus mail list; +Cc: Konstantin Volckov

Hi!

Пишу в надежде на поддержку со стороны сообщества следующего feature
request

Исходная задача: нужно сделать SNAT для обращений в мир по ftp из
локальной сети.

После настройки пытаемся увековечить результат с помощью service iptables
save и получаем в /etc/sysconfig/iptables строчку вида

-A POSTROUTING -s GR.EY.IP.AD -p tcp -m tcp --dport 20:21 -j SNAT
--to-source RE.AL.IP.AD

Однако для нормальной работы этой цепочки в процессе настройки было
необходимо выполнить команды

modprobe ip_conntrack_ftp
modprobe ip_nat_ftp

каковые нужно выполнять при старте системы.

Вопрос: как сделать выполнение при старте системы с минимальными
затратами сил?

Наиболее часто используемый вариант: поганить скрипт /etc/init.d/iptables,
благо в Сети примеров завались. Это _плохие_ примеры, потому что

# ls -l /lib/modules/2.4.18-alt8-up/kernel/net/ipv4/netfilter/|grep
conntrack_|wc -l
     9

И что, для каждого из 9-ти вариантов лезть в инитскрипт?

Предлагаемый ниже патч к /etc/init.d/iptables позволит обойтись внесением
в /etc/modules.conf строк

above ip_tables ip_conntrack_ftp ip_nat_ftp [you name it]

Там же (в /etc/modules.conf) место и опциям загружаемых модулей.

Есть аргументированные возражения?

--- iptables    Tue Apr 16 17:25:11 2002
+++ iptables.NEW        Thu Nov 14 14:10:23 2002
@@ -45,6 +45,7 @@
            #  pre-existing rules.
            action "Flushing all current rules and user defined chains:"
iptables -F
            action "Clearing all current rules and user defined chains:"
iptables -X
+           action "Loading necessary netfilter modules:" /sbin/modprobe
ip_tables
            iptables -Z
            echo $"Applying iptables firewall rules: "
                grep -v "^[[:space:]]*#" $IPTABLES_CONFIG | grep -v
'^[[:space:]]*$' | /sbin/iptables-restore && \

--
С наилучшими пожеланиями,
 Андрей Булава [ AB1002-UANIC ]
Информационный центр ДонНТУ



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-11-18 23:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-14 12:58 [sisyphus] [feature request] загрузка нужных модулей iptables Андрей Булава
2002-11-14 13:16 ` Konstantin Volckov
2002-11-14 16:38   ` Андрей Булава
2002-11-15  7:34     ` Владимир
2002-11-15 10:26 ` [sisyphus] " Michael Shigorin
2002-11-15 15:38   ` Dmitry Lebkov
2002-11-18 14:58     ` Андрей Булава
2002-11-18 23:17       ` Dmitry Lebkov

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git