title: How to run an offline DNS Server on Android?
body: <p>Let me explain the situation: </p>
  
  <p>I am using my android phone as WiFi hotspot that gives a code (that user can reedem on my shop) when he has completed a registration. 
  I need to use my phone because I do this on the beach and the only way to to this is having something portable.</p>
  
  <p>Okay, so:
  I have used this tecnique so far and everithing gone well, i have set up a webserver on my phone and using some iptables i redirected all the traffic to my captive portal when a user tries to surf the net.</p>
  
  <p>It worked like this: 
  USER asked my phone: "Hey what's the IP for google.com?"
  MY PHONE connected to DNS and received the correct IP.
  IPTABLES manipulated this IP to send to USER the local ip of my captive portal.</p>
  
  <p>But there's a big problem: i need mobile data on!! And on the beach many times i do not have signal and when a user connect to my hotspot, it gives DNS error instead of my captive portal.</p>
  
  <p>The only solution is to run an offline DNS server that doesn't require internet to hijack all the request to the captive portal.</p>
  
  <p>I use BitWebServer as ligthhttpd server and i looked for DNS Server to run my DNS offline but i am really confused and i don't know where to start.</p>
  
  <p>Someone of you have and idea? I just need to redirect all the request that comes from USER connected to my hotspot to the captive portal WITHOUT using internet. </p>
  
  <p>Thanks in advice, regards
  Giorgio</p>