julianobrune
(usa XUbuntu)
Enviado em 12/04/2010 - 14:53h
Olá a todos.
Preciso fazer minha rede passar pelo firewall. ja testei o iptables e esta funcionando certinho, o problema que a minha ligacao esta toda tosca. pois o router ADSL esta ligado no swicth(deveria estar ligado na eth0). porem mesmo estando dessa forma, se eu direcionar o gateway das maquinas para apondar para o firewall funciona(regras de iptables rodam certinho). o problema que nao estou conseguindo fazer funcionar quando ligo o router ADSL diretamente na placa de rede do firewall. Para ser mais rapido segue abaixo as saidas de alguns comandos.
############################################################
comando: vim resolv.conf
saida: nameserver 192.168.2.254
############################################################
comando: vim interfaces
saida:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0 #Interface ligada ao router 1
iface eth0 inet static
address 192.168.2.15
netmask 255.255.255.0
gateway 192.168.2.254
auto eth1 #Interface ligada ao router 2
iface eth1 inet static
address 192.168.1.15
netmask 255.255.255.0
gateway 192.168.1.254
auto eth2 #Interface ligada a rede 1
iface eth2 inet static
address 192.168.2.16
netmask 255.255.255.0
auto eth3 #Interface ligada a rede 2
iface eth3 inet static
address 192.168.1.16
netmask 255.255.255.0
#############################################################
comado: ip ro show
saida: default via 192.168.2.254 dev eth0
#############################################################
comado: ip ru show
saida: 0: from all lookup local
32765: from 192.168.2.0/24 lookup ADSL
32766: from all lookup main
32767: from all lookup default
#############################################################
comado: ip ro show table ADSL
saida: default via 192.168.2.16 dev eth2
##############################################################
comando: iptables-save
saida:
# Generated by iptables-save v1.4.1.1 on Mon Apr 12 13:12:14 2010
*mangle
:PREROUTING ACCEPT [3108:300340]
:INPUT ACCEPT [2410:264647]
:FORWARD ACCEPT [571:30109]
:OUTPUT ACCEPT [1026:96476]
:POSTROUTING ACCEPT [1597:126585]
COMMIT
# Completed on Mon Apr 12 13:12:14 2010
# Generated by iptables-save v1.4.1.1 on Mon Apr 12 13:12:14 2010
*filter
:INPUT ACCEPT [3700:397089]
:FORWARD ACCEPT [1412:83757]
:OUTPUT ACCEPT [1830:173967]
COMMIT
# Completed on Mon Apr 12 13:12:14 2010
# Generated by iptables-save v1.4.1.1 on Mon Apr 12 13:12:14 2010
*nat
:PREROUTING ACCEPT [1858:171416]
:POSTROUTING ACCEPT [848:54581]
:OUTPUT ACCEPT [64:4999]
COMMIT
# Completed on Mon Apr 12 13:12:14 2010
###############################################################