OpenVPN access to a private network

2

There are many similar topics about my issue, however I cannot figure out a solution for myself.

There are three hosts. A without a routable address but with an Internet access. Server S with a routable Internet address and host B behind NAT in a private network.

What I've managed to do is a OpenVPN connection between A and B via S. Everything works fine so far according to this manual VPN Setup

What I want to do is to connect A to Bs private network 10.A.B.x I tried this manual but had no luck.

So A has a vpn address 10.9.0.10, B's vpn address is 10.9.0.6 and B's private network is 10.20.20.0/24.

When at the Server I try to make a route to Bs private network like this

sudo route add 10.20.20.0 netmask 255.255.255.0 gw 10.9.0.6 dev tun0

it says "route: netmask 000000ff doesn't make sense with host route" but I don't know how to tell Server to look for a private network in a different way.

Do you know how can I make it right ?

Gior312

Posted 2012-02-28T17:41:46.013

Reputation: 121

What's the network and subnet mask on all three networks? I suspect that there is an overlap somewhere... – Jim G. – 2012-02-29T05:33:51.547

Answers

0

You also need to configure OpenVPN on the server so that it knows which client can route to which subnet; this guide looks pretty good.

mgorven

Posted 2012-02-28T17:41:46.013

Reputation: 2 539