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.

problem in sending data with second ip

Discussion in 'General Discussion' started by LAZer, Aug 30, 2015.

  1. LAZer

    LAZer Well-Known Member

    Joined:
    Jan 18, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    at net :D
    Hi , my server (vps ) had a main ip of 15, then because of a change I had to change the main ip of the vps to 106.
    then after changing the license and having the ping of this new ip , I did service network restart , and service ipaliases restart.
    cpanel added the old ip to the network and the ping of the old IP returned and websites on the old ip started functioning.

    now I have a problem with bank gateways, I have some bank gatewats on the old IP , and it seems that server is using the new IP to send the invoice form data to the bank gateway.
    in cpanel user host , the old ip is shown for shared IP and it seems to be ok.
    also in phpinfo on that domains/hosts , the SERVER_ADDR , is showing as the old IP as I need. but why is it sending the data to bank gateways from main server ip and not the old ip?

    should I add any specific route or something for example to have the output data from this site to the bankgatwway using the old ip?
     
  2. LAZer

    LAZer Well-Known Member

    Joined:
    Jan 18, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    at net :D
    Hi , I found the solution in this link :
    by default cpanel adds the second ip with subinterfaces which is a method of adding additional IP addresses.
    eth0:cp1 , and to change the outbound default ip I used this tutorial :
    http://www.anova.be/blog/controlling-which-outbound-ip-use

    from console I executed this commands :
    ip route del default
    ip route add dev eth0 default <gateway ip 254> src <old ip 15>
    so now for outbound instead of having default new main ip 106 , I have the old 15.

    and then continued the tutorial to make this default ip changing permanent. :) thanks to the writer of that gr8 tutorial "Joris".
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page