Here are these Linux and IP:
- LinuxA: eth0 188.9.5.2, tun0 10.0.0.1
- LinuxB: eth0 188.8.6.3, tun0 10.0.0.2
- LinuxC: eth0 188.9.7.4
- LinuxD: eth0 10.62.8.5
On LinuxA, I can ping to 10.0.0.2 of LinuxB.
On LinuxB, I can ping to 10.0.0.1 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 10.0.0.0 netmask 255.255.255.0 gw 188.9.5.2
And confirm LinuxC can ping to both 10.0.0.1 and 10.0.0.2
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 188.9.5.2).
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).