Push Forward Proxy info within DHCP
Is it possible to "push" Forward proxy info to clients using DHCP (with some option)?
Regards
Kostas
Dual 1.25 PowerPC G4 - MacBook Pro 2.16, Mac OS X (10.6.4), ACT 10.6, ACTC 10.6, ACMT
Dual 1.25 PowerPC G4 - MacBook Pro 2.16, Mac OS X (10.6.4), ACT 10.6, ACTC 10.6, ACMT
Kostas B wrote:
Hello,
Is it possible to "push" Forward proxy info to clients using DHCP (with some option)?
Regards
Kostas
<code><key>dhcpoption252</key>
<data>
aHR0cDovL3dwYWQuZXhhbXBsZS5jb20vd3BhZC5kYXQ=
</data>
John Lockwood wrote:
Update: I notice Mac OS X 10.6 now has a "Auto Proxy Discover" option, as Apple do not provide any real documentation for this level of detail, only they know for sure what this does. However it does sound like it might implement the DHCP and DNS methods of auto-discovery. This option was not present in Mac OS X 10.5. If this is what it does you do not need to turn on and fill in the "Automatic Proxy Configuration" option.
JannieH wrote:
Hi John
Would just like to add a bit of info I found through a lengthy troubleshooting process. Maybe you can feed that back into Apple also 🙂
(Technical explanation to follow, summary towards the end)
I suspect part of the reason many people can't get the WPAD DHCP mechanism to work, is because they're using Windows-based DHCP servers - not an uncommon thing in many corporate environments.
The problem is seemingly due to an incompatibility between Microsoft DHCP and OSX' WPAD implementation. (BTW, OS X does implement WPAD properly, contrary to some claims by the majority of Google posts on the topic.)
The WPAD protocol first tries settings supplied in DHCP - option 252 - and then falls back to trying to resolve through DNS if that fails (i.e. the default of http://wpad/wpad.dat.)
Trouble is, when Microsoft's DHCP implementation (and possibly other implementations that interpret the RFC the same) supply a string in a DHCP option, it null-terminates it. The DHCP RFC says that this "should" not be done (i.e. it's permitted but not recommended.) However, the RFC also says that clients that receive options "should" cater for the possibility of the string being null-terminated.
JannieH wrote:
Apologies for the delay in responding.
Correct, it does seem that the only realistic way to resolve this permanently would be for Apple to modify DHCP client behaviour.
Also, I can confirm that DNS resolution of WPAD works properly provided that DHCP option 252 is not set, as OSX correctly gives DHCP discovery priority.
Unfortunately I don't know the OSX version of the machine we tested on - I'm a Windows guy that was just doing troubleshooting, so didn't think to check! We did the testing in early October 2010, so presumably whatever was current at the time.
An HTTP redirect might work - I tried it, but the Windows IIS web server I was using didn't take too kindly to null characters, so wasn't able to use that option as a workaround myself. But it should be possible.
Push Forward Proxy info within DHCP