Sunday, July 8, 2012

iptables redirect port

Sometimes you may want to allow users access certain ports. To do so run the following command:

iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000

This will allow all HTTP (80) traffic to be redirected to port 3000.

No comments:

Post a Comment