Lion Recovery HD Through A Proxy

featured-image-size

We recently purchased a new MacMini Server which came with Lion Server pre-installed. You no longer receive media, as we know – Lion is a media-less release. So I hit a snag when I wanted to restore the MacMini back to a clean install – at work our internet connection goes through a proxy server – as per the Apple documentation, Lion Recovery HD (CMD+R) doesn’t support the use of Proxies!

12 July 2012 - This no longer appears to be working for myself and others. Apple appear to be rejecting requests from people behind a proxy.

Imagine my dismay! How could Apple not allow such a basic function?! Fear not, you are a few simple Terminal commands away from using the Lion Recovery HD feature from behind your proxy.

Fire up the machine holding down the Option key (or using CMD+R). Select your Lion Recovery HD and wait a few seconds. You will be presented with your restore options. If at this point you go ahead and select the Reinstall option, it will fail to contact the Apple Servers and suggest you contact Apple Care.

Nonsense I thought – I’m simply missing the proxy information on my connection to the internet! Only there’s no place you can enter the information via GUI. Even if you open up Safari, the Proxies button in Preferences > Advanced does nothing. I wasn’t prepared to accept that there was no way around this.

Open up Terminal and you can configure the proxy that way using ‘networksetup’. You can assign the proxy to whichever method you are using to connect to the internet (in this example I’m using the Wi-Fi connection):

networksetup -setautoproxyurl Wi-Fi http://your.proxy.url/proxy.pac

What do you know, it then works!

There are a host of other options you can use too. For example, if your enterprise does not use a proxy.pac then you can specify the web proxy alone. For example:

networksetup -setwebproxy Wi-Fi proxy.domain.url 80 off

This sets just the http proxy for the Wi-Fi connection. The proxy url and port number used, and sets the authentication as ‘off’ as our proxy doesn’t use authentication.

For all of the man pages, use:

man networksetup

To see all of the names used for the network service, use:

networksetup -listallnetworkservices

At the current point in time, I can’t see a way of using proxies for the Internet Recovery method (CMD+Option+R). I got error -2003F. So if you need to install Lion this way, you will have to do so from an Internet Connection which doesn’t use a proxy.

Print Friendly

About the Author

I'm an enthusiastic technology lover and work daily in a mixed AD/OD IT environment. Like most, I strive to work on the Apple platform and tolerate the Windows one. I also have a burning passion for music/bass playing and supporting my football club, Arsenal. I use this blog to write useful articles on cool Mac things, and other technology experiences - my trials and tribulations.

  • Nick Hayden

    Hey buddy,

    Nice article.

    Got this to work over WiFi, for some reason it doesn’t want to set the proxy for the Ethernet adapter. Keeps displaying invalid parameter, the device is listed as Ethernet 1, so not sure why it doesn’t like it.

    Anyways, I still don’t understand why Apple can’t just put it onto media…..

    • Simon

      Hi Nick, Pleased you found it of use. Did you try just using ‘Ethernet’ ?

  • Nick Hayden

    Yeah I did, the WiFi failed half way through.

    I also discovered another way of doing it, I simply enabled auto-proxy discovery. You probably already found this but for good measure, see below command.

    networksetup -setproxyautodiscovery “Enthernet 1″ on

    Works like a treat.

    Good goal from Henry last night by the way ;)

  • Willott

    Have you tried this recently? Am trying currently and seeing HTTP 403 errors on our proxy when attempting the restore.

    • http://www.mactasia.co.uk/ Simon

      Hi Willott, after speaking to Apple, it appears they are unwilling to support people trying to use Lion Recovery from behind a proxy.

      This leaves use with a couple of options. Mass deployment strategies like DeployStudio (& NetRestore), or on a smaller scale, simply making up a Lion DVD from InstallESD.dmg in the SharedSupport folder of the Lion Installer.