Additional IP became primary IP

SYSTEM INFORMATION
OS type and version debian 13
Webmin version 2.621
Virtualmin version 8.0.0 GPL

Hello,
I added an additionnal IP to my VPS. I configured the ip in webmin Network configuration, Host Addresses.
But the additionnal IP is now considered my primary IP and I have this warning :

Your system’s primary IP address appears to have changed from ORIGINAL_IP to ADDITIONNAL_IP. Virtual servers using the old address may be unreachable or serve the wrong web content.

my network configuration :

ip a
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether xx:xx:73 brd ff:ff:ff:ff:ff:ff
    altname enp0s3
    altname enxfa163ea4ba73
    inet ADDITIONNAL_IP/32 scope global ens3
       valid_lft forever preferred_lft forever
    inet ORIGINAL_IP/32 metric 100 scope global dynamic ens3
       valid_lft 85584sec preferred_lft 85584sec
    inet6 xx/64 scope link proto kernel_ll 
       valid_lft forever preferred_lft forever

To avoid surprises, you need to set your original IP address to be static instead of dynamic.

Is it why I have the primary/secondary ip issue ?
Because the dynamic status comes from the configuration provided for my VPS, and I don’t dare change it.

This isn’t something Virtualmin can address. We rely on system-provided settings, so if you really want the behavior you expect, just make sure the old IP, assigned by your cloud provider is listed first in the ip a command output.

Note that it’s best to ask your cloud provider for help about how to do it, since they should be fully aware of your network setup.

Ok, thank you

1 Like

Note you can configure Virtualmin to use whatever IP you want for VirtualHosts and DNS records. It’s not required that it be the first address when listing with ip a. (I just wanted to clarify, since what Ilia said maybe implies you need to change your network to make Virtualmin work, and that is not the case. Virtualmin tries to guess about the primary address, but the guess obviously can’t be reliable. You don’t have to use the guessed address. Everything is configurable.)

Does it mean I can safely ignore this warning :

Your system’s primary IP address appears to have changed from ORIGINAL_IP to ADDITIONNAL_IP. Virtual servers using the old address may be unreachable or serve the wrong web content.

I’ve been able to set my primary IP first, and static. Here is how, on debian 13 with netplan :

network:
  version: 2
  ethernets:
        ens3:
            dhcp4: false
            nameservers:
                addresses: [213.186.33.99]
            routes:
              - to: "2001:41d0:305:2100::1/64"
                via: "::"
              - to: "::/0"
                via: "2001:41d0:305:2100::1"
              - to: default
                via: 137.74.40.1
                on-link: true
            match:
                macaddress: "XX:73"
            addresses:
              - PRIMARY_IP/32
              - SECONDARY_IP/32
            accept-ra: false
            set-name: "ens3"

This require a reboot to have the IP in correct order.

2 Likes

I noticed the the server ip continues to change, and it jumps through the public addresses, in the available ip’s in my range. Which, made me wonder if it matters. But, what your saying is: Virtualmin just guesses, and don’t worry which ip it shows for primary server. The DNS directs the traffic, and will make sure it goes to the correct domain name. CORRECT?
How do i enable additional ipv6 for new virtual servers? They are in my netplan, but when I add a new domain name, for new server, it says that ipv6 is not enabled for this system.
Thanks in advance for any help here.

Check if IPv6 is enabled in “System Settings ⇾ Virtualmin Virtual Servers ⇾ Configuration: Networking settings” page.

1 Like

I have and they are. I will send a screenshot when I get back.

I think you should recheck your network config, and put your actual IPv6 host address in addresses and fix IPv6 subnet route:

network:
  version: 2
  ethernets:
    ens3:
      dhcp4: false
      nameservers:
          addresses: [213.186.33.99]

      routes:
        - to: "2001:41d0:305:2100::/64"
          on-link: true
        - to: "::/0"
          via: "2001:41d0:305:2100::1"
        - to: default
          via: 137.74.40.1
          on-link: true
      match:
          macaddress: "XX:73"
      addresses:
        - PRIMARY_IP/32
        - SECONDARY_IP/32
        - IPV6/128
      accept-ra: false
      set-name: "ens3"

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.