Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 10.16.1.15 netmask 255.255.255.0
tun0 is a P-t-P interface that looks something like: inet addr:10.8.13.6 P-t-P:10.8.13.5

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

# route add -host 10.16.1.5 gw 10.8.13.6
SIOCADDRT: Network is unreachable

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

share|improve this question
    
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 10.8.13.6 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 10.8.13.6 needs to have a route back to your host/network in it's routing table as well. –  3dinfluence Sep 4 '09 at 20:12

2 Answers 2

Try this instead:

route add -host 10.16.1.5 gw 10.8.13.6 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?

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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