Question

I am trying to use dnsmasq on Linux to serve as a wifi access point. Windows 7 and an Android smart phone can connect just fine to the Linux system but my iPhone cannot. Both Windows and the iPhone authenticate just fine with wpa_supplicant, but the problem is that the iPhone never gets an ip address.

My config file is very simple for dnsmasq.conf:

# Only listen for DHCP on wlan0
interface=wlan0 
# Create a dhcp range on your /24 wlan0 network with a lease time
dhcp-range=192.168.1.6,192.168.1.15,255.255.255.0,5m
# Configure DHCP        
dhcp-option=3
dhcp-option=6
# Be authoritative with Windows 
dhcp-authoritative

The dnsmasq debug log shows this for Windows and you can see it is successful:

dnsmasq: started, version 2.65 cachesize 150
dnsmasq: compile time options: no-IPv6 GNU-getopt DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack
dnsmasq-dhcp: DHCP, IP range 192.168.1.6 -- 192.168.1.15, lease time 5m
dnsmasq: failed to access /etc/resolv.conf: No such file or directory
dnsmasq: failed to load names from /etc/hosts: No such file or directory
dnsmasq-dhcp: DHCPREQUEST(wlan0) 192.168.1.14 24:77:03:2b:79:20 
dnsmasq-dhcp: Ignoring domain global.tektronix.net for DHCP host name PC-MSP-183B
dnsmasq-dhcp: DHCPACK(wlan0) 192.168.1.14 24:77:03:2b:79:20 PC-MSP-183B
dnsmasq-dhcp: DHCPINFORM(wlan0) 192.168.1.14 24:77:03:2b:79:20 
dnsmasq-dhcp: DHCPACK(wlan0) 192.168.1.14 24:77:03:2b:79:20 PC-MSP-183B

However, it shows this for the iPhone:

dnsmasq: started, version 2.65 cachesize 150
dnsmasq: compile time options: no-IPv6 GNU-getopt DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack
dnsmasq-dhcp: DHCP, IP range 192.168.1.6 -- 192.168.1.15, lease time 5m
dnsmasq: failed to access /etc/resolv.conf: No such file or directory
dnsmasq: failed to load names from /etc/hosts: No such file or directory
dnsmasq-dhcp: DHCPREQUEST(wlan0) 192.168.1.15 84:38:35:df:5f:c2 
dnsmasq-dhcp: DHCPACK(wlan0) 192.168.1.15 84:38:35:df:5f:c2 iPhone
dnsmasq-dhcp: DHCPREQUEST(wlan0) 192.168.1.15 84:38:35:df:5f:c2 
dnsmasq-dhcp: DHCPACK(wlan0) 192.168.1.15 84:38:35:df:5f:c2 iPhone

And it just sits there!

Any suggestions or help? Thanks!

Was it helpful?

Solution

It works with iPhone if you remove the following option:

dhcp-option=3

Comment that out and iPhone can connect.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top