4

I'm trying to configure a WiFi access point to offer a web service on the local network, without offering clients internet access. The web server has a fixed IP address (let's say 192.168.2.2) and for user friendliness a local dns server assigns it the domain name app.com.

However, when an iOS 8 iPad connects to the network, it automatically tries to determine whether the WiFi network is "usable" - meaning it provides internet. If it fails, the iPad disconnects automatically.

We found this answer suggesting setting the DHCP server(udhcpd in our case)'s DHCP gateway to 0.0.0.0 ("null") and using static DHCP configuration. However, we wish to use DHCP, and indeed clients are no longer automatically assigned an IP when we unset udhcpd's DHCP gateway(router option). This is the relevant section of our udhcpd.conf, in case it helps:

start 192.168.2.100
end 192.168.2.149
max_leases 50
interface br0
remaining yes
option subnet 255.255.255.0
#option router 192.168.2.1

So, is there a way to tell iOS devices to stay connected to a WiFi network while still using DHCP for client IP's, subnet and DNS configuration?

2 Answers2

1

If it's possible, try to allow TCP traffic to apple.com and icloud.com. On my hotspot it prevents iPhone from thinking that it uses a hotspot. Hope it'll help you.

andrey
  • 111
0

Actually what you do is a Captive Portal. You provide an AP without Internet access. Main OSes states it is captive, while you are not logged-in, authenticated, or while you dont have agreed ToS.

This can be frustrating, but it is like that. OSes think the mainstream way (like hotspots in hostels, restaurants, starbuck, etc.). I dont know the 0.0.0.0 trick, but it seems wrong a priori.

There had been ways to fool iOS. But they have been "fixed" by Apple. iOS & OSX calls an url and expect a specific answer. Now you cannot determine exactly which IP is called, neither which answer is expected.

Well, I did this way:

  • I created a 'welcome' page, with one button "I agree ToS" (or what you want),
  • when you join the Wifi, the captive iOS popup opens and displays the welcome page.
  • When you click the button, my router opens full access to Internet for some seconds for this user MAC adress.
  • Once done, the iOS popup displays automatically a "OK" button.
  • When you click it, the Wifi is hooked, def' joined.
  • Finally, I re-close the portal. My Wifi is still captive, but joined.

That all is rather a matter of iptables than dhcp.

You have to learn about Captive Portals and how iOS manages it. The only way IMO.

ArchiT3K
  • 155