Networking – Port Forwarding Does Not Work with a Dual-Network Device

I have a home NAS with a dual LAN cable connected to two different subnets.

    - lan1: 192.168.31.185 on the 192.168.31.0/24 subnet
- lan2: 192.168.10.42 on the 192.168.10.0/24 subnet

And on this NAS server, there is a web service exposing the port 5001 that I want to access from my office.

As a 192.168.10.0/24 subnet gateway router, you have access to the Internet. I have configured DDNS and the port forwarding rules on it.

    - port forwarding rule: ddns-domain.com:5001 -> 192.168.10.42:5001

But the tests showed that it did not work … Debugging started

There is a PC with the address 192.168.10.38 on the same subnet 192.168.10.0/24.

  1. Try to access 192.168.10.42:5001 from the PC and gateway router, works well

  2. Configure a demo web service on the PC: 5001, change the port forwarding rule: ddns-domain.com:5001 -> PC: 5001, access from my 4G mobile network, works well

I am confused after this because I thought that port forwarding is a kind of special reverse proxy. What should work if:

    - the resource provider is accessible from the proxy
- the proxy is accessible from its own network address

Which both confirmed ok in the debugging process before. So, what should I look into to find the problem then?