M HYPE SPLASH
// updates

How to change DNS on hotspot

By John Peck

I have a laptop with ubuntu installed, and i turn on wireless hotspot. On my laptop, i have a http server, and i changed /etc/hosts file, and change 127.0.0.1 and my ipaddress(the wireless card interface address) mapped So when i use my brower on my laptop, when i type it will go to my HTTP server. That works perfect. However, my question is the ipod devices connect to my wirless thospot still can not resolve Anyone knows what i am i missing?

Thanks

2 Answers

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

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
  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
1

That depends on you have access to wireless hotspot or not. I you don't you need to install dnsmasq on your ubuntu, and point your DNS to that ubuntu.

If you have access, look for static name address on your router's menu, then add your name and ip address there.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy