...stuff I do and things I like...

Thursday, December 24 2009

Kindle 2 tethering - the lame way

This is for educational purposes only! I just did this to get it working not for abusing the Kindle's Internet capabilities.

First enable USB networking, if you have firmware 2.3 than see my older post here. Now you can login to your Kindle 2 via SSH.

Copy tcpdump to your Kindle 2. Login to the Kindle and run tcpdump -nAi ppp0 -s0 than browse the web using your Kindle's web browser. Search the output of tcpdump for the x-fsn header. The x-fsn header seems to be used for authenticating to the Kindle HTTP proxy (fints-g7g.amazon.com).

HTTP header as sent to the proxy by the Kindle's browser (NetFront):
    GET http://www.heise.de HTTP/1.1
    Accept: image/png, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
    Host: www.heise.de
    User-Agent: Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.3 (screen 600x800; rotate)
    Proxy-Connection: Keep-Alive
    Accept-Encoding: deflate, gzip
    x-fsn: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    x-appNamespace: WEB_BROWSER
    x-appId: Kindle_2.2


Install the Modify Headers Firefox plugin. The plugin allows to add arbitrary HTTP headers to Firefox. Now add the x-fsn header with the value observed through looking at your own traffic.

Finally login and port forward a local port on your computer to Amazon's Kindle proxy (fints-g7g.amazon.com = 8099:72.21.210.242). Do this via: ssh -L 8099:72.21.210.242:80 root@192.168.2.2. Now configure a HTTP proxy in your Firefox preferences (127.0.0.1 at 8099).

Now you should be able to browse the web using your Kindle's 3G connecting. Of course you shouldn't do this regularly, just once for the fun.