Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

I have an idea for a cool script.

Discussion in 'cPanel Developers' started by WebHostPro, Jul 22, 2005.

  1. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    :D So here is the idea:

    Make a script that scans the apache error log daily for the error:

    lame server resolving your-main-domain.com ect..

    Then when t finds one it create a a dns zone file for that domain and a specified i.p..

    Then it scp's the dns zone file to your dns servers /var/named/ directory?

    What do you guys think?

    :D

    Chaze
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    Nobody agrees? :mad:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. gorilla

    gorilla Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    695
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Sydney / Australia
    greta idea :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. kosmo

    kosmo Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    403
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    All over Europe
    Wasn't she Greta Garbo?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. gorilla

    gorilla Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    695
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Sydney / Australia
    You know your women , that was to be expected from a greek gigolo :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    8
    Trophy Points:
    193
    Bad idea .... creating such a script would allow ANYONE to install new zone files
    to your DNS server by simply updating their domains to use your DNS servers.

    This would of course open up a potential pandora's box of security problems.

    I do have a similiar script installed on my server as a cronjob but instead of
    blindly creating DNS zones when it detects the error message, it just simply
    sends me an email message to let me know there is a domain out there
    configured for our network that is not setup in our DNS. That way, I can
    review it and determine if it is a domain that should be legitimately added
    to our DNS servers or not.
     
  7. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,366
    Likes Received:
    6
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Any interest in sharing it?
     
  8. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    7
    Trophy Points:
    318
    Location:
    back woods of NC, USA
    is there a way to do wildcards with bind? have bind point normally (non) resolving domains to a particular IP? a way to catch traffic you normally would not be able to.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Specks

    Specks Well-Known Member

    Joined:
    Jul 3, 2004
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    156
    I don't think you can create a complete wildcard zone for bind to shuck all non-resolvable domains to. I'll have to find my Bind book and see if such a domain is possible. I don't think so though.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    8
    Trophy Points:
    193
    Actually you can but what would be the point?
     
  11. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    I was thinking to capture canceled domains traffic and to have a page show that the account is no longer active.

    Also to not have lame server resolving errors.

    Not a big deal but when you have thousands of accounts the traffic can ad up and help promote your company while helping the surfer too.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Ishware

    Ishware Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    194
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Panama City, FL
    cPanel Access Level:
    Root Administrator
    Isn't it the case that if a request comes in that doesn't match anything in httpd.conf, that apache shows the server-wide default page? (i.e. "There is no website configured at this address")...

    Seems like you could customize that page with your desired info... *shrug*

    My apologies if this wouldn't apply to all cases. And sure, it'd only be html, but hey, it's a start. :)
     
  13. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    True but only if a dns zone exists for that domain name, this script would create the dns zone sending them to a i.p. or the default page.

    If their is no dns zone then the connection goes to a page cannot be found error.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice