0

I'm trying to redirect a traffic that goes to a certain port - to another port. I've read how to do it with iptables, but my system is using firewalld. Here what I have for iptables:

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 10080

And here is what I think is the equivalent for firewalld:

firewall-cmd  --add-forward-port=80:proto=tcp:toport=10080

Is this this the correct way ?

1 Answer 1

1
$ sudo firewall-cmd --permanent --add-forward-port=port=80:proto=tcp:toport=10080
$ sudo firewall-cmd --reload

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .