pepi0
Hello,
I'm facing an issue to reach a subnet i've in my private network. Currently OpenVPN server is running on an Ubuntu installed on a Hyper-V machine.
Ubuntu server have 3 network adapters as follow:
Eth0 - 192.168.1.0/24
Eth1 - 192.168.2.0/24
Tun0 - 10.8.0.0/24
on OpenVPN server push-routes is set correctly, from the client (windows 10 machine) i can ping the Ubuntu server using the address bind to the ETH1 interface of the server, however i cannot ping / reach others servers from this subnet (ETH1).
I've checked routes on both (server and client) they're added correctly.
Firewall doesn't show blocked packages
From the ubuntu server i can ping other computers of the 192.168.2.0 network, so the sever is able to reach and visible on this network.
Any idea why clients are not able to reach computers of this network?
thanks in advance.
TinCanTech
All the machines in the 192.168.2.0/24 subnet need a static route to the VPN subnet 10.8.0.0/24 ..
pepi0
Hello,
if i check the client, once i connect to the VPN server push correctly the routes, below routes from W10 machine connected to VPN:
192.168.1.0 255.255.255.0 10.8.0.5 10.8.0.6 20
192.168.2.0 255.255.255.0 10.8.0.5 10.8.0.6 20
in fact i can ping the VPN server using 192.168.2.0/24 range (in both ranges server is reachable) however, if i want to ping any other machine within the range 192.168.2.0 i cannot reach them.
Server Route table:
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
10.8.0.2 * 255.255.255.255 UH 0 0 0 tun0
172.17.0.0 * 255.255.0.0 U 0 0 0 docker0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth1
by static route added what do you mean TinCanTeh? should i add the route instead of let the OpenVPN get from the config?
pepi0
i forgot to add, there is other machine whit the route to the VPN network added but as well is not reachable
pepi0
Any idea about the root cause?
TinCanTech
You must add routes to the machines outside of the VPN manually because Openvpn cannot manage their routing tables.
pepi0
Hello TinCanTech, i understand that and i did it already, i've a other Ubuntu server, with two adapters as well, (basically same network configuration as OpenVPN server) in terms of subnets, i added the same route of the VPN IP but still doesn't work.
looks like from the Server OpenVPN clients cannot reach others computers on the Eth1, only the own server.
TinCanTech
Have you enabled IP Forwarding ?
pepi0
Yes, ipv4 forwarding it's enabled, i can reach from the VPN net any pc on ETH0 subnet