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?
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
andfixed.c
modules there's a demo of how to always return a specific IP address for any inboundIN A foo
query.I'd just use iptables to redirect all port 53 traffic to wherever it needs to go.
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
.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.