Localips file is being rewritten

Hi, I have an error where I need to add my external IP address (due to using NAT on my firewall) to localips file in /etc/webmin/virtual-server/localips. Each time I do, I am able to preview a server from VirtualMin.

However, a few minutes later, the file is rewritten and I receive the error "Connections to IP addresses not on this system are not allowed: xx.xx.xx.xx" when I try to preview in VirtualMin. I saw another issue while searching for "localips" that said this may be a bug and I can confirm, unless it is intentional, that this file is being recreated automatically by Virtual/Webmin and removing the external IP address I am adding to it.

This is in the professional version of VirtualMin.

Status: 
Active

Comments

Yes, that file is auto-generated from active network interfaces on your system.

I assume that since NAT is in use, no interfaces actually have that IP?

That is correct, no interfaces have that IP, they all have internal (NAT) ips. But when I try to preview a website, it references my external IP.

Thanks, Dave

Actually, it shouldn't be necessary to add the external IP to the localips list if you use the "Preview Website" feature in Virtualmin - because the link that this points to should be using the internal IP.

Actually the 'preview website' feature is using the external IP address. I have the websites set up as using the external IP address on their setup screen. Should I enable it as the internal IP address?

Thanks, Dave

Yes, the websites should have the internal IP as their actual IP. There is a separate setting in Virtualmin for the external IP, which is used to populate DNS records.