Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP Address change 1

Status
Not open for further replies.

JCrou82

Programmer
Aug 23, 2002
265
US
Hello All, I currently have a RH 7.2 server. It is running Apache, sendmail, Qpopper and ProFTPD. We are moving to a new location and will be getting new IP Addresses. It is running live with an IP Address and I need to know three things.

How do I change the IP address on my server?
Where else do I need to change the IP Addresses?
Is there anything else i need to do when changing the IP address?

Thanks
 
If you have a GUI, all you have to do is edit your network configs. If you don't, the easiest way is to use "setup" from the command line. Click on "Network configuration" and fill in the blanks. Your web, mail and ftp servers shouldn't require any changes. By default, they all listen on a particular port and don't really care about addresses. However, if you have bound any of these to an ip address, then most of this goes out the window. :)
 
Hi

1) Edit and make the changes
in /etc/sysconfig/networking/devices/ifcfg-eth0.
Restart the network service by using command
# service network restart.
If u r having two NICs then u have to change ifcfg-
eth1 file also.

2) U have to change only above mentioned file.

3) There is nothing more, to change the ip address except
these files to place the ip permenantly.

 
so I Don't need to modify the config files for Apache (httpd.conf), ProFTPD or sendmail?

Will modifying ifcfg-eth0 do the trick?

Thanks
 
yes - you just need to associate your new ip with eth0 and you're all set... Well maybe we better check.

1) Open /etc/httpd/conf/httpd.conf and look for ANY ip addresses. If you see any, replace them with * which will tell apache to listen for all addresses.

2) Open /etc/mail/sendmail.mc and look for a line that says:

DAEMON_OPTIONS(`Port=smtp, Addr=127.0.0.1, Name=mta')dnl

Put a dnl in front of this line to comment it out or delete it. More than likely your old ip will be there rather than 127.0.0.1 but this line is not needed. If you edit this file at all you need to run the m4 compiler:

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

3) Open /etc/proftpd.conf and look for ANY ip address. When you are pleased to not find any, close the file. If you DO see one, get rid of it. :)

 
These are the only files that u have to change. And for configuring apache,sendmail there is not need to mention the ip address.
 
Thanks All Of you.

RythmAce's post pretty much summed it up. I made changes to only ProFTPD and Apache and used the netconf app to change the IP address.

Thanks guys
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top