Server validation warns about external IP address in DNS records

On one of my Virtualmin installations, which resides on a virtual machine provided by a colleague, I have a "1:1 NAT" networking setup. I.e. the server has a private address (say 10.10.0.1), and sits behind a router that maps an external IP (say 85.10.20.30) directly to the private one.

Result is: I generally need to configure the private address in Virtualmin, so that Apache gets the correct IP address in the VirtualHost directives, and enter the external IP in "Virtualmin Configuration / Networking Settings / Default IP address for DNS records".

Now, when I perform a Server Validation, it complains:

subdomain.tiahost.de
BIND DNS domain : The DNS record subdomain.tiahost.de. resolves to the IP address 85.10.20.30 instead of the virtual server's IP 10.10.0.1

While the message is surely correct, and might constitute a problem, in this case I'm aware of that necessary fact, and have purposefully configured it like so. :)

Maybe the validation procedure could check what is entered in "Default IP address for DNS records", and if that matches the DNS record in the validated domain, not warn about it.

Status: 
Closed (fixed)

Comments

Additional info: The "DNS Records" edit page under "Server Configuration" warns about the same thing, in big red letters. :)

Make sure that at Edit Virtual Server -> Configurable settings -> External IP address you enter the correct external IP address.

I can't set the external IP address in the field you mentioned.

If I do so, the external IP is used in the domain's VirtualHost Apache directive, and Apache will not serve it, because it sees the requests as going to the private IP (it's going through 1:1 NAT).

Apache must use the private IP, the BIND zone must get the external one.

When you change the external address in that field the Apache config isn't updated - instead it will still use the internal IP, for the reason you mentioned. Only the DNS records will be changed.

Okay, I just tested it, you're right about that. :)

I'm quite positive that the "subdomain.tiahost.de" server I was talking about initially - after restoring it from a backup when I migrated it from another system - had the external IP set as VirtualHost. That's why I started fiddling with the different places where you can enter IP addresses to be used in various spots.

The problem might have been a result of the restoration process, but it's also possible I mixed up the "External IP" setting in the domain creation screen with another setting in Virtualmin's base configuration. Can't reproduce that reliably anymore.

Another proof why users complain about Virtualmin being too complicated. ;) Might take this as another incentive to consider going for some improvement in this area. Anyway, as always, thanks and case closed!

The setting at Virtualmin Configuration -> Networking Settings -> Default IP address for DNS records sets the default for new domains .. it doesn't effect existing ones. Also, when you restore a backup the setting from the old system will be brought across.