2

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 www.myOwnDomain.com So when i use my brower on my laptop, when i type www.mydomain.com 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 www.mydomain.com. Anyone knows what i am i missing?

Thanks

2 Answers 2

3

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
1
  • thanks, that's also what i thought. i miss the dns server and static ip
    – Grey
    May 6, 2013 at 18:43
-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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .