Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Here are these Linux and IP:

  • LinuxA: eth0, tun0
  • LinuxB: eth0, tun0
  • LinuxC: eth0
  • LinuxD: eth0

On LinuxA, I can ping to of LinuxB.

On LinuxB, I can ping to of LinuxA.

On LinuxA, I have enabled these:

/proc/sys/net/ipv4/ip_forward = 1
/proc/sys/net/ipv4/conf/tun0/forwarding = 1

On LinuxC, I add route as this:

route add -net netmask gw

And confirm LinuxC can ping to both and

On LinuxD, however, I get this error "SIOCADDRT: Network is unreachable" when execute the route add command used on LinuxC (Note, LinuxD can ping to

Please can someone help me on this route / gateway problem?

@dmourati, thanks for the reply. These 4 Linux are all in private network, though the 188.x.x.x IP are not of private IP range as per RFC (will be migrated soon).

share|improve this question

2 Answers 2

It appears that Linux D has only an RFC 1918 private address. Therefore, Linux D will not be able to reach directly.


I suggest putting all the servers into RFC 1918 address space or all on a public network. Once you have that sorted, revisit the tunnel/routing issue you raised initially.

share|improve this answer

LinuxD cannot connect to Linux C directly with that address. You could create a virtual interface on LinuxC and LinuxD as part of the same /30 subnet and pass the traffic over that. You would need another route on each device that needed to communicate with it.

There seems like there's an easier way to do this, are they all on the same Layer2? Could you possibly just create virtual devices on each and put them on the same network? If you're attempting to use the TUN adapters as virtual's off a physical you're better off using eth0:0 eth0:1 adapters.

share|improve this answer

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.