The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect requests from old IP?

Discussion in 'Bind / DNS / Nameserver Issues' started by postcd, Oct 29, 2016.

Tags:
  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    653
    Likes Received:
    11
    Trophy Points:
    68
    Hello,

    when i move some cPanel to another IP ("Change Site's IP" function in WHM) and open that cPanel website in web browser, site is no longer found on the IP so it shows my server website.

    I can change nameservers of the domain for which i just changed IP. But in the meantime, how i can redirect website request of this moved cPanel from old IP to new IP so website has zero downtime?

    Thank You
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    653
    Likes Received:
    11
    Trophy Points:
    68
    Thanks for reminder to decrease TTL value of the DNS zone records. There is some tutorial on how to do it in bulk. One have to google it.

    So it seems WHM does not have any option to do this IP redirect, so what about firewall way?
    debuntu.org/how-to-redirecting-network-traffic-to-a-new-ip-using-iptables/
    stackoverflow.com/questions/261807/is-it-possible-to-forward-all-traffic-to-an-ip-address

    Anyone tried it and found it working? Only port 80 forwarding or other ports like nameserver 53 port?
     
    #3 postcd, Nov 5, 2016
    Last edited by a moderator: Nov 5, 2016
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    You are welcome to try using those custom workarounds, but note they are unsupported in cPanel. Reducing the TTL values and ensuring the browser/DNS caches are cleared on the local systems are the best techniques to avoid downtime after switching the IP address.

    Thank you.
     
Loading...

Share This Page