How to change DNS on hotspot

Solution 1:

Changes on /etc/hosts file only affect the local machine.

Here is the problem: Assume that your wireless hotspot (or your router) is running DHCP and also act as local DNS. When you open browser and navigate to any webpage, your browser will first look at your etc/hosts to see if there is any match entry. If not, it will ask the local DNS running on your router/wireless hotspot. Unfortunately, there is no such entry like this on your local DNS. That's why your ipod failed to open www.mydomain.com

In order to achieve your goal, here is one option (unfortunately, it's not simple)

  1. Setup a DNS server on your laptop to resolve www.mydomain.com
  2. Config the DNS server to forward unknown query to your local DNS running on your router/wireless hotspot
  3. Change DHCP server on your router/wireless hotspot to return IP of your labtop in DCHP response

There are 2 potential problems with this solution:

  1. Your laptop must be running all the time
  2. You also need to config static IP for your laptop