I would have a question related to iptables.
I would like to make a forwarding rule on my router (with iptables) to accomplish the following:
If an internet host (w.x.y.z) accesses the Internet IP of my router on a specified port (a.b.c.d:10000), the traffic should be forwarded to an Internet address on a specific port (e.f.g.h:2500).
The rule will be set on an asus wl500gp router with dd-wrt v24 sp1 firmware.
The Internet facing interface is ppp0.
The traffic should go through the router and the packets sent to the destination (e.f.g.h:2500) should have as source address, the Internet IP of my router (from ppp0).
If possible, I would like to be able to limit the accepted connections based on a list of known IPs.
w.x.y.z is the IP address of the host in Internet that tries to initiate the connection
a.b.c.d is the public IP address of the router
e.f.g.h is the destination IP address to which the traffic will be forwarded.
I tried to search on this topic, but I only found articles that cover port forwarding in NAT environments and in this scenario, the forward is to Internet too. I have beginner to medium knowledge of linux OS.
Do you know how this can be accomplished?
Please let me know if you need more information from my side.
Thank you in advance!