iPad to view local domains on LAN
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
Comments
Quote:
Originally Posted by BeeRich
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.
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.
Quote:
Originally Posted by Marvin
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.
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
Quote:
Originally Posted by BeeRich
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.
This would be a good one to for...
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?
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?
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?
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.
Quote:
Originally Posted by BeeRich
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.
OK, the workstation is indeed relying on the hosts file. When commented out, it goes blind about itself hosting localtest.local.
Quote:
Originally Posted by BeeRich
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.
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.
Quote:
Originally Posted by BeeRich
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?
Several times. It's showing in the admin. Secondary Zone.
Quote:
Originally Posted by BeeRich
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