Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having issues routing traffic thru VPN.

Here's my setup

I have 3 hosts, let's call them A, B and Z

B and Z have a VPN connection in the 10.10.10.x SUBNET A and B have a direct connection in the 10.10.12.x SUBNET

I want to be able to route traffic from A to Z, like :

A <= [LAN] => B <= [VPN] => Z

On host B, i have set up ip_forwarding : net.ipv4.ip_forward = 1

and routing on host B:

[root@hostB: ~]# ip route dev ppp0  proto kernel  scope link  src dev eth1  proto kernel  scope link  src dev ppp0  scope link dev eth1  scope link 

routing on host A:

[root@hostA: ~]# ip route via dev eth1 dev eth1  proto kernel  scope link  src dev eth1  scope link 
default via dev eth0

But still not able to ping from host A.

Any idea ? I'm pulling my hairs out.

share|improve this question
At first glance, theres no netmask for the route to, or Also please supply routing table for host Z, and ifconfigs (please ensure the IP addresses you paste are obfuscated) – Sirch Jun 18 '12 at 9:26
@Disco, please do not crosspost questions between Stack Overflow and Server Fault – Mike Pennington Jun 18 '12 at 11:00
Are you running iptables on any of the machines? – Ben Lessani - Sonassi Jun 20 '12 at 21:52
@Disco, have you solved the problem? What is the networking configuration on Z? – Mike Pennington Jun 25 '12 at 9:55

On Z, assuming is on ppp0:

route add -net netmask gw dev ppp0

This will give you a return route to A

share|improve this answer

Like mike said... You need two routes... On A ---> Z and viceversa... On Z ---> A.... If you miss just one of them, they won't be able to comunicate each other, because the packets don't know the route to go back to the source... So you need to do something like this on A and Z...

On Z route add -net netmask gw dev ppp0

On A route add -net netmask gw dev ppp0

Let us know!!!

share|improve this answer
Well; there's no ppp0 device on A; ppp0 is on B – Disco Jul 13 '12 at 14:47

Your Answer


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.