So I have 2 LANs, #1 is 192.168.3.0/24 and #2 is 10.0.0.0/8.
Both LANs have their respective routers 192.168.3.1 & 10.0.0.1.
Some machines are set to obtain address via DHCP, some are statically configured.
The task I need to accomplish is to route traffic (VNC & HTTP) from machines on LAN 1 to the specific machines on LAN 2. Target machines have IPs statically assigned (ex: 10.0.0.101).
To acomplish this I picked an old D-Link DIR-615 rev. I1, freshly flashed it with
LEDE Reboot 17.01.2 r3435-65eec8bd5f / LuCI lede-17.01 branch (git-17.152.82987-7f6fc16)
Now the setup I have is:
DIR-615
-- WAN ip is set to static 192.168.3.3/24 (known to be out of DHCP scope on LAN #1)
-- LAN device IP is set to 10.0.0.2/8 (known to be out of DHCP scope on LAN #2)
WAN ethernet is connected to the switch for LAN #1
LAN ethernet is connected to the switch for LAN #2
Port forwarding For the test is set to route all traffic from WAN port 8080 to the 10.0.0.101:8080.
(Initially I was planning to make few different port mappings to hit different machines, ex: 192.168.3.3:8081 => 10.0.0.102:8080; 192.168.3.3:8082 => 10.0.0.103:8080 and so on.)
The problem is, when DIR-615 is not a DHCP server in LAN #2 the port forwarding does not work.
If I enable DHCP on DIR-615, and my machine gets 10.0.0.101 assiged by DIR-615 DHCP everything is working perfectly fine.
I also though it could be that DIR-615 does not have ARP record for 10.0.0.101/8 if it doesn't hand out IPs, so I
- added
00:9a:d2:c3:4d:72 10.0.0.101
to the /etc/ethers
and I added
sleep 30
post-up arp -f /etc/ethers
to the startup script on the DIR-615 UI. - Connected test machine to the DIR-615 LAN ethernet directly.
I can see in the logs the /etc/ethers gets picked up, DIR-615 can easily ping 10.0.0.101/8
But port forwardinag does not work.
What am I missing to make it work?
(I don't mess with networking on my job much, so sorry if this is a dumb question)