Relevant mostly to OS X admins
Just because it isn’t logged…
September 16, 2014Posted by on
… doesn’t prove it’s not working.
With the release of iOS8 this week, I wanted to make use of Caching Server on work’s guest WiFi, as I figure I’ll have a few early adopter staff looking to upgrade their personal devices. In my setup, the guest SSID is tagged with a VLAN, which is routed straight out to the internet. My Caching Server had no connection to that VLAN, so the first step was to add that VLAN to the switch port the OS X Server running Caching Server was connected to.
With the Guest WiFi VLAN now available to the Caching Server, it needed a new network interface associated with that VLAN. That is done via System Preferences: Network: Gear button: Manage Virtual Interfaces:
Then the [+] to Add a new VLAN:
Name it usefully, associate it with the proper tag and interface for your environment (probably Ethernet), and [create].
With this, my new virtual interface came up with an IP on the Guest wireless subnet, as would be expected.
Per OSX Server documentation, the default behavior for Caching Server is to listen on all interfaces. To confirm this was happening, I put Caching Server into verbose mode via
sudo serveradmin settings caching:LogLevel = verbose
And restarted the service, while tailing /Library/Server/Caching/Logs/Debug.log . This is where I got concerned: the log only acknowledged “registering” on the local subnet, with no mention of the VLAN network. After some troubleshooting, I was able to confirm it really was listening on the VLAN, by noting what port the HTTP server was started on (as listed in the log), and pointing a browser from a machine on the Guest WiFi to that Caching Server:port combination.
When you do this, the client browser will return a blank page, and Debug.log on the Caching Server will record a Error 400 – Bad Request from that source machine, citing a non-whitelisted URL. This confirms that the service is listening on the added VLAN, despite not being mentioned in the verbose log. Therefore, the documentation is correct: unless overridden, Caching Server is active on all interfaces. Don’t let the fact that the log doesn’t acknowledge multiple interfaces bother you, as I did.
If you wish to use Caching Server for multiple networks in this way, it’s important to make sure they both appear to the internet from the same WAN IP. Caching Server will only be available to clients that contact Apple from the same network that the Caching Server did.
And then it turns out that Caching Server can’t/won’t/doesn’t cache iOS8. Sometimes you just can’t get ahead of the game.