I've recently switch my router firmware from Tomato to OpenWRT. I had the iptable commands below which would intercept http requests to an internal ip (192.168.1.254) on port 80 and redirect to a different internal ip (192.168.1.133) on port 8082.
This configuration is not working working on OpenWRT. I've entered it in the Firewall - Custom Rules section.
iptables -t nat -I PREROUTING -p tcp -d 192.168.1.254 --dport 80 -j DNAT --to-destination 192.168.1.133:8082
iptables -t nat -I POSTROUTING -p tcp --dport 80 -j MASQUERADE
I've read up quite a bit but most guides are how to set up WAN port forwarding. I've been at it for hours and have had to boot OpenWRT into failsafe mode a few times. I would be grateful for any help.
Additional details:
- I had these commands working on the Tomato router
- both IPs are PING-able from inside the network
- target IP & port (192.168.1.133:8082) serves content when hit directly
- both IPs are PING-able from inside the network