I have a problem where I have an office LAN and a colo network. The colo has a linux box that's acting as a router/VPN. I also have an office machine that's acting as a VPN client.

The way it looks is the following:

Office has two interfaces,

eth0 on netmask
tun0 is a P-t-P interface that looks something like: inet addr: P-t-P:

Now the linux box at the colo has no problem reaching the machine via its address. What I'm trying to do is get it to reach the network which I can't do because I don't have a subnet on the VPN that's part of So I tried doing something such as the following:

# route add -host gw
SIOCADDRT: Network is unreachable

I'd just like to be able to get a route directly to from box at the colo(the VPN). Is what I'm trying to do rationale/possible?

  • It sounds like you want 1 box at the colo to be able to reach the entire office subnet - is that right? Or do you want a full bridge (any office system able to reach any colo system and vice-versa)? – baumgart Sep 4 '09 at 19:54
  • baumgart: either one would work. If the one box at the colo can reach the office subnet, or at least that one particular box -- then I can have all other clients go through the colo box to reach the office. – imaginative Sep 4 '09 at 19:58
  • Does the box at have ipv4.forwarding enabled? – 3dinfluence Sep 4 '09 at 19:59
  • 3dinfluence: It was off before but I enabled it, net.ipv4.conf.tun0.forwarding = 1 – imaginative Sep 4 '09 at 20:06
  • I always check that first if someone says they can connect to the VPN and can ping the other end of the tunnel but can't get to the rest of the network behind that tunnel. I take it though that enabling that didn't solve your issue? I'm guessing that the needs to have a route back to your host/network in it's routing table as well. – 3dinfluence Sep 4 '09 at 20:12

Try this instead:

route add -host gw dev tun0

But in any case this should be handled by your vpn config. You shouldn't need to do this manually. What vpn are you using?


If you post your openvpn configurations, output of ifconfig and ip ro ( on both boxes ) i will be able to sort it out pretty quick.

The problem might be you're not pushing the right routes through the vpn, or that you misconfigured something else. There's a wide range of potential reasons, and asking them one by one and waiting for an answer would take too much time.

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.