One ​​of the things that needs to be corrected after changing the server IP is the host panel IP in DirectAdmin. So that all DNS and access are set to the new IP. To do this, follow the steps below. (without deleting data and information)

 

  1. Please log in to your server via ssh terminal or via putty.
  2. Enter the following path with the command: 
cd /usr/local/directadmin/scripts

3. To change the old IP address in the server control panel and change the DNS to the new IP, run the ipswap.sh script: For example, suppose your old IP is 192.193.194.100 and your new IP is 221.109.44.109.

./ipswap.sh 192.193.194.100 221.109.44.109

To buy a high-quality and fast virtual server from Radib click on this link

./ipswap.sh old_ip new_ip

4. Restart all services to apply the changes

service httpd restart
service proftpd restart
service exim restart
service dovecot restart

And that's it. Your DirectAdmin panel IP and all domains on it have changed.

Was this answer helpful? 26 Users Found This Useful (26 Votes)