-1

I have a unmanaged Dedicated CentOS Server running and I've been trying to get a new IP Address for it.

My hosting provider allowed me to buy a new IP Address but it's up to me to actually change it on the server.

1) Could I actually change the IP Address of the server permanently?

2) Would all I need to do is change the eth0 setting in /etc/sysconfig/network-script and /etc/hosts? Does anyone know a good resource on doing this, many online resources seem to give conflicting steps

3) Is there a chance that I might lock myself out of the server after I do a "server network retart"? If so, would rebooting solve the trick, then logging in from the new IP Address?

closed as off-topic by Chopper3, mdpc, Aaron Copley, Falcon Momot, Ward Jan 25 '14 at 7:23

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – Chopper3, Falcon Momot, Ward
  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – mdpc, Aaron Copley
If this question can be reworded to fit the rules in the help center, please edit the question.

1
  1. Yes you can do this

  2. If your current IP address is fixed on eth0 then you should change it in /etc/sysconfig/network-scripts/ifcfg-eth0. You may need to change /etc/hosts and you may also need to change any external DNS entries that pointed to the host referencing the old IP address.

  3. Yes, you could lock yourself out. Many hosting companies provide some sort of console access that doesn't use the IP address. You should look into the whether this is available and familiarise yourself with it's use.

Aside: I don't understand what your trying to achieve. If you already have an IP address why would you pay for a new one to change it - what are you going to do with the original one ?

  • I think that he might be confused, the provider maybe gave him an additional IP address which he has to add by setting the corresponding sub interface – Gabriel Talavera Jan 25 '14 at 13:23
0

1) yes.

2) just in the network-script/eth-whatever

3) there's a chance yes, this is why you want some form of secondary console interface such as iLO/DRAC or similar.

Oh and please read our help pages about what, and who, this site is for before posting again.

Not the answer you're looking for? Browse other questions tagged or ask your own question.