erlug
[Top] [All Lists]

[Erlug] configurare correttamente tabelle di route

To: erlug@xxxxxxxxxxxxxx
Subject: [Erlug] configurare correttamente tabelle di route
From: Palumbo Daniele <rocco@xxxxxxxxxxxxxxxx>
Date: Fri, 6 Feb 2004 05:52:16 +0100
a parte una ovvia risposta: RTFM, network HOWTO, ho un problemino :)

devo configurare un firewall che faccia da filtro per tutto il traffico
di una lan+dmz (per modo di dire), e due if esterne.

sono due adsl, una mclink ed una fastweb.
per il momento mi interessa configurare bene mclink... anche perche`
una volta capito il meccanismo con le reti serie, le altre sono
accrocchi :)

fisicamente fw e mclink stanno sulla stessa dmz, eth4 ha un alias (eth4:0)

il router mclink per la rete 195.110.xxx.0/28, ha un default route
su eth0 di 195.110.xxx.13 (eth4 sul firewall). 195.110.xxx.14 e` su eth0

router mclink: 195.110.nnn.1/28
router fw: ip sparsi, 192.168.???.104/29 (se non erro)

interfaccie
---
rout mclink -> eth0 195.110.xxx.13/32
rout fw -> eth1 192.168.nnn.106/32
non utilizzata -> eth2
lan (masq) -> eth3
dmz eth4 -> 195.110.xxx.13
dmz eth0:0 -> 192.168.7.104/29 
---

ho ovviamente abilitato il forwarding, ma come mai se il default gw e`
fw, perche` dall'esterno non si connette la dmz di mclink?

tcpdump dice che i pacchetti si fermano su eth0, e non fa null'altro.
non e` iptables, perche` se lo fosse vedrei i log.

ho trovato questo:
"Therefore, the metric of a route to a subnet the host is directly
 connected to should always be zero, while a route going through two
 gateways should have a metric of two. However, note that you don't
 have to bother about metrics when you don't use RIP or gated."

io non uso nessuno dei due (dovrei? magari sul router?), quindi ho
lasciato il metric a 0.

anche impostando eth0 promisc non cambia nulla.

se invece cambio il default route, e metto il router mclink,
funziona tutto.

questa e` la tb. di routing
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.nnn.106 0.0.0.0          255.255.255.255 UH    0      0        0 eth1
195.110.xxx.1   0.0.0.0          255.255.255.255 UH    0      0        0 eth0
195.110.xxx.0   0.0.0.0          255.255.255.240 U     0      0        0 eth4
192.168.???.104 0.0.0.0          255.255.255.248 U     0      0        0 eth4
192.168.0.0     0.0.0.0          255.255.255.0   U     0      0        0 eth3
0.0.0.0         192.168.nnn.106  0.0.0.0         UG    0      0        0 eth0

ho trovato per iptables una patch che abilita il -j ROUTE, che permette di
routare i pacchetti...

ma con debian bisogna ricompilare e il kernel e iptables... mi scoccia non
poco!


bye
daniele
-- 
PGP Key-ID: 0xF482D454
--
To bodly go where no man has gone before.

<Prev in Thread] Current Thread [Next in Thread>