How to redirect HTTP traffic to new server using iptables ?

Redirect HTTP traffic to new server using iptables .

  1. Bhawani Singh
    In this article we will learn to redirect HTTP traffic from old server to new server. If you want redirect all traffic from the old server's HTTP port to new server with a different IP.

    First of all we can assume you have a server with interface name as "host1", and destination IP on which you want to redirect it is "175.25.6.89".

    Like:
    Old server interface name : host1
    Destination IP : 175.25.6.89
    Service : Apache(port 80 and 443)

    Now, you can do redirection by running the below given commands :