For the past six weeks that I've had my iPad, I've fought with my office network, because it uses a Microsoft/NTLM authenticated proxy server which wreaks havoc on the iPhone OS's ability to use the Internet effectively (especially for third party apps).
After reading through countless forum support requests for people asking the same questions, I've finally found a (mostly) workable solution for this problem—at least for most apps and browsing on the iPad.
Doubling the Proxy
Since the iPhone OS seems to have a pretty hard time dealing with proxy authentication (most apps don't act like there's even an internet connection, even if Safari will work through the proxy), I used a solution I often use on my Macs at work: doubling up the proxy.
Basically, you can use an application like Authoxy on the Mac to make the Mac translate all its web traffic through a special internal connection, which gets messaged correctly by Authoxy to work with your company's proxy server.
For the iPad, however, you will need a different way of funneling your connection through your Mac to your iPad. First, you need to turn on Internet Sharing with your Mac (instructions), then you will need to download and run NTLMaps, which is a little command-line python script that works similarly to Authoxy, but is a little more efficient in what it does, and works better with the iPad.
To run NTLMaps, all you need to do is open up the Terminal and type in
This will run the python script that kicks off the appropriate connections on your Mac. To configure NTLMaps for your network, you need to open up the included server.cfg file (in the same folder as main.py) in your favorite text editor, and read through it to make the changes for your network environment.
For my purposes, I edited the following:
- # The port on which your computer will act as a proxy server
- # Your office's proxy server
- # Your office's proxy server port
- # Set this to 1 to allow your iPad to connect
- # The domain of your windows network
- # Your network username
- # Your network password
You can read through the other options, but these are what are necessary to get you started.
Connecting on your iPad/iPhone/iPod
Once you have the NTLMap script running on your Mac (you'll see
Now listening at your-computer-name.domain.org on port 8082 in the Terminal window), and you have Internet Sharing turned on, you can connect to your Mac's shared WiFi connection on the iPad.
Under the HTTP Proxy settings for your wifi network (click the blue right arrow next to your wifi connection's name to get to the settings for that network), enter the following information:
- Tap on 'Manual' for the HTTP Proxy type.
- Enter your Mac's IP address (look above at the 'Router' value) for 'Server.'
- Enter the port you have set as "LISTEN_PORT" in NTLMap.
- Leave 'Authentication' set to OFF.
You should now be able to open up Safari, Twitteriffic, WeatherBug, Dropbox, and any other Internet-enabled app and get online pretty easily.
I'm still working on finding a way to get my mail to route correctly to the iPad's built-in Mail app, but for now, most everything works great!
Researching this further, I might be able to use SOCKS via HTTP to tunnel the common mail ports, like mail (25/26, 443, etc.) through my HTTP proxy connection set up through NTLMaps. We'll see.
To make this a bit easier to run, I moved my installation of NTLM into my /etc/ folder (so to run it I can type
/etc/ntlmaps/main.pyin the Terminal.
On top of that, I created a new text file with the name ntlmaps.command, with the contents below, which is basically a shell script that runs when you double-click it in the Finder. The .command file needs to be made executable (in Terminal, type in
chmod ug+x /path/to/filename.command):
Thanks for putting this online!
Can this be done in a windows system?
Not easily... I have little experience using unix-y command line tools on a windows machine, but I know there are ports of many things, and many ways to achieve this. Probably not easy, though.
Check here for some ideas: http://forums.whirlpool.net.au/archive/1308699
Thanks i just tried what u said in windows but it didn`t work .. I will check u r other link.. anyway thanks for sharing :)
Hey it`s working in Windows7 .. I use this software called Connectify and also use NTLmaps and it works
Awesome! I'm glad you could find a solution. Thanks, also, for sharing!