I have an OpenWRT router.
What I need to achieve is a port redirection within my LAN zone. What I mean is, every time I hit local address on port 40413 it should to be redirected to 192.168.1.111:443
For example. if I put in browser: https://192.168.1.111:40443 it should point to 192.168.1.111:443 That's pretty easy with plain iptable rule:
iptables -t nat -A PREROUTING -i br-lan -p tcp --dport 40443 -j REDIRECT --to-port 443
I tried to it into /etc/firewall.user but no effect...
I also tried with rule main firewall config: /etc/config/firewall
config redirect option name 'owncloud_internal' option src 'lan' option proto 'tcp' option src_dport '40443' option dest_ip '192.168.1.111' option dest_port '443' option target 'DNAT' option dest 'lan'
But still no effect.
Can someone explain how to approach this problem?