I have a WRT54GL home router and I want requests coming to the router public IP address on port 97 to be redirected to an external IP and port, for example 22.214.171.124 (google.com) and port 80.
The external interface of the router is called
iptables -t nat -A PREROUTING -d <router_ip> -i vlan1 -p tcp -m tcp --dport 97 -j DNAT --to-destination 126.96.36.199:80, but it doesn't work.
How can I do this? Also, how can I see if this rule is active?
iptables -L doesn't seem to list it.
I managed to solve my problem using
rinetd on my computer (which is in DMZ) with the following rule in it's config:
# bindaddress bindport connectaddress connectport 0.0.0.0 97 188.8.131.52 80
but I would like to do the redirect in the router.