Is there a way to do a dns catch all?

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,724
27
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
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
 

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
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.
 

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
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.
 

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,724
27
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
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
 

isputra

Well-Known Member
May 3, 2003
575
0
166
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 ?
 

isputra

Well-Known Member
May 3, 2003
575
0
166
Mbelitar
DWHS.net said:
Yes, that's exactly what I am working on ;)

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

I'll Look Forward to it :D
 

Soheil

Active Member
Jun 24, 2003
43
0
156
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.
 

isputra

Well-Known Member
May 3, 2003
575
0
166
Mbelitar
Hi Charles,

Is there any info about your free script ?
 

Spiral

BANNED
Jun 24, 2005
2,020
8
193
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.
 

isputra

Well-Known Member
May 3, 2003
575
0
166
Mbelitar
DWHS.net said:
Yes, that's exactly what I am working on ;)

I will give it out for free when we finish it.
Then the script is not finish yet :D
 

isputra

Well-Known Member
May 3, 2003
575
0
166
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.
 

manish

Member
Feb 17, 2004
12
0
151
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