[Linux-Biella] Rebus di rete OpenVPN
Ax
andre.noris a tiscali.it
Ven 20 Feb 2009 00:00:51 CET
Andrea Ferraris ha scritto:
> On Thu, 2009-02-19 at 22:09 +0100, Ax wrote:
>
>> Andrea Ferraris ha scritto:
>>
>>> vpn_server (192.168.111.9) con tun0 10.8.0.1
>>> sulla stessa lan
>>> web_server (192.168.111.8)
>>> gw_e_fw (192.168.111.1)
>>>
>>> vpn_client con 2 interfacce (X.Y.W.Z, esterna) e interna 192.168.7.1 con
>>> tun0 10.8.0.5
>>>
>>> Ora vorrei che vpn_client possa accedere a web_server, ma non ci arriva.
>>> Con tcpdump vedo i pacchetti che escono dall'interfaccia 192.168.111.9
>>> di vpn_server, ma nulla che torni indietro da web_server. Se da
>>> web_server pingo 192.168.7.1 di vpn client la cosa funziona e un
>>> traceroute mi fa vedere che passo da 192.168.111.9 (anche se non mi fa
>>> vedere i nodi della 10.8.0.0).
>>> Se cerco di raggiungere il web_server da vpn_server ci arrivo e
>>> visualizzo pagine html.
>>>
>>> Non riesco a capire che cosa non funziona e come scoprirlo.
>>>
>>>
>> ma scusa, hai probabilmente dei problemi di routing e non posti neanche
>> una tabella.
>>
>
> Se no, che rebus sarebbe?
>
>
>> così è un po' difficile capire dov'è l'inghippo.
>> sarebbe utile averla per vpnclient per vpnserver e per web-server.
>>
>
> anche perche' su gateway/firewall non posso sapere.
>
> andrea a vpn_server:~$ route -n
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 10.8.0.2 0.0.0.0 255.255.255.255 UH 0 0 0
> tun0
> 192.168.111.0 0.0.0.0 255.255.255.240 U 0 0 0
> eth1
> 192.168.5.0 10.8.0.2 255.255.255.0 UG 0 0 0
> tun0
> 10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0
> tun0
> 0.0.0.0 192.168.111.1 0.0.0.0 UG 100 0 0
> eth1
> andrea a vpn_server:~$ ip route show
> 10.8.0.2 dev tun0 proto kernel scope link src 10.8.0.1
> 192.168.111.0/28 dev eth1 proto kernel scope link src 192.168.111.12
> 192.168.5.0/24 via 10.8.0.2 dev tun0
> 10.8.0.0/24 via 10.8.0.2 dev tun0
> default via 192.168.111.1 dev eth1 metric 100
>
> andrea a vpn_client:~$ route -n
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0
> tun0
> 88.253.178.244 105.99.211.97 255.255.255.255 UGH 0 0 0
> eth1
> 10.8.0.1 10.8.0.5 255.255.255.255 UGH 0 0 0
> tun0
> 105.99.211.96 0.0.0.0 255.255.255.248 U 0 0 0
> eth1
> 192.168.5.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0
>
questa
> 0.0.0.0 10.8.0.5 0.0.0.0 UG 0 0 0
> tun0
>
come ti ha già detto leos ti conviene toglierla sennò navighi sulla vpn
e non credo ti vada bene.
> ops a vpn2:~$ ip route show
> 10.8.0.5 dev tun0 proto kernel scope link src 10.8.0.6
> 88.253.178.244 via 105.99.211.97 dev eth1
> 10.8.0.1 via 10.8.0.5 dev tun0
> 105.99.211.96/29 dev eth1 proto kernel scope link src 105.99.211.98
> 192.168.5.0/24 dev eth0 proto kernel scope link src 192.168.5.2
> default via 10.8.0.5 dev tun0
>
> andrea a web_server:~$ route -n
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 192.168.111.0 0.0.0.0 255.255.255.240 U 0 0 0
> eth2
> 0.0.0.0 192.168.111.1 0.0.0.0 UG 0 0 0
> eth2
> ops a mail:~$ ip route show
> 192.168.111.0/28 dev eth2 proto kernel scope link src 192.168.111.10
> default via 192.168.111.1 dev eth2
>
> Adesso e` tutto chiaro? :-)
>
pare di sì! infatti non avevo capito che il gw/firewall servisse anche
il vpnserver e il webserver.
se ho capito bene il casino è con i gw impostati su reti differenti.
secondo me la cosa più semplice è fare una vpn lawer 2 con tap invece di
tun così stai sulla stessa rete 192.168.111.0 e il vpnclient avrà come
gw lo stesso del web-server 192.168.111.1
ciao.
Maggiori informazioni sulla lista
Linux