I've been trying to solve the following task for almost a week now, but unfortunately I don't think I have proper skills to solve it the best way.
I need to setup a following network:
192.168.2.1 <----------> 192.168.2.20
^
|
|
|
|
v
192.168.1.1 <----------> 192.168.1.10
Where 2.1 and 1.1 are two separate interfaces of "Router" (Ubuntu 16.04) & 2.20 and 1.10 are two separate interfaces of "Client" (Ubuntu 17.04).
Unfortunately I can't even make ping work. Routing table on client:
192.168.1.1 dev eth1
192.168.1.10 via 192.168.2.1 dev eth2
192.168.2.20 via 192.168.1.1 dev eth1
192.168.2.1 dev eth2
On "Router", net.ipv4.ip_forward=1. When I use tcpdump on 1.10 to ping 2.20, 2.20 can see incoming Request, but doesn't send response.
I also tried to setup nginx on 2.20 and use wget binded to 1.10 to ask for webpage on 2.20. It works, however I don't see anything on tcpdump on 1.10, so I assume that request didn't even leave network card.
I have 2 questions:
1) What's wrong with my configuration?
2) What's the best way to solve this task?
ip route show table local- this is where the routes reside that cause the traffic to flow this way. I failed it get it working at the time and gave up, however! – Mintra Nov 20 '17 at 09:32