I've found several related questions, but none of them seem to be solving my particular problem.
I have a server at 10.a.b.1
, and another server at 10.c.d.2
. We're in AWS EC2 classic with no control over internal IPs, so the middle octets are different but irrelevant.
Server 2 runs OpenVPN and knows about another network, 10.10.10.0/24
. I would like server 1 to be able to reach this network, which will mean updating the routes on server 1 and on the relevant servers on the other network.
In other words, server 1 should send 10.10.10.0/24 traffic to server 2, and servers on the other network should send 10.a.b.1 traffic to server 2. I'm not sure whether server 2 needs any changes, possibly IP forwarding or iptables to actually forward the traffic.
Right now, I'm stuck at server 1:
server1$ ip route add 10.10.10.0/24 via 10.c.d.2 dev eth0
Unfortunately, this fails with: RTNETLINK answers: Network is unreachable
.
I can successfully ping and traceroute from server 1 to server 2 at 10.c.d.2, so I'm stumped on why I'm unable to add this route?
10.10.10.0
must be in the same subnet as 10.c.d.2. Ideally, c and d need to be 10. Anything other than that, and you'll need to insert a bridge between 10.c.d.2 and 10.10.10.0/24.10.10.10.0
definitely is not in the same subnet as 10.c.d.2. Can you share a link or SO writeup on how to set up a bridge? Also, why is it necessary? I can already reach server 2, why can't I route any traffic I want to it?