When I create a new VirtualServer and I ask that the "external IP" is "same as assigned" IP it always defaults to the base system IP. I have to go to the virtual server domain and select Server Settings IP Address and change it back to the additional IP I chose. If I specifically state an IP when I create a domain, it is ok. I'm going to create an example with screenshots and update.
Here is it with explicit IP from the get-go:
Let me know if I haven't shown this properly. I can add more shots. But the issue is... I create a new domain and I ask that it use "Same as real address". Despite choosing a custom IP address, it always sets the external IP address to the same thing, the default interface IP. If I specifically put in the desired IP in the external IP field, it works fine. And when I go back in to the IP configuration, it shows that I am using the correct IP and that the default IP is the correct IP.
This is not a serious bug, and has a workaround, but had the same issue over multiple distros and versions. I'm committed to Rocky 8 right now. Have also used CentOS 8 (same basically) and CentOS 9 and Rocky 9.. The 9's have a different network config that I'm not comfortable with yet. but I don't think this issue is specific to that upgrade.
Last edit: Tom MacKenzie 2023-01-31
Check at System Settings -> Virtualmin Configuration -> Networking settings -> Default IP address for DNS records that you have it set to "Same as virtual server IP"
Default virtual server IPv4 address
From network interface
Seems you've nailed it.
But I would have expected when setting up a new Virtual Server, if I as for it to be the same IP as I am setting it to right now would be the external IP.
Last edit: Tom MacKenzie 2023-02-01
Also, interesting where is that 70.35.197.230 IP was coming from? Can you run these commands to get more details (just out of curiocity):
70.35.197.230 is the default interface provided by my hosting provider, and the default outgoing interface. If I connect to another host, the IP is 70.35.197.230.
[root@mail ~]# ip a
1: lo: <loopback,up,lower_up> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens192: <broadcast,multicast,up,lower_up> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:50:56:2a:c3:9d brd ff:ff:ff:ff:ff:ff
altname enp11s0
inet 74.208.53.41/32 scope global noprefixroute ens192
valid_lft forever preferred_lft forever
inet 108.175.1.131/32 scope global noprefixroute ens192
valid_lft forever preferred_lft forever
inet 70.35.197.230/32 scope global noprefixroute ens192
valid_lft forever preferred_lft forever
inet 108.175.1.189/32 scope global noprefixroute ens192
valid_lft forever preferred_lft forever
inet 62.151.177.201/32 scope global noprefixroute ens192
valid_lft forever preferred_lft forever
inet 198.251.78.88/24 brd 198.251.78.255 scope global noprefixroute ens192
valid_lft forever preferred_lft forever
inet6 2607:f1c0:1800:802a::7/64 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 2607:f1c0:1800:802a::6/64 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 2607:f1c0:1800:802a::5/64 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 2607:f1c0:1800:802a::4/64 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 2607:f1c0:1800:802a::3/64 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 2607:f1c0:1800:802a::2/64 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 2607:f1c0:1800:802a::1/128 scope global dynamic noprefixroute
valid_lft 2811sec preferred_lft 2811sec
inet6 fe80::250:56ff:fe2a:c39d/64 scope link noprefixroute
valid_lft forever preferred_lft forever</broadcast,multicast,up,lower_up></loopback,up,lower_up>
[root@mail ~]# grep -Rs "70.35.197.230" /etc
/etc/sysconfig/network-scripts/ifcfg-ens192:IPADDR2=70.35.197.230
/etc/webmin/bind8/config:this_ip=70.35.197.230
/etc/webmin/bind8/config:default_master=70.35.197.230
/etc/webmin/virtual-server/config:external_ip_cache=70.35.197.230
/etc/webmin/virtual-server/localips:70.35.197.230
/etc/webmin/virtual-server/last-config:external_ip_cache=70.35.197.230
/etc/named.conf: 70.35.197.230;
/etc/named.conf: 70.35.197.230;
Steps for brevity:
1) GO to create new VS
2) Under IP Address in setup, choose Shared, on non-default IP, External IP address
Same as real address Yes. (If I put the explicit shared IP in the optional box, correctly sets the external IP.
3) Go to Edit Vvirtual Server and can see: (70.35.197.230 externally), even though during setup I said "External IP address Same as real address"
I wonder in that process if it thinks my "real address" is the default interface address BEFORE it sets the correct, configured IP address?
Jaime seems on this with a previous post. It just confusing during configuration when you say
External IP address
Same as real address (I read this as "same as the real address I'm setting up right now")
Ah yes, that messsage in the UI is rather misleading. I'll fix this in the next Virtualmin release.