Example of using iptables rules to redirect port 80 to 8181
search cancel

Example of using iptables rules to redirect port 80 to 8181

book

Article ID: 10762

calendar_today

Updated On:

Products

CA Infrastructure Management CA Performance Management - Usage and Administration

Issue/Introduction

Example of using iptables rules to redirect port 80 to 8181



Environment

CA Performance Management NetOps Portal

Resolution

The following is an example of redirecting port 80 to 8181 using iptables:


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


Note that you should have a full understanding of the iptables firewall including any
exiting rules you have to ensure compatibility with your environment

Additional Information

iptables project page:

https://netfilter.org/projects/iptables/index.html