I have a problem and cannot solve it. Would be great to get help from you guys.

I have following setup: LAN where server located: OpenVPN server (on a raspery PI): OpenVPN client got IP address:

Now I want to ping (actually ssh) from a computer (Windows) with IP in same LAN as VPN server to the OpenVPN client with address

I can't get it work. Do you have any suggestions?

Thanks already in advance

  • Is IP forwarding enabled? – markzz Feb 6 at 21:15
  • Yes ip forwarding is enabled – Rufio Feb 7 at 16:48

More than likely, IP forwarding is disabled (as is default). You can enable it by following the directions here: http://www.ducea.com/2006/08/01/how-to-enable-ip-forwarding-in-linux/

If IP forwarding is enabled, then check your firewalls on Windows, the OpenVPN server, and the host on the network. Make sure the Pi is set to allow forwards from the two networks in its firewall.


Since this is a probable configuration issue, you will need to make sure the routes are announced.

In your server.conf, you will need the following:

push "route"


client-config-dir /etc/openvpn/server/ccd

Then create the directory, /etc/openvpn/server/ccd, and then create a file with the name of the common name of the certificate of the server. So if the server's certificate's common name is foo, then create the file /etc/openvpn/server/ccd/foo and put in the following:


Then restart both the server and all clients.

  • IP forwarding has already been enabled. All other things you mentioned shouldn't be the problem because exchanging my old router with the current one, everything worked fine (some years ago I changed the routing table from old router but new router does not allow that). Could it be that the following is the problem: with new router the VPN Server's LAN is and the local LAN from VPN client is as well? With the old router the VPN Server's LAN was – Rufio Feb 6 at 21:42
  • I also assumed you configured OpenVPN correctly, did you push the routes with the server's configuration? – markzz Feb 7 at 14:55
  • I added following lines: push "route" , push "route", push "route " could the problem be that on both sides the local LAN has the same IP? – Rufio Feb 7 at 16:54
  • You should also have a line that has something along the lines of client-config-dir /etc/openvpn/server/ccd that in the specified directory is a couple of iroute lines. – markzz Feb 7 at 17:23
  • Edited answer to explain configuration... – markzz Feb 7 at 17:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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