View previous topic :: View next topic |
Author |
Message |
cloc3 Advocate


Joined: 13 Jan 2004 Posts: 4815 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Fri Oct 31, 2008 11:26 pm Post subject: [openvpn]routing capovolto[risolto] |
|
|
sto cercando di impostare una openvpn.
l'howto ufficiale è molto ben fatto, e ha reso attivo il mio client in poco tempo.
al momento, la tabella di routing del client si autoconfigura a rovescio, e sono costretto ad intervenire manualmente per corregggerla.
questo è il mio server.conf:
Code: |
s939 openvpn # cat server.conf |grep -v ^\; |grep -v ^$ |grep -v ^#
port 1194
proto udp
dev tap1
ca keys/ca.crt
cert keys/server.crt
key keys/server.key # This file should be kept secret
dh keys/dh1024.pem
ifconfig-pool-persist ipp.txt
server-bridge 172.16.200.254 255.255.255.0 172.16.200.10 172.16.200.50
push "route 0.0.0.0 255.255.255.0 172.16.200.254"
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
|
e questa la tabella di routing del client:
Code: |
client-openvpn:/live/image/openvpn# route -en
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 172.16.200.254 255.255.255.0 UG 0 0 0 tap0
172.16.199.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
172.16.200.0 0.0.0.0 255.255.255.0 U 0 0 0 tap0
|
io vorrei la prima riga all'utlimo posto.
cosa devo fare? _________________ vu vu vu
gentù
mi piaci tu
Last edited by cloc3 on Sat Nov 01, 2008 8:57 am; edited 1 time in total |
|
Back to top |
|
 |
Peach Advocate


Joined: 08 Mar 2003 Posts: 3686 Location: London, UK
|
Posted: Fri Oct 31, 2008 11:56 pm Post subject: |
|
|
mi sembra strano..
io attualmente sulla conf del server bridged (tpc) la route la imposto così:
Code: | push "route 192.168.1.0 255.255.255.0" |
sinceramente non ricordo bene l'opzione, forse dovrei darmi una letta al manuale... _________________ Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom |
|
Back to top |
|
 |
cloc3 Advocate


Joined: 13 Jan 2004 Posts: 4815 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Sat Nov 01, 2008 12:06 am Post subject: |
|
|
Peach wrote: | mi sembra strano..
io attualmente sulla conf del server bridged (tpc) la route la imposto così:
Code: | push "route 192.168.1.0 255.255.255.0" |
sinceramente non ricordo bene l'opzione, forse dovrei darmi una letta al manuale... |
ho provato anche altre impostazioni.
ma la tua non mi può bastare, perché io uso come gateway il router 172.16.200.254, e come server vpn la macchina 172.16.200.128.
in ogni caso, con la tua impostazione ottengo questa tabella:
Code: |
s939 openvpn # cat server.conf |grep -v ^\; |grep -v ^$ |grep -v ^#
port 1194
proto udp
dev tap1
ca keys/ca.crt
cert keys/server.crt
key keys/server.key # This file should be kept secret
dh keys/dh1024.pem
ifconfig-pool-persist ipp.txt
server-bridge 172.16.200.254 255.255.255.0 172.16.200.10 172.16.200.50
push "route 172.16.200.0 255.255.255.0"
push "redirect-gateway"
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
|
Code: |
aula-insegnanti:/live/image/openvpn# route -en
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
172.16.199.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
172.16.200.0 172.16.200.254 255.255.255.0 UG 0 0 0 tap0
172.16.200.0 0.0.0.0 255.255.255.0 U 0 0 0 tap0
|
ed è un disastro anche peggiore. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
 |
cloc3 Advocate


Joined: 13 Jan 2004 Posts: 4815 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Sat Nov 01, 2008 8:57 am Post subject: |
|
|
Code: |
push "route 0.0.0.0 0.0.0.0 172.16.200.254"
|
e sono a cavallo. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
 |
|