0

I have a VPS running a ubuntu 18.04 I have setup pritunl server.

On this VPS I have as well 2 clients from others VPN.

netstat -rn

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         93.XXX.96.1     0.0.0.0         UG        0 0          0 ens3
10.29.0.0       0.0.0.0         255.255.255.0   U         0 0          0 tun1
93.XXX.96.0     0.0.0.0         255.255.255.0   U         0 0          0 ens3
192.168.58.0    0.0.0.0         255.255.255.0   U         0 0          0 tun2
192.168.60.0    0.0.0.0         255.255.255.0   U         0 0          0 tun3

When I use a vpn client from this vpn server (client 192.168.58.X) I can't ping 10.29.0.XXX

How can I do, when I have a vpn client (from 192.168.58.X) ping others subnet Ip's? like 10.29.0.XXX or 192.168.60.X

0

You should add the routes on the vpn client side to these additional networks via your vpn server. Because the pritunl is an addon over openvpn, you can use the openvpn mechanics to push the routes to client side. Something like that:

push "route 10.29.0.0 255.255.255.0"
push "route 192.168.58.0 255.255.255.0"
push "route 192.168.60.0 255.255.255.0"

Consult the pritunl documentation about the way to do it.

Also you can add corresponded routes manually on the client side without edit of the server configuration. Use the ip route command on the linux client hosts and route in other OS.

If you use the openvpn on the client hosts, you can edit the openvpn configuration file to add the routes after the vpn tunnel brings up.

route 10.20.0.0 255.255.255.0
route 192.168.58.0 255.255.255.0
route 192.168.60.0 255.255.255.0
4
  • I add to the vpn client .ovpn and didn't worked – plopes May 24 '19 at 12:40
  • These options are server side, On the client side you should use just route ... options without push. – Anton Danilov May 24 '19 at 12:42
  • Ok, cause on Pritunl (openvpn gui server) only appear to add route - network address with subnet to route – plopes May 24 '19 at 12:48
  • didn't worked... – plopes May 24 '19 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.