I need help with /scripts/proxydomains

jefferyw18

Well-Known Member
Apr 10, 2004
45
0
156
Vancouver BC Canada
cPanel Access Level
DataCenter Provider
so I ran strace on this bad boy trying to find out where its getting the ips from and not having any luck can someone shed some light on this?

the ips for (cpanel / whm / webmail / webdisk) are wrong

Code:
strace -vFf -s 9999 -o ~/trace.out /scripts/proxydomains add --domain=mydomain.com
Code:
15754 execve("/usr/local/cpanel/whostmgr/bin/dnsadmin-ssl", ["/usr/local/cpanel/whostmgr/bin/dnsadmin-ssl", "--action", "SYNCZONES", "--data", "cpdnszone-mydomain.com=%3b%20cPanel%20first%3a11.30.3.5%20%28update_time%29%3a1342933959%2011.24.4-CURRENT_32603%3a%20Cpanel%3a%3aZoneFile%3a%3aVERSION%3a1.3%20hostname%3amy.hostname.com%20latest%3a11.30.3.5%0a%3b%20Zone%20file%20for%20mydomain.com%0a%24TTL%2014400%[email protected]%0986400%09IN%09SOA%09ns1.mydomain.com.%20myemail.hotmail.com.%20%28%0a%09%09%092012072209%0a%09%09%097200%0a%09%09%097200%0a%09%09%092419200%0a%09%09%0986400%20%29%0a%0amydomain.com.%2086400%20IN%20NS%20ns1.mydomain.com.%0amydomain.com.%2086400%20IN%20NS%20ns2.mydomain.com.%0a%0a%0amydomain.com.%20IN%20A%2024.87.41.13%0a%0alocalhost.mydomain.com.%20IN%20A%20127.0.0.1%0a%0amydomain.com.%20IN%20MX%200%20mydomain.com.%0a%0amydomain.com.%20IN%20TXT%20v%3dspf1%20a%20mx%20a%3amail.mydomain.com%20%3fall%0a%0amail%20IN%20A%2024.87.41.13%0awww%20IN%20A%2024.87.41.13%0aftp%20IN%20A%2024.87.41.13%0a%0airc%20IN%20A%2024.87.41.13%0aradio%20IN%20A%2024.87.41.13%0ans1%2014400%20IN%20A%2024.87.41.13%0ans2%2014400%20IN%20A%2024.87.41.13%0ablah%20IN%20A%2024.87.41.13%0acpanel%20IN%20A%20192.168.0.10%0awhm%20IN%20A%20192.168.0.10%0awebmail%20IN%20A%20192.168.0.10%0awebdisk%20IN%20A%20192.168.0.10&"]) = 0
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
It's better to check the opens to see what files are being opened to use:

[email protected] [~]# grep 'open("' trace.out | grep -v "lib\|No such\|null\|urandom" | awk {'print $2'} | sort -nr | uniq -c
1 open("/var/named/cache/domain.com.db",
2 open("/var/cpanel/pw.cache/0:named",
3 open("/var/cpanel/GetOS.cache",
1 open("/var/cpanel/dnsrequests_db/RzItDCVApt09RVP455uSS4G1pty3MXKJ",
1 open("/var/cpanel/dnsrequests_db.last_clean_time",
1 open("/var/cpanel/dnsrequests_db/HnxK4onmP47SQm6IgVdyWp6UWzLTUQWA",
1 open("/var/cpanel/dnsrequests_db/6q9hoDwkdJfYhXln0BFRTl16gov6guqw",
1 open("/var/cpanel/dnsrequests_db",
4 open("/var/cpanel/cpanel.config.lock",
4 open("/var/cpanel/cpanel.config.cache",
4 open("/var/cpanel/cpanel.config",
3 open("/var/cpanel/configs.cache/_etc_sysconfig_named___default",
3 open("/usr/local/cpanel/perl/YAML/Syck/Syck.so",
3 open("/usr/local/cpanel/perl/Storable/Storable.so",
3 open("/usr/local/cpanel/perl/Socket/Socket.so",
3 open("/usr/local/cpanel/perl/Socket6/Socket6.so",
3 open("/usr/local/cpanel/perl/Net/SSLeay/SSLeay.so",
3 open("/usr/local/cpanel/perl/Net/LibIDN/LibIDN.so",
3 open("/usr/local/cpanel/perl/MIME/Base64/Base64.so",
3 open("/usr/local/cpanel/perl/List/Util/Util.so",
3 open("/usr/local/cpanel/perl/Lchown/Lchown.so",
3 open("/usr/local/cpanel/perl/IO/IO.so",
3 open("/usr/local/cpanel/perl/File/Glob/Glob.so",
3 open("/usr/local/cpanel/perl/Fcntl/Fcntl.so",
3 open("/usr/local/cpanel/perl/Digest/MD5/MD5.so",
3 open("/usr/local/cpanel/perl/Cwd/Cwd.so",
3 open("/usr/local/cpanel/perl/Cpanel/POSIX/Tiny/Tiny.so",
3 open("/usr/local/cpanel/perl/Cpanel/Cleanup/Cleanup.so",
1 open("/usr/local/cpanel/Cpanel/ZoneFile/Template.pm",
1 open("/usr/local/cpanel/Cpanel/Version.pm",
1 open("/usr/local/cpanel/Cpanel/Validate/Hostname.pm",
1 open("/usr/local/cpanel/Cpanel/Validate/Domain.pm",
1 open("/usr/local/cpanel/Cpanel/Utils.pm",
1 open("/usr/local/cpanel/Cpanel/Time.pm",
1 open("/usr/local/cpanel/Cpanel/Time/Local.pm",
1 open("/usr/local/cpanel/Cpanel/Time/HTTP.pm",
1 open("/usr/local/cpanel/Cpanel/Time/Clf.pm",
1 open("/usr/local/cpanel/Cpanel/TextDB.pm",
1 open("/usr/local/cpanel/Cpanel/Sys.pm",
1 open("/usr/local/cpanel/Cpanel/Sys/OS.pm",
1 open("/usr/local/cpanel/Cpanel/Sys/Hostname.pm",
1 open("/usr/local/cpanel/Cpanel/Sys/GetOS.pm",
1 open("/usr/local/cpanel/Cpanel/Sys/Find.pm",
1 open("/usr/local/cpanel/Cpanel/StringFunc/Trim.pm",
1 open("/usr/local/cpanel/Cpanel/StringFunc/SplitBreak.pm",
1 open("/usr/local/cpanel/Cpanel/StringFunc.pm",
1 open("/usr/local/cpanel/Cpanel/StringFunc/Match.pm",
1 open("/usr/local/cpanel/Cpanel/StringFunc/File.pm",
1 open("/usr/local/cpanel/Cpanel/StringFunc/Case.pm",
1 open("/usr/local/cpanel/Cpanel/StatCache.pm",
1 open("/usr/local/cpanel/Cpanel/SSHUtils.pm",
1 open("/usr/local/cpanel/Cpanel/Socket/UNIX/Micro.pm",
1 open("/usr/local/cpanel/Cpanel/SocketIP.pm",
1 open("/usr/local/cpanel/Cpanel/SafetyBits/Chown.pm",
1 open("/usr/local/cpanel/Cpanel/SafeRun/Timed.pm",
1 open("/usr/local/cpanel/Cpanel/SafeRun/Simple.pm",
1 open("/usr/local/cpanel/Cpanel/SafeRun/InOut.pm",
1 open("/usr/local/cpanel/Cpanel/SafeRun/Errors.pm",
1 open("/usr/local/cpanel/Cpanel/SafeRun/Env.pm",
1 open("/usr/local/cpanel/Cpanel/SafeFile.pm",
1 open("/usr/local/cpanel/Cpanel/SafeDir/MK.pm",
1 open("/usr/local/cpanel/Cpanel/RcsRecord.pm",
1 open("/usr/local/cpanel/Cpanel/Rand.pm",
1 open("/usr/local/cpanel/Cpanel/Rand/Get.pm",
1 open("/usr/local/cpanel/Cpanel/QuotaMtime.pm",
1 open("/usr/local/cpanel/Cpanel/PwCache.pm",
1 open("/usr/local/cpanel/Cpanel/Proxy.pm",
1 open("/usr/local/cpanel/Cpanel/Path.pm",
1 open("/usr/local/cpanel/Cpanel/OSSys.pm",
1 open("/usr/local/cpanel/Cpanel/OSSys/Bits.pm",
1 open("/usr/local/cpanel/Cpanel/NameServer/Utils/BIND.pm",
1 open("/usr/local/cpanel/Cpanel/MagicRevision.pm",
1 open("/usr/local/cpanel/Cpanel/Logger.pm",
1 open("/usr/local/cpanel/Cpanel/LoadModule.pm",
1 open("/usr/local/cpanel/Cpanel/LoadFile.pm",
1 open("/usr/local/cpanel/Cpanel/Hulk/Constants.pm",
1 open("/usr/local/cpanel/Cpanel/Hostname.pm",
1 open("/usr/local/cpanel/Cpanel/Hash.pm",
1 open("/usr/local/cpanel/Cpanel/FindBin.pm",
1 open("/usr/local/cpanel/Cpanel/FileUtils/Path.pm",
1 open("/usr/local/cpanel/Cpanel/FileUtils/Move.pm",
1 open("/usr/local/cpanel/Cpanel/FileUtils/Link.pm",
1 open("/usr/local/cpanel/Cpanel/FileUtils/Copy.pm",
1 open("/usr/local/cpanel/Cpanel/FileLookup.pm",
1 open("/usr/local/cpanel/Cpanel/Fcntl/Constants.pm",
1 open("/usr/local/cpanel/Cpanel/Errors.pm",
1 open("/usr/local/cpanel/Cpanel/Env.pm",
1 open("/usr/local/cpanel/Cpanel/Encoder/URI.pm",
1 open("/usr/local/cpanel/Cpanel/Encoder/Punycode.pm",
1 open("/usr/local/cpanel/Cpanel/DomainTools.pm",
1 open("/usr/local/cpanel/Cpanel/DomainIp.pm",
1 open("/usr/local/cpanel/Cpanel/DnsUtils.pm",
1 open("/usr/local/cpanel/Cpanel/DnsUtils/AskDnsAdmin.pm",
1 open("/usr/local/cpanel/Cpanel/DnsRoots.pm",
1 open("/usr/local/cpanel/Cpanel/Debug.pm",
1 open("/usr/local/cpanel/Cpanel/CPAN/URI/Escape.pm",
1 open("/usr/local/cpanel/Cpanel/CPAN/Sys/Hostname/Long.pm",
1 open("/usr/local/cpanel/Cpanel/Config/PatchCpConf.pm",
1 open("/usr/local/cpanel/Cpanel/Config/ModCpUserFile.pm",
1 open("/usr/local/cpanel/Cpanel/Config/LoadWwwAcctConf.pm",
1 open("/usr/local/cpanel/Cpanel/Config/LoadUserOwners.pm",
1 open("/usr/local/cpanel/Cpanel/Config/LoadUserDomains.pm",
1 open("/usr/local/cpanel/Cpanel/Config/LoadCpUserFile.pm",
1 open("/usr/local/cpanel/Cpanel/Config/LoadCpConf.pm",
1 open("/usr/local/cpanel/Cpanel/Config/LoadConfig.pm",
1 open("/usr/local/cpanel/Cpanel/Config/Httpd.pm",
1 open("/usr/local/cpanel/Cpanel/ConfigFiles.pm",
1 open("/usr/local/cpanel/Cpanel/Config/CpUser.pm",
1 open("/usr/local/cpanel/Cpanel/Config/CpUserGuard.pm",
1 open("/usr/local/cpanel/Cpanel/CachedCommand/Utils.pm",
1 open("/usr/local/cpanel/Cpanel/CachedCommand/Save.pm",
1 open("/usr/local/cpanel/Cpanel/CachedCommand.pm",
1 open("/usr/local/cpanel/Cpanel/Bits.pm",
1 open("/usr/local/cpanel/Cpanel/ArrayFunc.pm",
1 open("/usr/local/cpanel/Cpanel/App.pm",
1 open("/usr/local/cpanel/Cpanel/ApacheConf.pm",
1 open("/usr/local/cpanel/Cpanel/Alarm.pm",
1 open("/usr/local/cpanel/Cpanel/AcctUtils.pm",
1 open("/usr/local/cpanel/Cpanel/AcctUtils/Owner.pm",
1 open("/usr/local/cpanel/Cpanel/AcctUtils/GetHomeDir.pm",
1 open("/usr/local/cpanel/Cpanel/AcctUtils/Domain.pm",
1 open("/usr/local/cpanel/Cpanel/AcctUtils/DomainOwner.pm",
1 open("/usr/local/cpanel/Cpanel/AcctUtils/DomainOwnerCache.pm",
1 open("/usr/local/cpanel/Cpanel/AcctUtils/Account.pm",
1 open("/usr/local/cpanel/Cpanel/AccessIds/SetUids.pm",
1 open("/usr/local/apache/conf/httpd.conf.lock",
1 open("/usr/local/apache/conf/httpd.conf.datastore.lock",
1 open("/usr/local/apache/conf/httpd.conf.datastore",
1 open("/usr/local/apache/conf/httpd.conf",
1 open("/scripts/proxydomains",
3 open("/proc/sys/kernel/hostname",
4 open("/proc/filesystems",
3 open("/etc/shadow",
1 open("/etc/rndc.conf",
3 open("/etc/passwd",
1 open("/etc/nsswitch.conf",
1 open("/etc/named.conf.zonedir.cache",
1 open("/etc/named.conf.cache",
7 open("/etc/ld.so.cache",
1 open("/etc/group",
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
The thread is about the proxysubdomains having the wrong IPs when added to the DNS zone files and wouldn't be about editing DNS zones manually to fix them. Basically, the script is pulling the wrong data and that incorrect data is being pushed into /var/named zones. This user needs to know where it's grabbing the wrong data to build the proxy subdomains for the zone files with those wrong IPs.

jeffery, if you cannot determine the cause shortly, I suggest opening up a ticket for us to review the strace to determine why it's pulling the wrong IPs. Please ensure to note when opening the ticket an example domain, the proxy subdomain entries being added (including IP) and what IP it should be instead.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Is it picking internal IPs rather than the frontend IP, is that what is the issue? If it were picking httpd.conf, it should still be selecting the right IP. The only reason I could see httpd.conf having the wrong IPs is if the server has a NAT and httpd.conf has been modified to use private IPs.

As for "/scripts/wwwacct", it's going to select the IP in /etc/wwwacct.conf file that's the main shared IP listed as ADDR. It would also be in /var/cpanel/mainip file.
 

jefferyw18

Well-Known Member
Apr 10, 2004
45
0
156
Vancouver BC Canada
cPanel Access Level
DataCenter Provider
I changed the ADDR ip to my WAN IP in /etc/wwwacct.conf ran /scripts/proxydomains add and its still using 192.168.0.10

if the account is created with an internal IP 192.168.x.xxx then DNS shouldnt be using that internal IP cause it will cause problems
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Why is the account using the internal IP, though? You have a NAT, right? As such, how did you set Apache to select that internal IP on account creation?