Hello, everyone
I'm looking for a lightweight dns server that could resolve any possible domain name to a specific IP address (e.g 192.168.1.1).
. -> 192.168.1.1
com -> 192.168.1.1
org -> 192.168.1.1
google.com -> 192.168.1.1
yahoo.com -> 192.168.1.1
....
anypossibledomainname.evenifitdoesntexist.blah -> 192.168.1.1
Thanks in advance.
-
What you want is not a DNS server, but a proxy server. Something like this: http://www.hottproxy.org
facha : proxy servers do not resolve names to IPs, do they?Benoit : @facha No they don't. But you don't want your customers to resolve names to IPs, you want them to be redirected to a specific Webpage. And DNS servers don't redirect to web server do they?facha : Sorry for being misleading, I really really do want customers to resolve names to IPs. This is what I'm looking for: "DNS server that would resolve any domain to 192.168.1.1"From MaQleod -
You're not looking for a DNS server but for a Captive Portal solution, wich is in fact a proxy.
facha : I really really do need a DNS server. The description of a "Captive Portal" is provided so that people could get an idea, why I would need a DNS server with such a weird setup. Sorry for being misleading.Bart Silverstrim : I've only seen this with captive portals (proxies). They redirect when you don't have credentials to go to the site you want, it's not a DNS thing as much as a redirect to a EULA-type page where you get a chance to authenticate. I don't think you can do this thinking like a DNS server because the DNS server wouldn't know how to resolve everything on the Internet all at once; it's not what it's for.facha : Ok, I'd better remove the "captive portal" description from the question.dunxd : I think you might get non "captive portal" answers if you described why exactly you think you need a DNS server to do this.From Maxwell -
If you have a Cisco router, it can be setup to do this:
ip dns server
ip dns spoofing 192.168.1.1From Jason Berg -
If you realy want a DNS-Server, then check out DNSMasq. Using the
--address
Command-Line-Switch and the#
wildcard, this should be very easy:The domain specification works in the same was as for --server, with the additional facility that /#/ matches any domain. Thus --address=/#/1.2.3.4 will always return 1.2.3.4 for any query not answered from /etc/hosts or DHCP and not sent to an upstream nameserver by a more specific --server directive.
Also check out the
--no-hosts
commandline switch.See the Man-Page
facha : Great. Just what I've been looking for. Thanks a lot.Iain : You also need to make sure that dnsmasq doesn't query upstream servers by editing resolv.conf to wrap back to the local machine `nameserver 127.0.0.1`From theomega
0 comments:
Post a Comment