Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Renumbering IPs on a Cpanel server

Discussion in 'General Discussion' started by bert, Feb 15, 2002.

  1. bert

    bert Well-Known Member

    Joined:
    Aug 21, 2001
    Messages:
    602
    Likes Received:
    0
    Trophy Points:
    316
    Hello,

    We need to renumber all the IPs on 2 Cpanel servers. One of them is our primary DNS server.

    Any suggestions on how to do it? Will changing the IP for eth0 and then changing the IPs for the account in /etc/httpd/conf/httpd.conf and in /etc/proftpd/proftpd.conf do the trick? Is there anything else I need to know?

    Thanks very much, your comments, recommendations, etc are highly appreciated.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cbingham

    cbingham Active Member

    Joined:
    Aug 14, 2001
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    306
    Location:
    Vancouver, BC, Canada
    Same Question

    I asked the same question the other day and didn't get much of a response.

    EVERYONE: This is an important matter. We need your help. Please respond with any information you have.

    Thanks in advance....
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. bert

    bert Well-Known Member

    Joined:
    Aug 21, 2001
    Messages:
    602
    Likes Received:
    0
    Trophy Points:
    316
    Yes indeed. No one appears to want to give us pointers here :(
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. feanor

    feanor Well-Known Member

    Joined:
    Aug 13, 2001
    Messages:
    836
    Likes Received:
    0
    Trophy Points:
    316
    You should be able to script this-
    Have something crunch /etc/proftpd.conf , /etc/httpd/conf/httpd.conf , /var/named , and... hmmm, those are the only areas that I can think of that are connecting to services that bank on IPs in their configuration....
    get a script that opens those files, does a search/replace against a flat text file of your incoming (new) IPs, and swaps the old for the new.

    You'll need to pay attention to /etc/hosts , your cpanel licensing config because eth0 will be changing.... otherwise, I think you nearly have everything covered.


    Make sure your base hostname is still resolving correctly to the base IP (eth0), whatever it is changing to!

    g00d luck
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. bert

    bert Well-Known Member

    Joined:
    Aug 21, 2001
    Messages:
    602
    Likes Received:
    0
    Trophy Points:
    316
    Thanks very much feanor. I guess you are the only good samaritan aroud here, with the exception of Nick, of course ;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    316
    Bert, did you have to change anything else in addition to what Feanor suggested when you had to renumber your IPs? I'll be doing the same early next week and I'd appreciate your input.
     
  7. bert

    bert Well-Known Member

    Joined:
    Aug 21, 2001
    Messages:
    602
    Likes Received:
    0
    Trophy Points:
    316
    Ni moronhead. Just follow these steps and you will be fine guaranteed :p


    1. Change /etc/ips to the new IPs. The new eth0 address should not be included in this file.

    2. Change eth0 to new system IP, subnet and router address.

    4. Change IPs in /etc/httpd/conf/httpd.conf

    5. Change IPs in /etc/proftpd.conf

    6. Run the following commands:
    /scripts/updatedomainips
    /scripts/updateuserdomains
    /scripts/ftpupdate
    /scripts/rebuildipaddrpool

    7. Edit /etc/wwwacct.conf to switch the old eth0 for the new

    8. Change IP inside of /etc/hosts

    9. Adjust /etc/resolv.conf

    10. Run /usr/local/cpanel/cpkeyclt

    11. Restart all services or reboot
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    316
    Thanks, that's extremely helpful. I had a sneaky feeling that there was more to renumbering IPs than just replacing them in httpd and proftpd.

    Did you have to change the IPs in the DNS records manually?
     
  9. bert

    bert Well-Known Member

    Joined:
    Aug 21, 2001
    Messages:
    602
    Likes Received:
    0
    Trophy Points:
    316
    Yes indeed. The DNS records I changed manually. ;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    316
    Bert, thanks again.

    I'll try to write a script to replace the IPs in /var/named and httpd.conf as Feanor suggested. If the script works correctly I'll post it on here if needed.
     
  11. bert

    bert Well-Known Member

    Joined:
    Aug 21, 2001
    Messages:
    602
    Likes Received:
    0
    Trophy Points:
    316
    Cool :p
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice