virtualmin / virtualmin-gpl

Virtualmin web hosting control panel for Webmin
https://www.virtualmin.com
GNU General Public License v3.0
330 stars 102 forks source link

cpanel migration - subdomains use my internal IP #933

Closed shoulders closed 1 month ago

shoulders commented 1 month ago
SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.5
Usermin version 2.102
Virtualmin version 7.20.2 Pro
Theme version 21.20.7
Apache version 2.4.52
Package updates 10 package updates are available

the issue

I imported a cpanel account which had subdomains. These subdomains DNS were populated with my server's internal IP address (10.0.0.47) and not my public one (123.123.123.123).

IPs changed for privacy/security.

The parent account's DNS was correctly set.

the 2 subdomains are

$ttl 3600
example.com.    IN  SOA ns1.example.com. root.ns1.example.com. (
            2024101916
            3600
            600
            1209600
            3600 )
@   IN  NS  ns1.example.com.
ns1.example.com.    IN  A   123.123.123.123
@   IN  NS  ns2.example.com.
ns2.example.com.    IN  A   123.123.123.123
example.com.    IN  A   123.123.123.123
www.example.com.    IN  A   123.123.123.123
ftp.example.com.    IN  A   123.123.123.123
localhost.example.com.  IN  A   127.0.0.1
webmail.example.com.    IN  A   123.123.123.123
admin.example.com.  IN  A   123.123.123.123
mail.example.com.   IN  A   123.123.123.123
example.com.    IN  MX  5 mail.example.com.
example.com.    IN  TXT "v=spf1 a mx ip4:123.123.123.123 -all"
202311._domainkey.example.com.  IN  TXT ( "v=DKIM1;.......................... *** removed on purpose*****
demo.example.com.   IN  A   10.0.0.47
www.demo.example.com.   IN  A   10.0.0.47
ftp.demo.example.com.   IN  A   10.0.0.47
localhost.demo.example.com. IN  A   127.0.0.1
webmail.demo.example.com.   IN  A   10.0.0.47
admin.demo.example.com. IN  A   10.0.0.47
search.example.com. IN  A   10.0.0.47
www.search.example.com. IN  A   10.0.0.47
ftp.search.example.com. IN  A   10.0.0.47
localhost.search.example.com.   IN  A   127.0.0.1
webmail.search.example.com. IN  A   10.0.0.47
admin.search.example.com.   IN  A   10.0.0.47
@   IN  CAA 0 issuewild letsencrypt.org

additional

I was under the assumption when you imported a cpanel account with subdomains a special subdomain would be created (i.e. not sub server).

My current setting

image

Thanks

jcameron commented 1 month ago

Was the issue here that the parent domain had the public IP, but the sub-domain imported from the same cPanel backup was given the internal IP?

shoulders commented 1 month ago

Was the issue here that the parent domain had the public IP, but the sub-domain imported from the same cPanel backup was given the internal IP?

Yes this is correct.

jcameron commented 1 month ago

Ok I see the cause of this now - we'll fix it in the next release.

iliajie commented 1 month ago

Ok I see the cause of this now - we'll fix it in the next release.

@shoulders You can test it right away by applying this patch:

webmin patch https://github.com/virtualmin/virtualmin-gpl/commit/d8771a1
shoulders commented 1 month ago

I will try on my test site tommorow.