I can see this is an issue that many people get stuck with but I can’t see any posts that are like the issue I have (I’ve tried the solutions from many posts but go nowhere).
OK…here goes
I have a domain registered with a domain registrar www.jmb-webserver.com that points to my static IP address. The website setup on a virtualmin virtual server jmb-webserver.com works fine. In the DNS options I have the following records
ns1 A - IPv4 Address 192.168.0.2 (this is the local IP address for the webserver)
ns2 A - IPv4 Address 192.168.0.2
You can not have nameservers pointed to a LAN address. They are not known to the outside world.
Your static WAN address 92.xx.x.240 is the one you need to register as a nameserver at your registrar (where you bought the domain) Those are called glue records.
You will need a second IP though, I rent a cheap VPS to act as a nameserver for example.
Then those 2 WAN IP’s you will add to your Virtualmin installation as the nameservers.
Or if you use your registrars nameservers, you need to change only and all A and MX records at the registrar for all domains you will host and make them point to your WAN IP 92.xx.x.240.
Nameservers don’t automatically exist, you have to first register a given IP as a nameserver.
Just for completeness’ sake: This statement is not generally true. My hoster e.g. allows setting any IP address as nameserver in their NIC configuration interface. I only need to register those that I want to use as masters with their slave nameservice feature.
Though in particularly this case, your statement is of course correct.