How to create subdomain in Virtualmin with external IP

My Virtualmin has been configured to create virtual servers and virtual subservers with local IPs of my server. But sometimes I need some subdomains be hosted on another server. I tried to create a virtual subserver and enter external IP in section “IP address and forwarding”, but for some reason my subdomain does not resolve to external IP.

Do I need set any configurations some other places in Virtualmin or Webmin? Maybe I need somehow to bind external IP to make Virtualmin trust to it?

Where exactly did you enter that external IP?

Do you have the BIND records for the new domain added to the parent zone, or create a new zone?

What are the parent domain, subdomain and IPs in question? To what does the subdomain resolve instead, and how exactly did you test that?

(I tested this… At least for me, what you’re trying to do seems to be working okay.)

Locutus, I tried all the available variations: first tried to create a subdomain, generating BIND records separately, then adding them in parent zone, then I deleted subserver and tried to create top level virtual server. In all cases, surely I have put external IP in External IP address section, but was not sure should I put it Network interface, so tried both ways. Nothing did work. Subdomain digged from the server showed correct external IP, but digged from anywhere else always showed my server’s IP.

Why is it so complicated? cpanel was easy? watching this thread

“External IP address” is the right place to put it, yep. It does end up in the zone file then, and it seems it did so for you too, if digging from the server itself returned the correct IPs.

Why digging from the outside goes wrong can have many reasons. To evaluate this, I’d need to know more: For starters, what’s the names of the domain and subdomain in question, what IP address should you get and which do you get from outside?