1. Internet ----- [ROUTER] ==== [LAN]
So obviously your router does NAT. Now letz take one example that one of your lan machines run some server that needs to receive the packets from the client. Letz assume the following setup:
Internet ----- a.b.c.d [ROUTER] 192.168.1.1======192.168.1.2:1234[LAN]
here, a.b.c.d is IP of your router's WAN interface. 192.168.1.1 is IP of router's LAN interface. 192.168.1.2 is ur LAN server's IP and the server is listening on port 1234.
Now, if a client needs to reach the server, he wud obviously connect to a.b.c.d:1234 (in case, the port on wihich the client connects and the port on which the server listens are same)
So your router does a DNAT now to re-direct the traffic to the LAN server
Code:
iptables -A -t nat PREROUTING -p <proto> --dport 1234 -j DNAT --to 192.168.1.2:1234
Till here, if I have misunderstood your problem, please correct me.