or Connect
AppleInsider › Forums › Software › Mac OS X › iPad to view local domains on LAN
New Posts  All Forums:Forum Nav:

iPad to view local domains on LAN

post #1 of 24
Thread Starter 

Hi folks. 

 

I just bought an iPad.  My workstation has local domains (i.e. localtest.local) where I write web stuff. My workstation sees these items because I enter them in the hosts file, and the Apache directives points the requests to a directory inside /Library/WebServer/Documents/.  My iPad can't see them, and I'd like it to know that it's on that box, so that the Apache conf file can direct it to the right location.  

 

How do I do this?  

 

Cheers

post #2 of 24
Quote:
Originally Posted by BeeRich View Post

Hi folks. 

 

I just bought an iPad.  My workstation has local domains (i.e. localtest.local) where I write web stuff. My workstation sees these items because I enter them in the hosts file, and the Apache directives points the requests to a directory inside /Library/WebServer/Documents/.  My iPad can't see them, and I'd like it to know that it's on that box, so that the Apache conf file can direct it to the right location.  

 

How do I do this?  

 

Cheers

 

Unless there is a hosts file that you can edit in iOS, and I don't think there is, then I guess that you will need a local DNS server to point to the workstation.

post #3 of 24
There is also a proxy server option:

http://benjaminrojas.net/view-mamp-virtual-hosts-on-your-ipad-and-iphone-over-the-local-network/

If it's for quick testing, you can try setting the iPad proxy to the IP of the workstation without properly setting up a proxy but it won't work in all cases and it will break internet access until you turn off the proxy.
post #4 of 24
Quote:
Originally Posted by Marvin View Post

There is also a proxy server option:

http://benjaminrojas.net/view-mamp-virtual-hosts-on-your-ipad-and-iphone-over-the-local-network/

If it's for quick testing, you can try setting the iPad proxy to the IP of the workstation without properly setting up a proxy but it won't work in all cases and it will break internet access until you turn off the proxy.

 

Very clever - I did not realize that you could set up a squid on OSX.

post #5 of 24
Thread Starter 

Hi guys.  Thanks for the notes.  

 

I am running my own DNS, and thought that should be the solution, but I don't want to open my workstation up to outside.  What type of record should I create?  An A Record with localtest.local pointing to 192.168.1.15 (my workstation)?

 

Cheers

post #6 of 24
Quote:
Originally Posted by BeeRich View Post

Hi guys.  Thanks for the notes.  

 

I am running my own DNS, and thought that should be the solution, but I don't want to open my workstation up to outside.  What type of record should I create?  An A Record with localtest.local pointing to 192.168.1.15 (my workstation)?

 

Cheers

 

Yes - that is what I would do. It presents no risk from outside your LAN.

post #7 of 24
Thread Starter 

I'm hosting DNS on a Mac OS X Server box.  Entered localtest.local and pointed it at my workstation.  Still no worky.

 

Stuck.  

post #8 of 24
Quote:
Originally Posted by BeeRich View Post

I'm hosting DNS on a Mac OS X Server box.  Entered localtest.local and pointed it at my workstation.  Still no worky.

Stuck.  

Did you put the IP of the DNS server into the iPad's wifi DNS settings?
post #9 of 24
Thread Starter 

Yes I did.  Both are static IP's on the LAN.  

post #10 of 24
Quote:
Originally Posted by BeeRich View Post

Yes I did.  Both are static IP's on the LAN.  

So the iPad has a static IP and only the IP of the workstation as its DNS server? Does it connect OK to external sites?
post #11 of 24
Thread Starter 

No.  

 

iPad, server, and workstation all fixed IP's.  Server running OSX Server, running DNS.  DNS entry of localtest.local on server, pointing to workstation.  Many VHosts on workstation.  

post #12 of 24
Quote:
Originally Posted by BeeRich View Post

No.  

iPad, server, and workstation all fixed IP's.  Server running OSX Server, running DNS.  DNS entry of localtest.local on server, pointing to workstation.  Many VHosts on workstation.  

Ok. The DNS is running on a separate server, not on the workstation. So the iPad network settings should have only the server IP as its sole DNS server, and the server should have the A record that you mentioned.

So back to the other question - does the iPad connect OK to external sites, which will tell you whether or not it is getting DNS responses from the server?
post #13 of 24
Thread Starter 

Sorry about the delay in responding.  There was no notice of this last post.  

 

Everything you say is true.  

 

Server: localtest.local. as Secondary Zone, pointing to my workstation IP.  I can ping it, which goes to my workstation IP. All seems great.  

 

iPad:  Static IP within 192.168 range, router 192.168.1.1 (Airport Extreme), DNS set to the server IP.  

 

It seems internal DNS isn't working all too well.  I tried looking for an unknown domain on the iPad, and checked the DNS log.  It did a CreateFetch for that domain, everything worked.  So I review the logs for localtest.local:

 

 

 

Quote:
17-Nov-2012 16:00:01.155 zone localtest.local/IN/com.apple.ServerAdmin.DNS.public: refresh: retry limit for master 192.168.1.15#53 exceeded (source 0.0.0.0#0)
17-Nov-2012 16:00:01.155 queue_xfrin: zone localtest.local/IN/com.apple.ServerAdmin.DNS.public: enter
17-Nov-2012 16:00:01.155 zone localtest.local/IN/com.apple.ServerAdmin.DNS.public: Transfer started.
17-Nov-2012 16:00:01.155 zone localtest.local/IN/com.apple.ServerAdmin.DNS.public: no database exists yet, requesting AXFR of initial version from 192.168.1.15#53
17-Nov-2012 16:00:01.156 transfer of 'localtest.local/IN/com.apple.ServerAdmin.DNS.public' from 192.168.1.15#53: failed to connect: connection refused
17-Nov-2012 16:00:01.156 zone localtest.local/IN/com.apple.ServerAdmin.DNS.public: zone transfer finished: connection refused
17-Nov-2012 16:00:01.156 transfer of 'localtest.local/IN/com.apple.ServerAdmin.DNS.public' from 192.168.1.15#53: end of transfer

 

 

No clue what that all means.  But I'm sitting on that workstation right now, and I can bring up that localtest.local no problem.  I use it all the time.  But that hosts file is what gets looked at first, so I don't think it even asks the LAN DNS.  

post #14 of 24
Quote:
Originally Posted by BeeRich View Post

Sorry about the delay in responding.  There was no notice of this last post.  

 

Everything you say is true.  

 

Server: localtest.local. as Secondary Zone, pointing to my workstation IP.  I can ping it, which goes to my workstation IP. All seems great.  

 

iPad:  Static IP within 192.168 range, router 192.168.1.1 (Airport Extreme), DNS set to the server IP.  

 

It seems internal DNS isn't working all too well.  I tried looking for an unknown domain on the iPad, and checked the DNS log.  It did a CreateFetch for that domain, everything worked.  So I review the logs for localtest.local:

 

 

 

Quote:
17-Nov-2012 16:00:01.155 zone localtest.local/IN/com.apple.ServerAdmin.DNS.public: refresh: retry limit for master 192.168.1.15#53 exceeded (source 0.0.0.0#0)
17-Nov-2012 16:00:01.155 queue_xfrin: zone localtest.local/IN/com.apple.ServerAdmin.DNS.public: enter
17-Nov-2012 16:00:01.155 zone localtest.local/IN/com.apple.ServerAdmin.DNS.public: Transfer started.
17-Nov-2012 16:00:01.155 zone localtest.local/IN/com.apple.ServerAdmin.DNS.public: no database exists yet, requesting AXFR of initial version from 192.168.1.15#53
17-Nov-2012 16:00:01.156 transfer of 'localtest.local/IN/com.apple.ServerAdmin.DNS.public' from 192.168.1.15#53: failed to connect: connection refused
17-Nov-2012 16:00:01.156 zone localtest.local/IN/com.apple.ServerAdmin.DNS.public: zone transfer finished: connection refused
17-Nov-2012 16:00:01.156 transfer of 'localtest.local/IN/com.apple.ServerAdmin.DNS.public' from 192.168.1.15#53: end of transfer

 

 

No clue what that all means.  But I'm sitting on that workstation right now, and I can bring up that localtest.local no problem.  I use it all the time.  But that hosts file is what gets looked at first, so I don't think it even asks the LAN DNS.  

 

You could try deleting the entry from the workstation hosts file, clear the DNS cache, and then see if it works for the workstation. Or just do a direct query from a terminal session to the server and see what it returns.

post #15 of 24
Thread Starter 

OK, the workstation is indeed relying on the hosts file.  When commented out, it goes blind about itself hosting localtest.local.  

post #16 of 24
Quote:
Originally Posted by BeeRich View Post

OK, the workstation is indeed relying on the hosts file.  When commented out, it goes blind about itself hosting localtest.local.  

 

One question still remaining - does your local DNS server actually work - i.e. does the iPad successfully get external DNS data from it?

 

Also, since localtest.local is not in your local domain, it will need its own zone file. I added that entry to my own local DNS in that way and it works fine.

post #17 of 24
Thread Starter 

Yes.  The iPad works just fine.  Quite fast, actually.  Requests for new domains come up in the log.  I set a laptop on WiFi to the DNS box alone, and it's working as well.  

 

Same localtest.local issue on that laptop as well.  So no internal resolution whatsoever.  

 

update: I can see localtest.local when asking Safari on the server.  That's strange.  

post #18 of 24
Quote:
Originally Posted by BeeRich View Post

Yes.  The iPad works just fine.  Quite fast, actually.  Requests for new domains come up in the log.  I set a laptop on WiFi to the DNS box alone, and it's working as well.  

 

Same localtest.local issue on that laptop as well.  So no internal resolution whatsoever.  

 

update: I can see localtest.local when asking Safari on the server.  That's strange.  

 

So did you check the zone files to make sure that localtest.local has its own?

post #19 of 24
Thread Starter 

Several times.  It's showing in the admin.  Secondary Zone.  

post #20 of 24
Quote:
Originally Posted by BeeRich View Post

Several times.  It's showing in the admin.  Secondary Zone.  

 

OK - so on your laptop, in a terminal window, what do you get when you query the local DNS:

 

 

dig @[local DNS server IP address] -q localtest.local
post #21 of 24
Thread Starter 

invalid address

post #22 of 24
Quote:
Originally Posted by BeeRich View Post

invalid address

 

Are you sure you typed that correctly? Invalid address is not a possible answer to that query.

post #23 of 24
Thread Starter 

That's what it came up with both on the laptop and my workstation.  

 

dig: invalid address localtest.local

post #24 of 24
Quote:
Originally Posted by BeeRich View Post

That's what it came up with both on the laptop and my workstation.  

 

dig: invalid address localtest.local

 

Are you sure you didn't type -b instead of -q?

New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Mac OS X
AppleInsider › Forums › Software › Mac OS X › iPad to view local domains on LAN