Here are these Linux and IP:
- LinuxA: eth0 188.8.131.52, tun0 10.0.0.1
- LinuxB: eth0 184.108.40.206, tun0 10.0.0.2
- LinuxC: eth0 220.127.116.11
- 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 18.104.22.168
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 22.214.171.124).
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).