Virtualmin checks reports a wrong public ip!

Hi,

I’m in the process to install a new server to replace an old one. I have done the whole virtualmin setup and wizard. Then I have imported through backup/restore virtualmin configuration from old server to new one.
Now when I do a server check it tells me server has a public IP different of the one reported in config file (public ip reported is the one of the old server !).

The status of your system is being checked to ensure that all enabled features are available and properly configured …

    Your system has 62.68 GiB of memory, which is at or above the Virtualmin recommended minimum of 256 MiB

    BIND DNS server is installed

    Mail server Postfix is installed and configured

    Postfix is configured to support per-domain outgoing IP addresses

    Apache is installed

    Apache does not support HTTP/2 : Incompatible Apache mpm_prefork module is enabled

    The following CGI script execution modes are available : suexec fcgiwrap

    The following PHP execution modes are available : fpm fcgid cgi

    The following PHP versions are available : 7.3.33 (/bin/php7.3), 7.4.33 (/bin/php7.4), 8.2.25 (/bin/php-cgi8.2), 8.3.13 (/bin/php-cgi8.3)

    The following PHP-FPM versions are available : 7.3.33 (php7.3-fpm) 7.4.33 (php7.4-fpm) 8.2.25 (php8.2-fpm) 8.3.13 (php8.3-fpm)

    Webalizer is installed

    Apache is configured to host SSL websites

    MariaDB 10.11.6 is installed and running

    PostgreSQL 15.8 is installed and running

    ProFTPD is installed

    Logrotate is installed

    SpamAssassin and Procmail are installed and configured for use

    ClamAV is installed and assumed to be running

    The System and Server Status module is installed and checking on schedule

    Plugin AWStats reporting is installed

    Plugin Protected web directories is installed

    Using network interface enp3s0f0 for virtual IPs

    IPv6 addresses are available, using interface enp3s0f0

    Default IPv4 address for virtual servers is 185.74.68.252

    Default IPv6 address for virtual servers is 2001:X:X:X:ec4:7aff:fe6e:f698

    External IP address for DNS records is set to ipaddressofnewserver, but the detected external address is actually ipaddressofoldserver. This may cause DNS records for Virtualmin domains to point to the wrong system

    Both user and group quotas are enabled for home and email directories

    All commands needed to create and restore backups are installed

    Resource limits are supported and configured correctly

    The selected package management and update systems are installed

    Chroot jails are available

    The Virtualmin APT repository is configured correctly

.. your system is ready for use by Virtualmin
SYSTEM INFORMATION
OS type and version Debian 12 x86_64
Webmin version 2.202
Virtualmin version 7.20.2 Pro
Webserver version Apache 2.4.62

I have checked all configuration files but nothing indicates ip address of old server. Any idea why it’s doing that ?

Thanks

Vincèn

has the new ip propagated - it takes time for the new ip to be propagated round the globe sometimes as long as 48hr) use a dnscheck service to see if is pointing to the correct place.

Seems like the check is using DNS and not the machine configuration? Probably a reason this was implemented though I wouldn’t know what it is.

possibly? if old machine DNS managed by provider and new machine by Webmin/Virtualmin? :man_shrugging:

not a problem of progagation as both old and new server have their own public IP configured in DNS since months :wink: and propagation is only for DNS entries not for IPs :wink:
Problem looks to have appeared since I imported a backup of Virtualmin configuration from old server in new server. Only problem I can’t find out where that old IP address is saved in config as everywhere I checked on new server has well the proper ip of the new server…

I noticed also that if I go in the Dynamic IP update (not used in my case), it lists in Primary Interface IP address the proper IPv4 of server but in Externally visible IP Address it reports IP of the old server !
I don’t understand how is that possible ? as for me the externally visible IP address is obtained by querying an external server on internet so it’s impossible that it reports the address of the old server (that is in a different DC !).

Virtualmin you can change IP adresss for each server.

There you have it the one place to rule them all!

Hope that helps just make sure you select external address and set your new external address!

Or you can do them one by one under manage virtual server > Change IP address.

This way all A records and such get updated that need it and you are good to go.

The other place I have seen old IP is in the BINDDNS config when you have secondary DNS it lists the old external IP there under allow transfers.

Other than that it could be in your hosts file potentially locally.

Sorry but problem is not with virtual servers (I have none setup yet on that new server), it’s the server itself that Virtualmin doesn’t handle properly !

Not relevant too :frowning:

Already checked but nothing wrong there.

  • Have you actually checked your NICs to see what IP is defined there?
    Webmin --> Networking --> Network Interfaces
  • Then I have imported through backup/restore virtualmin configuration from old server to new one. = This should not change the servers IP, the webmin config import/export probably will.

thanks for the basic question I know my IPs :wink: all the more when the problem concerns some IPs of 2 different DC !

it should not too as it’s part of local parameters I would say :wink: Even if it was doing, once done a recheck of virtualmin config it should automatically correct the issue !
What puzzles me here is that check of public IP of server is done I suspect by contacting a server on Internet so how can it get the old IP on a machine that is on a totally different network ??

I would be useful to know what service virtualmin uses to do the check. It must use an external service to check this.

Has this service got a cache that has not been emptied?

I would say poke around in the source code to have a look if you find it I would be interested.

it probably just hits a script on virtualmin website that returns IP address of request.

Yoi pointed the problem, it looks like it has a cache which is quite “stupid” as today it reports at least the proper public ip address :+1:

We don’t cache on the server side, but maybe the query on the Virtualmin side got accidentally included in status caching. That’d be a problem. Really, I’m surprised Re-check configuration would ever get any cached data, though…that’s the point of checking.

@Ilia are we pulling anything from cached data in Re-Check Configuration? That’d be a bug.

@Joe should I open a bug ticket about it ?

Thanks, @Joe! You’re right! It was a bug!

@vincen Apply this patch and try again:

webmin patch https://github.com/virtualmin/virtualmin-gpl/commit/20e7a67

@Ilia Thanks a lot for the so fast patch :wink: applied but not sure how to test it. Should I try again the reimport of Virtualmin settings from old server ? and then do a Configuration check on new server ?
Side note: an other bug sorry for that :see_no_evil: Now the new server and old server displays a warning about licence being used on 3 systems !!! The licence is only used on the old server and the new server that is going to replace it.

**A problem was detected with your Virtualmin license :**
Your serial number XXXXXX is licensed for only 1 server, but is being used on 3. Unless this serial number is used temporarily in order to migrate to a new server, please purchase an additional license at [Virtualmin Shop](https://virtualmin.com/shop/).

This message will disappear in a couple of days once the old system is destroyed.

Should I try again the reimport of Virtualmin settings from old server ? and then do a Configuration check on new server ?

I think all you should do is to re-run config check.

yeah but why does it state 3 systems sharing same licence while there are only two of them ? or it gets messed up because one of the server has both IPv4 and 6 active on it ?

Done and everything good :+1:

It’s not about your IPs; it’s about the host ID. You can have dozens of IPs on a single host.

oki so then why does it report licence used on 3 hosts ? while there is only 2 :confused: Is there a way to see IPs of servers system sees attached at that licence ?