CentOS 6.3 - Change From Single Private IP To Multiple Public IP Block
I'm using CentOS 6.3 and ISPConfig 3 and have been up and running on this particular server for several months.
Currently I use a single private IP: 192.168.2.xxx
I just bought a new block of 3 public IPs from my ISP: xxx.xxx.xxx.[xx0-xx2]
I've been scouring the forums trying to find out the best way to go about doing this and can only find vague details here and not necessarily for CentOS, so I'm going to create this thread both for asking questions on the right way to do this in ISPConfig, and also I will summarize it up for everyone (including myself for later) as an update to this initial post.
Note: I used 3 IPs, but this information is relevant to any type of IP change.
Here is what I have so far (Note: you can use system-config-network if you want, but I personally find it much easier to do manually. Also, system-config-network doesn't have a delete feature, so you'll have to do it manually anyway if you're consolidating IPs rather adding IPs):
Part I: Server IP Config
1.) Add a new line in /etc/hosts for each new IP address with the same server name as the current IP
This is where I'm a bit stuck. What all needs to be updated now? From this post I found (http://www.howtoforge.com/forums/showthread.php?t=26737) These seem to be the next steps to take:
1.) In CentOS there is no /root/ispconfig/httpd/conf/httpd.conf. Is this just the normal Apache httpd.conf file that is located in /etc/httpd/conf/httpd.conf or is this a separate file that needs to be modified?
2.) my /etc/httpd/conf/httpd.conf, /etc/postfix/main.cf and my /etc/pure-ftpd/pure-ftpd.conf (the CentOS guide doesn't use proftpd) don't have IP addresses in them, so I'm guessing this can be skipped in my case?
3.) Pure FTP doesn't seem to have includes to change. Is that a Pro FTP only thing?
4.) Changing the IP through the ISPConfig 3 interface is a little confusing too. I've added the IPs using System->Server IP Addresses but what do I do about System->Server Config->server1.mydomain.com? There is only room for one IP here, which IP do I use?
Additonally, the gateway and dns server IPs are not the one's I setup in the system... ever... They say:
So what do i do about these? Do I leave them alone? Do I change them to the Gateway & Nameservers for my new IP Block?
Can someone please shed some light on these 4 questions? I'm really confused and I would prefer not to break anything if I don't have to.
I did a bit of testing and a lot of waiting (For DNS cache to clear), but finally all sites are back up and using the new IP Block. First I'll answer my own questions from above, and then I'll write out the steps for Part II.
1.) In CentOS there is no /root/ispconfig/httpd/conf/httpd.conf so I checked /etc/httpd/conf/httpd.conf but there was no IPs listed so I left it alone.
2.) I checked all of these configuration files but there were no IPs listed so I left them alone too.
3.) The "be sure to modify the includes too" doesn't apply to PureFTP apparently, just ProFTP so I skipped this step as well
4.) This took some testing. I used the main IP from eth0 here and not any of the aliases. I then filled in the netmask, gateway, and nameservers from eth0 here as well but then nothing was loading so I put the netmask, gateway and name servers back to what they were but left the new IP, though looking back, it may have been just the DNS cache hadn't cleared for my sites yet.
So in conclusion, here are the steps I for completing the IP change and/or adding multiple IPs:
Part II: Service IP Config
1.) Check your config files for anywhere that the old IP may be hanging around, though I followed the Perfect Server Guide for CentOS 6.3 and I didn't have to edit any of these. You should still check to be sure though:
System->Server IP Addresses - ALL IPs
System->Server Config->server1.mydomain.com - ONLY set the MAIN IP (whatever you used in eth0)
(NOTE: I'm not sure if you can set the netmask, gateway, or nameservers on teh System->Server Config->server1.mydomain.com form or not, it didn't seem to be working so I changed it back except for the new IP. This could have just been because I hadn't written step 5 yet...)
3.) Open your sites one by one in ISPConfig and then save them. (Note: I also opened each of my alias domains and saved those, but I don't think that was required)
4.) Update your nameservers. I use external nameservers still, so I changed the zone files there to point to my new IPs for all of my sites.
5.) BE PATIENT! I was questioning whether what I did actually worked, but I was able to login to ISPConfig interface using any of the IP's. Slowly the sites began to work over the next 4 hours. It may have been 2-3 hours for me, I spent the last two watching American Idol and the beginning of Green Lantern so I don't know exactly, but after 4 hours they were definitely all back up. I'm pretty sure it can be up to 48 hours sometimes, so I guess I'm lucky here that it was only 2-4 hours.
I hope you've all enjoyed my tale of how the little IP grew up to become a big block of 3 IP's and that you found at least one thing in here helpful somehow or other. :cool:
You dont have to set the gateway or nameservers of the additional IP block.
You posted this just as I was adding my update to my original post.
The information I was referring to was from: http://www.howtoforge.com/forums/showthread.php?t=26737
I now see this is indeed ISPConfig 2 steps, but the same basic principals applied.
One question though. You wrote:
Does that need to be updated too? I noticed that before I changed IPs it had my old IP, so I put the new main IP there from eth0 and left the rest alone and it is working for me. Are you saying that even the IP here doesn't need to be changed?
Also, you do still have to go through the sites in ISPConfig 3 one by one and re-save each one after changing the IPs correct?
|All times are GMT +2. The time now is 23:58.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.