O -I  para indicara a interface tb tem q ser minusculo ( -i )


Em 18/04/07, Alexandre J. Correa - Onda Internet <
[EMAIL PROTECTED]> escreveu:
>
>   linux eh case sensitive.. se vc colocar -t Nat .. nao vai funcionar...
>
> -Sport tambem nao funciona...
> Iptables nao é iptables !!!
>
> :P
>
> Gustavo Torrezani Mathias wrote:
> >
> > Ola Pessoal nao estou conseguinto resolver esse erro no meu firewall,
> > alguem
> > poderia me ajudar.
> >
> > O seguinte erro acontece quando eu executo o firewall:
> >
> > [EMAIL PROTECTED]:/etc# ./firewall
> > : comando não encontrado
> > : comando não encontrado
> > : comando não encontrado
> > : comando não encontrado
> > : comando não encontrado
> > : comando não encontrado
> > Iptables v1.3.3: Can't use -I with -A
> > Try `iptables -h' or 'iptables --help' for more information.
> > Iptables v1.3.3: Unknown arg `--Sport'
> > Try `iptables -h' or 'iptables --help' for more information.
> > : comando não encontrado
> > : comando não encontrado
> > : comando não encontrado
> > 'ptables v1.3.3: Bad IP address `192.168.0.102
> > Try `iptables -h' or 'iptables --help' for more information.
> > 'ptables v1.3.3: Invalid target name `ACCEPT
> > Try `iptables -h' or 'iptables --help' for more information.
> > 'ptables v1.3.3: Bad IP address `192.168.0.102
> > Try `iptables -h' or 'iptables --help' for more information.
> > 'ptables v1.3.3: Invalid target name `ACCE
> > Try `iptables -h' or 'iptables --help' for more information.
> > : comando não encontrado
> > : comando não encontrado
> > : comando não encontrado
> > 'ptables v1.3.3: Bad IP address `192.168.0.102
> > Try `iptables -h' or 'iptables --help' for more information.
> > 'ptables v1.3.3: Invalid target name `ACCEPT
> > Try `iptables -h' or 'iptables --help' for more information.
> > 'ptables v1.3.3: Bad IP address `192.168.0.102
> > Try `iptables -h' or 'iptables --help' for more information.
> > 'ptables v1.3.3: Invalid target name `ACCEPT
> > Try `iptables -h' or 'iptables --help' for more information.
> > : comando não encontrado
> > 'ptables v1.3.3: Invalid target name `ACCEPT
> > Try `iptables -h' or 'iptables --help' for more information.
> > 'ptables v1.3.3: Invalid target name `ACCEPT
> > Try `iptables -h' or 'iptables --help' for more information.
> > 'ptables v1.3.3: Invalid target name `ACCEPT
> > Try `iptables -h' or 'iptables --help' for more information.
> > 'ptables v1.3.3: Invalid target name `ACCEPT
> > Try `iptables -h' or 'iptables --help' for more information.
> > 'ptables v1.3.3: Invalid target name `DROP
> > Try `iptables -h' or 'iptables --help' for more information.
> > : comando não encontrado
> > : comando não encontrado
> > : comando não encontrado
> > [EMAIL PROTECTED]:/etc#
> >
> >
> >
> > ----------------------------------------------------------
> > ----------------------------------------------------------
> > -------------------
> >
> > O Firewall Esta assim:
> >
> > # eth0 - placa de rede DA Internet
> >
> > # eth1 - placa de rede local
> >
> > IPLOCAL="192.168.0.0/16"
> >
> > ETH_MODEM="eth0"
> > ETH_INTERNA="eth1"
> >
> > # LIMPA AS REGRAS DO FIREWALL
> > Iptables -X
> > Iptables -t Nat -F
> > Iptables -t Nat -X
> >
> > Iptables -P INPUT ACCEPT
> > Iptables -P OUTPUT ACCEPT
> > Iptables -P FORWARD ACCEPT
> >
> > Modprobe iptable_Nat # habilita o Nat
> > Iptables -t Nat -A POSTROUTING -o eth0 -j MASQUERADE
> > Echo 1 > /proc/sys/net/ipv4/IP_forward
> > Iptables -t Nat -A PREROUTING -I eth1 -p TCP --dport 80 -j REDIRECT
> > --to-port 3128
> >
> > # liberando SSH para acesso externo
> >
> > Iptables -A INPUT -I $ETH_INTERNA -p TCP --dport 22 -j ACCEPT
> > Iptables -A OUTPUT -p TCP --Sport 22 -j ACCEPT
> >
> >
> > # Redirecinando as Portas do Emule Para Maquinas II Da Lan House
> >
> > Iptables -t Nat -A PREROUTING -I eth0 -p TCP --dport 4662 -j DNAT
> > --to-dest
> > 192.168.0.102
> > Iptables -A FORWARD -p TCP -I eth0 --dport 4662 -d 192.168.0.102 -j
> > ACCEPT
> > Iptables -t Nat -A PREROUTING -I eth0 -p udp --dport 4672 -j DNAT
> > --to-dest
> > 192.168.0.102
> > Iptables -A FORWARD -p udp -I eth0 --dport 4672 -d 192.168.0.102 -j ACCE
> >
> >
> >
> > # Liberando o Acesso ao Enterprise
> >
> > Iptables -t Nat -A PREROUTING -I eth0 -p TCP --dport 3389 -j DNAT
> > --to-dest
> > 192.168.0.102
> > Iptables -A FORWARD -p TCP -I eth0 --dport 3389 -d 192.168.0.102 -j
> > ACCEPT
> > Iptables -t Nat -A PREROUTING -I eth0 -p TCP --dport 3050 -j DNAT
> > --to-dest
> > 192.168.0.102
> > Iptables -A FORWARD -p TCP -I eth0 --dport 3050 -d 192.168.0.102 -j
> > ACCEPT
> >
> > # Liberando Portas de Uso Comum
> >
> > Iptables -A INPUT -p TCP --destination-port 22 -j ACCEPT
> > Iptables -A INPUT -p TCP --destination-port 1021 -j ACCEPT
> > Iptables -A INPUT -p TCP --destination-port 1080 -j ACCEPT
> > Iptables -A INPUT -p TCP --syn -s 192.168.0.0/255.255.255.0 -j ACCEPT
> > Iptables -A INPUT -p TCP --syn -j DROP
> >
> > [As partes desta mensagem que não continham texto foram removidas]
> >
> >
>
> --
> Sds.
>
> Alexandre J. Correa
> Onda Internet
> www.ondainternet.com.br
> Linux User ID #142329
>
>  
>


[As partes desta mensagem que não continham texto foram removidas]

Responder a