After a Virtualmin IP address migration, the server has the old IP as NAT

When you change the IP address on a Virtualmin server, the server will detect the IP address has changed and prompt to update all the vhosts. However, when you then examine the Virtual hosts you’ll see that the old IP address lingers as a NAT IP address even though you don’t use NAT.

Use this script to fix it across all virtual servers:

virtualmin list-domains --name-only | while read domain; do
   virtualmin modify-domain --domain "$domain" --no-dns-ip;
done

 

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top