From: Alexey <napalm@regionnet.ru> To: mandrake-russian@altlinux.ru Subject: [mdk-re] Re: [mdk-re] Настройка firewall Date: Sun Oct 21 01:58:02 2001 Message-ID: <200110202200.f9KM0kr19537@relay.regionnet.ru> (raw) In-Reply-To: <20011021013506.A12514@home-pool4-72.com2com.ru> [-- Attachment #1: Type: text/plain, Size: 741 bytes --] On Sun, 21 Oct 2001 01:35:07 +0400 Yura Zotov <yznews@hotbox.ru> wrote: YZ> Подскажите, пожалуйста, какими более-менее традиционными YZ> способами принято автоматизировать сохранение настроек firewall и YZ> их автоматическое применение при старте системы? Какие для этого YZ> использовать пакеты? Или стартовый скрипт самому писать? Если используется ipchains, то можно в качестве стартового скрипта использовать этот, который в аттаче. в /etc/sysconfig/firewall/firewall прописываются правила для ipchains , и /etc/rc.d/init.d/firewall start все это дело запускается. хотя можно использовать стартовый скрипт /etc/rc.d/init.d/ipchains , и правила прописывать в /etc/sysconfig/ipchains , но это уж кому как удобнее. -- wbr, Alexey. [-- Attachment #2: firewall --] [-- Type: text/plain, Size: 1424 bytes --] #!/bin/sh # # firewall Starts firewall. # # # chkconfig: 2345 12 88 # description: Firewall setup # Source function library. . /etc/rc.d/init.d/functions [ -d /etc/sysconfig/firewall ] || exit 0 [ -f /etc/sysconfig/firewall/firewall ] || exit 0 #MMODULES="ip_masq_ftp ip_masq_irc ip_masq_raudio ip_masq_quake" # See how we were called. case "$1" in start) echo -n "Starting firewall: " for i in $MMODULES; do modprobe $i done /sbin/ipchains -F /sbin/ipchains -Z /sbin/ipchains-restore < /etc/sysconfig/firewall/firewall 2>/dev/null success echo touch /var/lock/subsys/firewall ;; stop) echo -n "Shutting down firewall: " cp /etc/sysconfig/firewall/firewall /etc/sysconfig/firewall/firewall.bak /sbin/ipchains-save > /etc/sysconfig/firewall/firewall.work 2>/dev/null date >> /var/log/ipacct /sbin/ipchains -L -vn >> /var/log/ipacct /sbin/ipchains -P forward ACCEPT /sbin/ipchains -P input ACCEPT /sbin/ipchains -P output ACCEPT /sbin/ipchains -F /sbin/ipchains -X /sbin/ipchains -Z success echo rm -f /var/lock/subsys/firewall ;; status) ;; restart) $0 stop $0 start ;; *) echo "Usage: firewall {start|stop|status|restart}" exit 1 esac exit 0
next prev parent reply other threads:[~2001-10-21 1:58 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-10-21 1:32 Yura Zotov 2001-10-21 1:58 ` Alexey [this message] 2001-10-22 10:11 ` Vyt 2001-10-22 19:07 ` Вадим Илларионов 2001-10-22 19:18 ` [mdk-re] " Korshunov Ilya
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=200110202200.f9KM0kr19537@relay.regionnet.ru \ --to=napalm@regionnet.ru \ --cc=mandrake-russian@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 Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git