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.

Scenario: Linux machine running as a DHCP, DNS, Webserver. This is what I'm looking for: When another machines connects to the network and try to surf, every attempt to browse a web page, they will land on the Webserver mentioned above. Solution: Can the DNS server do this for me? Redirect all requests to a specified webadress?

Is Captive Portal the only way to do this? I would really like the DNS just to do this instead.

share|improve this question
add comment

1 Answer

DNS resolves (host)names to IP addresses. You can configure wildcard-records to resolve any given name to the address of your server. However, it will only work as long as the clients use your DNS server for name resolution, and it will affect any DNS lookup against your server, not only HTTP requests. A transparent proxy might be a better solution.

share|improve this answer
    
I'm not that experienced with bind, but theoretically, the record will be similar to . goes to mywebpage.com. So attempts to go to google.com, serverfault.com etc will go to mywebpage.com? –  user137717 Sep 20 '12 at 12:44
    
With a global wildcard record: yes. –  Ansgar Wiechers Sep 20 '12 at 14:17
add comment

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.