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.

transfer all sites to new ip

Discussion in 'General Discussion' started by rich2, Nov 5, 2002.

  1. rich2

    rich2 Well-Known Member

    Joined:
    Apr 9, 2002
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    we are losing some IP's on our server and need to transfer all our named-based sites to a new IP

    What would be the BEST way to go about this?

    Just looking for some advice before we go about this.

    My guess would be, make all accounts under 1 reseller, change that resellers named-based ip use to the IP we are moving to... will that change everyone over? zone files and apache records??


    anyone know? am i on the right track?
     
  2. rich2

    rich2 Well-Known Member

    Joined:
    Apr 9, 2002
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    *bump*

    really need this one answered :(
     
  3. thomas

    thomas Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    [quote:65a1c915f1][i:65a1c915f1]Originally posted by rich2[/i:65a1c915f1]
    ...make all accounts under 1 reseller, change that resellers named-based ip use to the IP we are moving to... will that change everyone over? zone files and apache records??
    [/quote:65a1c915f1]

    No it won't.

    Easiest way would be search and replace.

    In a ssh session, try this:

    cd /var/named/

    perl -p -i -e 's/oldip/newip/gi' * (example: perl -p -i -e 's/10.10.10.10/20.20.20.20/gi' *)

    cd /etc/httpd/conf/

    perl -p -i -e 's/oldip/newip/gi' httpd.conf (example: perl -p -i -e 's/10.10.10.10/20.20.20.20/gi' httpd.conf)

    And restart bind and apache.

    This should do the trick, I take no responsibility though, do at your own risk.
     
  4. rich2

    rich2 Well-Known Member

    Joined:
    Apr 9, 2002
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    thanx, i am gonna test this i think on a dummy server and some records before taking it on the production server
     
  5. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    Just to add - You also need to do this in
    /var/cpanel/users

    This is were the package info for each domain is held and it does contain the ip's as well.
     
  6. rich2

    rich2 Well-Known Member

    Joined:
    Apr 9, 2002
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    thanx
     
  7. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    16
    [quote:fb410ac8f4][i:fb410ac8f4]Originally posted by dgbaker[/i:fb410ac8f4]

    Just to add - You also need to do this in
    /var/cpanel/users

    This is were the package info for each domain is held and it does contain the ip's as well.
    [/quote:fb410ac8f4]Are you sure? This is new to me.
     
  8. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    [quote:65fa3006c6][i:65fa3006c6]Originally posted by moronhead[/i:65fa3006c6]

    [quote:65fa3006c6][i:65fa3006c6]Originally posted by dgbaker[/i:65fa3006c6]

    Just to add - You also need to do this in
    /var/cpanel/users

    This is were the package info for each domain is held and it does contain the ip's as well.
    [/quote:65fa3006c6]Are you sure? This is new to me.[/quote:65fa3006c6]

    Yep, just looked at one of mine. And the IP is listed.
     
  9. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    16
    I know about the package info but I can't see any IPs in those files.
     
  10. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    Nick told me that the IP field in the users' data files is deprecated. In fact when you change an account's IP from WHM that doesn't change at all.
     
  11. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    Really? I wasn't aware that. Thanks for the info. Do you know with which release that was changed?
     
  12. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    I don't know, see here:
    http://web.cpanel.net/bugzilla/show_bug.cgi?id=711
     
Loading...

Share This Page