Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a system that receives many different DNS requests every day from unauthorized users. What I need is a method to accept all DNS requests made to to this system and give back them back the same IP. Think of this as a gateway situation, where regardless of their DNS request, it will hand back the same IP.

Is it possible to do this through BIND? or is there a better more elegant solution?

share|improve this question

4 Answers 4

up vote 2 down vote accepted

My evldns framework could do this trivially and with the minimum of memory overhead, if you've got a Linux box available.

A plugin that always gives out a specific IP would only take a dozen or so lines of code.

If you can wait a day or so I might even write it myself...

EDIT - I've now done this - if you look at the mod_arec.c and fixed.c modules there's a demo of how to always return a specific IP address for any inbound IN A foo query.

share|improve this answer
    
wow, thank you very much! –  Tedd Johnson Nov 4 '09 at 17:28

I'd just use iptables to redirect all port 53 traffic to wherever it needs to go.

share|improve this answer
    
yes, but I am trying to capture this traffic, not redirect it to another DNS server. basically I want anyone who makes a DNS request of my server to get an answer, but it needs to answer the same for ALL requests –  Tedd Johnson Nov 3 '09 at 20:31
1  
Then you might want to rewrite your question not to use the word "redirect"... –  womble Nov 3 '09 at 22:42

The best answer, in my opinion, is going to be to whip one up in the programming language of your choice. It's easy enough to do in python using twisted.names.

share|improve this answer
    
so you're suggesting writing my own program that will just accept all and punt back our default answer? –  Tedd Johnson Nov 4 '09 at 0:15
    
@Tedd - no need - I've written one for you... –  Alnitak Nov 4 '09 at 12:51
    
Yes, I am. Unless Alnitak's answer works better :) –  Bill Weiss Nov 4 '09 at 15:21

It's called a wildcard DNS record, and yes, it's doable with Bind and possibly other servers too.

Google it, or at least see this Wikipedia page. It's pretty trivial after all.

share|improve this answer
2  
Google it isn't an acceptable answer here. The point of SF is to have the answers listed here so that it is a static source of information. Linking to external sources as a reference is encouraged, but not as an entire answer. –  MDMarra Nov 4 '09 at 0:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.