HowTo :: change server IP address
When you change your server IP
address, reboot the server with the new IP (the new one you want to use). DirectAdmin will not be running, as the license file will be invalid.
- Contact DirectAdmin to obtain a new license file. DirectAdmin will change the IP in the license.
- SSH to the server and run the following commands (in that order):
- /usr/local/directadmin/scripts/getLicense.sh CLIENT_ID LICENSE_ID
Make sure the license the file contains no error messages, or weird characters.
Start DirectAdmin with the new license:
- /sbin/service directadmin restart
Download the ipswap.sh script from directadmin:
- wget http://www.directadmin.com/ipswap.sh
- chmod 755 ipswap.sh
Run ipswap script with the old and and the new IP. For example:
- ./ipswap.sh OLD_IP NEW_IP
The ipswap script can be run on any IP(s), so if you want to change all IPs with new ones, follow the example given above. Just ensure that you match the new server IP with the old one.
Restart the following applications:
- /sbin/service httpd restart
- /sbin/service proftpd restart
- /sbin/service exim restart
- /sbin/service vm-pop3d restart
Run this command to update the users' list cache so that you see the new results in the show users lists:
- echo "action=cache&value=showallusers" >> /usr/local/directadmin/data/task.queue
Other articles in this Category
Copyright © 2015 ServerTune, Inc.