I’m new to using Linux and I understand that this question is most likely stupid, but I just can’t figure out: How to redirect traffic from one port to another port in IPTABLES.
The web interface of my application runs on a non-standard port and I don’t understand how I can redirect packets from the standard HTTP(80) port to my non-standard port.
Please don’t swear too much 🙂
Thank you!
I try this:
sudo iptables -t nat -A -p tcp --dport 80 -j REDIRECT --to-port {my_port }
But for some reason this doesn’t work.
New contributor
Iyan Frazer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.