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.

Is there a way to do a dns catch all?

Discussion in 'Bind / DNS / Nameserver Issues' started by DWHS.net, Jul 13, 2005.

  1. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Obviously as a host there us allot of deleted accounts that still have our name servers.

    Is there a way to catch that traffic and send it to a i.p. so they have the option to re-sign up.

    Basically a catch all dns record for domains and resolve all of the traffic to one i.p.

    Hmmm, Thanks, Chaze
     
  2. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Bind allows you to setup catchalls as far as I can remember, I think a host called '*' is the trick. I've done it in the past.

    I think there are some funny rules around it, but give it a go -- you'll probably want to check out the Bind/named doco for details.
     
  3. challii

    challii Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
  4. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Thanks guys but both are not what I mean.

    I want when someone has our name servers it will pickup the domain and funnel the traffic even if there is no dns record for that domain.


    Not sub domain or for one domain but any with our name servers.
     
  5. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Ahhh... now I understand.

    You want ANY domain using your nameservers to be referred to a nonexistent page. eg if fred.com uses your nameservers, you want it to get an A record returned pointing to your generic "this doesn't exist at blah blah hosting" webpage.

    I'm not sure whether there's a way to do that in Bind safely (but read on!). The danger lies in that, if you set that up and use the same Bind instance as a resolver, all domains on the internet will appear to exist, and that is NOT a good thing and could break the universe badly. How it breaks things is that, if you use the same Bind instance for resolving domain names on your host, stuff will not work.

    There is a possible way around this, and it is, set your nameserver up like this:
    1. So it does not answer recursive queries (that way you avoid the risk of the above happening) (Bind doco will show you how)
    2. Run the nameserver you use for these delegations on a separate IP (look up "wildcard" in Bind documentation). That IP must be such that it is ONLY used by the DNS delegations and not used by anything else.

    You then may be able to define '*.' as a domain and it should work as you expect. The problem will lie in setting up the right SOA - and the answer might be to set up a SOA for '.' so you can setup a wildcard that will answer for all undefined domains/A records.

    I'm still not convinced this is a great idea, I'm fairly sure it could lead to all sorts of problems, but if you feel like experimenting, go right ahead and do let the rest of us know how you go! It's definitely an interesting idea, and if it doesn't break the Universe, it could be a worthwhile idea.

    One nasty way this could break things is that it could cause email loops when an MX record is being looked up. If a domain fred.com does not have an MX record, a wildcard MX record might be returned, so email that should go to the A record for fred.com will instead go to any wildcard MX record. You might be able to fix this by not defining a wildcard MX record, only an A record, try it out. It's also possible Bind won't respond if any record is defined for that domain - I seem to remember something in the spec along those lines, back in the days when I used to be more knowledgeable about this stuff than I am now.
     
  6. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    I have been playing around with this, and I think your right it's might disrupt the universe.

    Soo,

    I started developing a free script that will parse the apache error log and add a dns zone for any lame server resolving lines.

    I will post it here once I finish it. :)

    Thanks, Chaze
     
  7. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    Chaze idea, can i use it for domain park ?

    Yes, i think i need what on chaze idea.

    If that idea can setup, i need it to park domain that registered through us but not host with us.

    It's like temporary domain park.

    Or maybe any other way to do this temporary domain park without setting up on WHM ?

    All new domain will be pointed to our DNS and automatically refer to my domain park website without any setup through WHM. Is it possible ?
     
  8. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Yes, that's exactly what I am working on ;)

    I will give it out for free when we finish it.
     
  9. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar

    I'll Look Forward to it :D
     
  10. Soheil

    Soheil Active Member

    Joined:
    Jun 24, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Hi Charles,
    That's exactly what I have been looking for and I am glad you are working on it.
    Can't wait till I see your script in action and thanks for your work.
     
  11. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    Hi Charles,

    Is there any info about your free script ?
     
  12. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    I made a script to do this about 6 months ago ...

    Basically in a nutshell, it parses /var/log/messages for "lame server" messages and then
    filters again strictly only those lines that query my DNS server IPs because not all
    lame server messages necessarily mean that domain is pointed to my network.

    Once identified, the script automatically creates the domain file in /var/named and
    adds the appropriate entry in /etc/named.conf and then calls for a DNS restart
    via "/etc/rc.d/init.d/named restart".

    I setup a hosting account that displays a message telling viewers that they must
    signup for web hosting. In my /etc/httpd/conf/httpd.conf file, I moved that web account
    to the first entry for that IP address so that it would be displayed as the default
    so that any DNS created by the earlier script would in turn display that web page.

    I wrote my script in PHP and execute it via /etc/cron.hourly

    Some parts of the script are customized specifically for my system but I suppose I
    could re-write them to be more generalized so that others could make use of the script.
     
  13. ttremain

    ttremain Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Would this work in a DNS cluster?
     
  14. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    So where is the script ;)
     
  15. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    Then the script is not finish yet :D
     
  16. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    Is there any one have solution for this problem ?

    I need to know how to do domainpark without create or add domain to httpd.

    It's just like temporary park that redirect to mypage until the owner of domain set the DNS to the right server.
     
  17. ttremain

    ttremain Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    This shouldn't disrupt the universe if the DNS servers are not ever used in /etc/resolv
     
  18. manish

    manish Member

    Joined:
    Feb 17, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Bind configured as catch all DNS

    I have been playing with the idea of a catch all DNS. I have searched a lot on the internet to configure BIND as a catch all DNS but couldn't get it working.

    I have disabled recursion.

    I wanted to know the zone file name and its content for a catch all DNS. This DNS will not be used for name resolution. Just as a landing page DNS for any domain pointing to it.

    Any help will be greatly appreciated.

    Thanks
     
Loading...

Share This Page