Wednesday, January 29, 2014

Register and Download Books Using Kindle for PC While Behind Proxy

Yes, this is another story of proxy workarounds. If you're interested in my other exploits, you can read them here, here and here

A little background. I have several Kindle ebooks that I can read using my mobile phone and my pc at home. Now, I wanted to read here at work but I can't seem to register and download my ebooks, so here's what I've done to overcome this limitation.

1. Of course, I installed Kindle for PC (K4PC). My OS is Windows 7 but I think if you're using another OS, you can "translate" these instructions compatible for your OS.

After downloading the app, I tried to register it to my account but I got this error: Unable to connect at this time. Please try again later.

Not surprising, since I know I'm behind a proxy. I checked if the app has settings for proxy and it has one. To open the proxy settings, click Tools > Options > Network.

I chose Manual proxy configuration since I know my username and password. After saving the settings, I tried registering again and I got this error: Registration timed out. Please try again [1000]

Which is weird since I know I have internet connection and I have filled up the proxy setting properly. I googled kindle for pc proxy and found out that many people have this same dilemma and most of them came to the same conclusion as I did: You cannot use your Kindle (pc or otherwise) when you're behind a proxy. 

Then I stumbled upon Scott Offen's post on Registering Amazon’s SendToKindle Behind A Proxy. Now I'm not familiar with SendToKindle app but then since he solved his Kindle-related problem, I decided to give his solution a try.

His solution is actually simple: use Cntlm proxy. You can read the technical description from its official sourceforge site but for the non-geeks out there, basically Cntlm is a proxy for your proxy.

I'm not a newbie with this application/service. As a matter of fact, I have already used it for downloading gems for my Ruby on Rails in Ubuntu while behind proxy. My previous post details on how to use Cntlm in Ubuntu, we can use the same steps here while using Windows 7.

2. Install Cntlm.
3. Open cntlm.ini using your favorite text editor. You can find it in this path: C:\Program Files (x86)\Cntlm (or depends where you installed your Cntlm).
4. Edit the Cntlm configuration. Enter your username, domain and parent proxy as basic settings. DO NOT enter your password. 
5. To hash your password: 
- Open a command prompt. 
- Go to your Cntlm installation folder by typing: cd C:\Program Files (x86)\Cntlm
- Type: cntlm -v -H -c cntlm.ini
- Enter your password for your proxy and jot down the generated PassLM, PassNT and PassNTLMv2.
- Open cntlm.ini again and enter the generated PassLM, PassNT and PassNTLMv2 to their respective fields. Then save your new settings.
5. Run Cntlm service. You can:
- Click Start > Windows Control Panel > Administrative Tools > Services. Start Cntlm Authentication Proxy service. (Shortcut: Open search/run textbox, type services.msc) OR
- Open command prompt as Admin and type net start cntlm (to start the service) or 
net stop cntlm (to stop the service).
6. FINAL STEP: Open Kindle's network connection settings (Tools > Options > Network), choose
Manual proxy configuration. In HTTP Proxy field, type: localhost and in the Port field: 3128. Leave the other fields blank.

That's it. Register your K4PC and start downloading your books. 

Happy reading! 

2 comments:

  1. Great! You saved my day. Now I got it working through the proxy. Thanks :)

    ReplyDelete
  2. Good information Fast Proxy, very useful post. Thanks for sharing this. I definitely learned something valuable.Must bookmark this blog so that I could come back for more future readings.

    ReplyDelete