From: "Андрей Булава" <raven@dgtu.donetsk.ua> To: ALT Sisyphus mail list <sisyphus@altlinux.ru> Cc: Konstantin Volckov <goldhead@altlinux.ru> Subject: [sisyphus] [feature request] загрузка нужных модулей iptables Date: Thu, 14 Nov 2002 14:58:49 +0200 (EET) Message-ID: <Pine.BSF.4.44.0211141425560.43172-100000@elefant.dgtu.donetsk.ua> (raw) 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 ] Информационный центр ДонНТУ
next reply other threads:[~2002-11-14 12:58 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-11-14 12:58 Андрей Булава [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=Pine.BSF.4.44.0211141425560.43172-100000@elefant.dgtu.donetsk.ua \ --to=raven@dgtu.donetsk.ua \ --cc=goldhead@altlinux.ru \ --cc=sisyphus@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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