The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I need help with /scripts/proxydomains

Discussion in 'cPanel Developers' started by jefferyw18, Jul 22, 2012.

  1. jefferyw18

    jefferyw18 Well-Known Member

    Joined:
    Apr 10, 2004
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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%0a@%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
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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:

     
  3. jefferyw18

    jefferyw18 Well-Known Member

    Joined:
    Apr 10, 2004
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Vancouver BC Canada
    cPanel Access Level:
    DataCenter Provider
    thanks for the tip, I may have solved my issue with my grand bash script that I wrote however this may point me in the right direction
     
  4. jefferyw18

    jefferyw18 Well-Known Member

    Joined:
    Apr 10, 2004
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Vancouver BC Canada
    cPanel Access Level:
    DataCenter Provider
    $formdata .= '&zonedata=' . Cpanel::Encoder::URI::uri_encode_str($zonedata) if $zonedata;

    where can I find zonedata?
     
  5. CitizenK

    CitizenK Well-Known Member

    Joined:
    Jun 5, 2012
    Messages:
    64
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    On The Road
    cPanel Access Level:
    Root Administrator
    You can find your zone data in /var/named, However i HIGHLY recommend that you use the "Edit DNS Zone" in WHM, unless you are know how to edit dns zones manually.
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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.
     
  7. jefferyw18

    jefferyw18 Well-Known Member

    Joined:
    Apr 10, 2004
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Vancouver BC Canada
    cPanel Access Level:
    DataCenter Provider
    so where is it getting the data from? httpd.conf ?

    same thing when /scripts/wwwacct somedomain.com someuser somepass ?
     
  8. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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.
     
  9. jefferyw18

    jefferyw18 Well-Known Member

    Joined:
    Apr 10, 2004
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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
     
  10. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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?
     
Loading...

Share This Page