I have a linux server has an ad-hoc wireless network for clients to connect to. Once connected I want users to always be redirected to it’s own web server no matter what URL they type in. The large solution would be to set up a full DNS server (with BIND or equivalent) but that seems like overkill. All I need is a simple program that will listen for any DNS request and always respond with the same IP address.
I looked around for one but couldn’t seem to find one. It would preferably be written in C or Perl as I don’t really want to install any other scripting languages.
Advertisement
Answer
Use Net::DNS::Nameserver and write your own reply handler.
For C, look at: