Spusteni konfigurace IPTABLES

Tom Hudec Tom na ABBA.cz
Pátek Březen 15 15:42:18 CET 2002


Zdenek Pytela wrote:
> Linux píše:
> 
>>Potreboval bych zajistit automaticke spusteni skriptu pro nastaveni
>>iptables. Kam mam skript umistit a jak zajistim jeho spusteni ve spravnem
>>okamziku?
>>
> 
> # Precist si serial na www.root.cz
> # Vytvorit soubor /etc/sysconfig/iptables
> ed /etc/sysconfig/iptables
> # Zrusit ipchains - odinstalovat nebo
> chkconfig --level 35 ipchains stop
> service ipchains stop
> rmmod ipchains
> # Nastavit spousteni
> chkconfig --level 35 iptables start
> service iptables start
> 
> Distribuci jste nepopsal, tohle platí pouze pro RH 7.1 a výš.

Debian (woody):
nainstalovat iptables
# apt-get install iptables

upravit konfiguraci /etc/default/iptables:
nastavit enable_iptables_initd=true
# vi /etc/default/iptables

nastavit "neaktivni" pravidla pomoci iptables
(budou platna po /etc/init.d/iptables stop)
ulozit toto nastaveni:
# /etc/init.d/iptables save_inactive

nastavit "aktivni" pravidla pomoci iptables -A ...
(budou platna po /etc/init.d/iptables start)
ulozit toto nastaveni:
# /etc/init.d/iptables save_active

Zapnout aktivni stav:
# /etc/init.d/iptables start


-- 
Tom Hudec <Tom(at)ABBA.cz>, editor of Tom's ABBA pages http://ABBA.cz/

   .''`.  The box said Windows, NT or better, so I installed Linux. :-)
  : :' :
  `. `'   Debian GNU/Linux  http://www.debian.org/  http://www.debian.cz/
    `-    The Perfect OS - the most software, the most people



Další informace o konferenci Linux