Report this

What is the reason for this report?

virtualmin/webmin command to change system primary ip

Posted on April 12, 2017

Deploying a custom image on a new droplet, virtualmin/webmin on the image notices a new IP address assigned to the droplet. When this happens, on first login to virtualmin/webmin shows below message on the page -

YOUR SYSTEM’S PRIMARY IP ADDRESS APPEARS TO HAVE CHANGED FROM XXX.XXX.XXX.XX TO XX.XXX.XXX.XX. VIRTUAL SERVERS USING THE OLD ADDRESS MAY BE UNREACHABLE OR SERVE THE WRONG WEB CONTENT.

When I click on Update my IP address, it would then change IP address of the system and everything works fine. I want to achieve the same thing using a command so I can run this script over system boot process.

Does anyone know how to do this using a command on virtualmin/webmin?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello there,

I know it’s been a while but one of these commands should do the trick for you

  1. virtualmin modify-all-ips

or

  1. virtualmin modify-all-ips --default-old-ip --detect-new-ip >/tmp/modify-ips.out 2>&1

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.