Debian 4 ETH

1. Debian 4 ETH

juliano walter brune
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

###############################################################









  


2. Re: Debian 4 ETH

Perfil removido
removido

(usa Nenhuma)

Enviado em 12/04/2010 - 22:10h

voce ativou o roteamaneto das placas de rede?

o comando é esse

echo 1 > /proc/sys/net/ipv4/ip_forward

outro detalhe percebi que vc ta usando dois gateway default, isso não pode somente um

gateway 192.168.2.254
gateway 192.168.1.254

utiliza como gateway o ip do modem adsl


3. Re: Debian 4 ETH

juliano walter brune
julianobrune

(usa XUbuntu)

Enviado em 13/04/2010 - 08:44h

O roteamento das placas estava ativado.
o default gateway ja tinha sido arrumado apenas para 192.168.2.254(eth0).
inclusive tenho outro problema. tenho um servidor dns em outra maquina com linux debian.
quando ligo a eth0 do firewall direto no modem ADSL. ele nao resolve os nomes. apenas pinga no ip.
quando a eth0 esta ligada no switch dai resolve os nomes. aff









Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts