Simple IPTables port redirection.

To redirect a single port with IPTables:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 123 -j REDIRECT --to-port 124

This example redirects TCP port 123 to port 124. It can also be used for UDP.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

July 28th, 2008
By Joe | filed under Firewall, Network |