Hello, i have 2 windows 2012 hosts with openvpn.
1 server and 1 client.
client connexion is ok.
i'm using "ip forwarding" on these 2 hosts but i got some routing problems with machines on each lan.
<-------------------------- site 1 --------------------------> <--------------------------- site 2 ---------------------------->
host 1 openvpn server openvpn client host 2
172.22.0.253 lan : 172.22.1.20 lan : 172.22.200.2 172.22.200.50
mask 255.255.240.0 mask 255.255.240.0 mask 255.255.255.0 mask 255.255.255.0
tap : 10.8.0.1 tap : 10.8.0.200
host 1 have a route for 10.8.0.0 set to 172.22.1.20 (openvpn server) : route add 10.8.0.0 mask 255.255.255.0 172.22.1.20
host 2 have his default route set to 172.22.200.2 (openvpn client)
ping from openvpn client to 10.8.0.1 : OK
ping from openvpn server to 10.8.0.200 : OK
ping from openvpn client to 172.22.1.20 : OK (i'm using for openvpn client : push "route 172.22.0.0 255.255.240.0 10.8.0.1")
ping from openvpn client to host 1 : OK
ping from openvpn server to 172.22.200.2 : NOK !
ping from openvpn server to 172.22.200.50 : NOK !
ping from host 1 to 10.8.0.1 : OK
ping from host 1 to 10.8.0.200 : OK
ping from host 1 to 172.22.200.2 : NOK !
ping from host 1 to host 2 : NOK !
ping from host 2 to 10.8.0.200 : NOK!
ping from host 2 to 10.8.0.1 : NOK !
ping from host 2 to 172.22.1.20 : NOK !
ping from host 2 to host 1 : NOK !
my priority is to make the 2 lans to communicate to each other with their own ips.
server config :
dev tun
dev-node tap-routing
mode server
ifconfig 10.8.0.1 255.255.255.0
topology subnet
push "topology subnet"
ifconfig-pool 10.8.0.201 10.8.0.254 255.255.255.0
route 172.22.200.0 255.255.255.0 <- got an error here when i start server, need to had the gateway 10.8.0.1 or route-gateway 10.8.0.1
and for my client :
ifconfig-push 10.8.0.200 255.255.255.0
push "route 172.22.0.0 255.255.240.0 10.8.0.1"
iroute 172.22.200.0 255.255.255.0
client config :
dev tun
client
I have read
http://openvpn.net/index.php/open-source/documentation/howto.html#scope
I tried windows and ubuntu.