Re: Carregamento das regras do IPTABLES no boot
> Galera, > > Antes usando o Etch usava o script abaixo para carregar minhas regras no > Iptables diretamente no boot, agora no Lenny ao utilizar este script as > regras são carregadas mas a navegação não é possível. Já descomentei a > linha referente ao forward de ipv4 no arquivo /etc/sysctl.conf, mas a cada > reboot tenho de chamar o script com as regras do firewall > (/etc/firewall/fire1) novamente para liberar a navegação. Se alguém puder > me dar uma ajuda ou indicar outra melhor forma de carregar estas regras no > boot eu agradeço. > > Sds, > > João Henrique > > /etc/init.d# cat init.d/firewall > #!/bin/bash Olá!! por acaso não seria o caso de colocar o arquivo firewall em /etc/init.d ao invés de /etc/init.d/init.d (cp firewall .. ; chmod +x ../firewall ) [ ]s, Henry -- To UNSUBSCRIBE, email to debian-user-portuguese-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Carregamento das regras do IPTABLES no boot
João para podermos ajuda-lo será necessário ver o conteúdo do arquivo "/etc/firewall/fire1" e neste arquivo que estão as regras propriamente ditas. 2009/7/7 João Henrique Viana > Galera, > > Antes usando o Etch usava o script abaixo para carregar minhas regras no > Iptables diretamente no boot, agora no Lenny ao utilizar este script as > regras são carregadas mas a navegação não é possível. > Já descomentei a linha referente ao forward de ipv4 no arquivo > /etc/sysctl.conf, mas a cada reboot tenho de chamar o script com as regras > do firewall (/etc/firewall/fire1) novamente para liberar a navegação. > Se alguém puder me dar uma ajuda ou indicar outra melhor forma de carregar > estas regras no boot eu agradeço. > > Sds, > > João Henrique > > /etc/init.d# cat init.d/firewall > #!/bin/bash > # > # firewall This shell script takes care of starting and stopping > # your firewall > # > # chkconfig: 3 56 11 > # description: This service starts/stops your firewall. Starts by calling \ > # the /etc/rc.d/fire1 scritp and stops by flushing all the tables and > setting \ > # their default policies to ACCEPT. > # Source function library. > > . /etc/init.d/functions > > [ -f /etc/firewall/fire1 ] || exit 0 > [ -f /sbin/iptables ] || exit 0 > > IPTABLES="/sbin/iptables" > > start() { > /etc/firewall/fire1 > return $? > } > stop() { > $IPTABLES -P INPUT ACCEPT > $IPTABLES -P OUTPUT ACCEPT > $IPTABLES -P FORWARD ACCEPT > # os comandos abaixo deletam todas as regras nas tables Filter e > Nat > $IPTABLES -F > $IPTABLES -t nat -F > # Delete all User-specified chains > $IPTABLES -X > $IPTABLES -t nat -X > return $? > } > restart() { > stop > start > } > > # See how we were called. > case "$1" in > start) > start > ;; > stop) > stop > ;; > restart) > restart > ;; > reload) > start > ;; > *) > echo $"Usage: $0 {start|stop|restart|reload}" > exit 1 > esac > > exit $? > > -- To UNSUBSCRIBE, email to > debian-user-portuguese-requ...@lists.debian.org with a subject of > "unsubscribe". Trouble? Contact listmas...@lists.debian.org -- +=+ #!/usr/bin/env python print "Sinval Júnior" print "sinva...@gmail.com" +==+ Saiba o que é Software Livre! Veja http://www.gnu.org/philosophy/free-sw.pt-br.html +==+
Carregamento das regras do IPTABLES no boot
Galera, Antes usando o Etch usava o script abaixo para carregar minhas regras no Iptables diretamente no boot, agora no Lenny ao utilizar este script as regras são carregadas mas a navegação não é possível. Já descomentei a linha referente ao forward de ipv4 no arquivo /etc/sysctl.conf, mas a cada reboot tenho de chamar o script com as regras do firewall (/etc/firewall/fire1) novamente para liberar a navegação. Se alguém puder me dar uma ajuda ou indicar outra melhor forma de carregar estas regras no boot eu agradeço. Sds, João Henrique /etc/init.d# cat init.d/firewall #!/bin/bash # # firewall This shell script takes care of starting and stopping # your firewall # # chkconfig: 3 56 11 # description: This service starts/stops your firewall. Starts by calling \ # the /etc/rc.d/fire1 scritp and stops by flushing all the tables and setting \ # their default policies to ACCEPT. # Source function library. . /etc/init.d/functions [ -f /etc/firewall/fire1 ] || exit 0 [ -f /sbin/iptables ] || exit 0 IPTABLES="/sbin/iptables" start() { /etc/firewall/fire1 return $? } stop() { $IPTABLES -P INPUT ACCEPT $IPTABLES -P OUTPUT ACCEPT $IPTABLES -P FORWARD ACCEPT # os comandos abaixo deletam todas as regras nas tables Filter e Nat $IPTABLES -F $IPTABLES -t nat -F # Delete all User-specified chains $IPTABLES -X $IPTABLES -t nat -X return $? } restart() { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart) restart ;; reload) start ;; *) echo $"Usage: $0 {start|stop|restart|reload}" exit 1 esac exit $? -- To UNSUBSCRIBE, email to debian-user-portuguese-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org