- Dúvida em IPTABLES...
+ Responder ao Tópico
-
Dúvida em IPTABLES...
colegas...
Minha Rede é assim...
LINUX RedHat 7.3 => Com um roteador linkado ao provedor, uma placa rede (eth0)
linkada ao roteador, e uma placa de rede (eth1) linkada na LAN (local).
NETWARE Novell 5x => Com 03 (Tres) Placas de rede (barramentos), o serviço de
roteamento de IPs da novell esta configurado e rodando minhas sub-redes.
No LINUX RedHat 7.3 => Estou instalando o IPTABLES como FIREWALL.
Consigo PINGAR prá fora da minha rede, usar o BROWSE e o OUTLOOK Express.
Mas após instalado e rodando minhas regras abaixo tenho os seguintes problemas:
-> Na regra da ETH0 e do IP DO ROTEADOR, diz ser comando não encontrado.
Estou fazendo algo errado..???
Como fazer para passar tudo pelo SQUID..???
Minhas Regras:
#!/bin/sh
echo 1 > /proc/sys/net/ipv4/ip_forward
modprobe iptable_nat
insmod ip_nat_ftp
insmod ip_conntrack_ftp
iptables -F
iptables -F -t nat
iptables -X
iptables -X -t nat
iptables -Z
iptables -P INPUT DROP
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
#agora aki as minhas regras
iptables -A POSTROUTING -t nat -s 192.168.0.0/255.255.255.0 -j MASQUERADE
iptables -A POSTROUTING -t nat -s 192.168.1.0/255.255.255.0 -j MASQUERADE
iptables -A POSTROUTING -t nat -s 192.168.2.0/255.255.255.0 -j MASQUERADE
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -i lo -j ACCEPT
iptabels -A INPUT -s 200.1xx.1xx.xx -d 200.1xx.1x.xx -j ACCEPT # eth0 (ligada ao roteador)
iptables -A INPUT -s 192.168.0.2 -d 192.168.0.2 -j ACCEPT # eth1 (ligada a sub-rede)
iptables -A INPUT -p tcp -m multiport --dports http,ssh,smtp -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 53 -j ACCEPT
iptabels -A INPUT -s 200.1xx.1xx.xx -p tcp -m tcp --dport 53 -j ACCEPT # ip do roteador
iptables -A INPUT -s 192.168.0.0/255.255.255.0 -j ACCEPT
iptables -A INPUT -j REJECT --reject-with icmp-port-unreachable
Grato..
<IMG SRC="images/forum/icons/icon_wink.gif">
-
Dúvida em IPTABLES...
TENHO A SOLUÇÃO VC TE MANDAR UM BOM FIREWALL TODO CONFIGURADO!
http://www.jg555.com/firewall/firewa...ha-1.32.tar.gz
PRESTE ATENÇÃO.
VC VAI INSTALAR
ELE VAI PARA O
/etc/firewall
LÁ CONFIGURE O firewall.conf
habilitando tudo que vc quiscer ou não ele tem DNAT, SNAT, MASQ ETC...
NÃO DEFINA OS IP´S DE SUA REDE O SCRIPT VAI FAZER ISSO SOZIHNO
ENCONTRE:
################################################## Transparent Proxy
# Enter the proxy server ip and port to have all traffic filtered
# through a proxy server.
# Example 192.168.0.243:3333 Will have all traffic filter through
# a proxy server at 192.168.0.253 port 3333
TRANSPARENT_PROXY="COLOQUE AQUI O IP DO PROXY<IMG SRC="images/forum/icons/icon_razz.gif">ORTA"
##################################################
AH NÃO SE ESQUEÇA DE IR EM:
/etc/rc.d/init.d E DE PERMISSÃO PARA O SCRIPT FIREWALL
QUALQUER DÚVIDA ME CHAME!
<IMG SRC="images/forum/icons/icon21.gif">
[ Esta mensagem foi editada por: DIVORAK em 28-11-2002 14:42 ]
-
Dúvida em IPTABLES...
PEGUE AQUI http://www.jg555.com/firewall/firewall-Alpha-1.32.tar.gz O SEU FIREWALL
AO SEU DISPOR! <IMG SRC="images/forum/icons/icon21.gif">