Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-03-2012, 04:54 AM   #1
Pipeliners
Member
Pipeliners began at the beginning.
 
Posts: 10
Karma: 36
Join Date: Dec 2011
Device: Kindle 3G WiFi
OpenVPN on Kindle 3G

I eventually managed to run OpenVPN on my Kindle 3 device.
I'll write short story and instructions now and if somebody wants i'll complete them.

DISCLAIMER: that was the first time I hacked Linux kernel. I think I could have done something wrong.

1. You have to install OpenVPN properly. I used the simplest way and installed Debian chroot (FIXME link) and then ran `aptitude install openvpn'
2. It won't run because Kindle linux kernel doesn't have TUN driver. You have to build it yourself or used attached tun.ko module. {
2.1. Download latest Kindle firmware sources from http://www.amazon.com/gp/help/custom...deId=200203720
2.2. Install ARM crosscompiling toolchain. I got one from ftp://ftp.denx.de/pub/eldk/4.2/arm-l...2008-11-24.iso
2.3. -- To be completed
}
3. Copy resulting tun.ko module to Debian chroot on Kindle.
4. You can now run OpenVPN with script like this:
Code:
#!/bin/sh
vpnsetup () {
	echo "Starting VPN..."
	insmod /lib/modules/2.6.26-rt-lab126/kernel/drivers/net/tun.ko
	cd /etc/openvpn/
	iptables -A INPUT -i tap0 -j ACCEPT
	openvpn YOURCONFIG.conf
}
vpnshutdown () {
	echo "Stopping VPN..."
	iptables -D INPUT -i tap0 -j ACCEPT
	rmmod tun
}

trap vpnshutdown 1 2 9 15
vpnsetup
Attached Files
File Type: zip tun.ko.zip (6.2 KB, 203 views)
Pipeliners is offline   Reply With Quote
Old 02-03-2012, 05:05 AM   #2
dasmoover
Connoisseur
dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.
 
Posts: 84
Karma: 26720
Join Date: Mar 2011
Device: Kindle 3 WIFI
I thank you very much for this my good sir.
dasmoover is offline   Reply With Quote
Advert
Old 02-03-2012, 03:36 PM   #3
Pipeliners
Member
Pipeliners began at the beginning.
 
Posts: 10
Karma: 36
Join Date: Dec 2011
Device: Kindle 3G WiFi
// I can not see edit button for the post so continue in comments.
2.2. Install ELDK. I did it this way:
Code:
# mount -o loop -t iso9660 arm-2008-11-24.iso /mnt/tmp
# adduser arm-eldk
# su arm-eldk

$ /mnt/tmp/install
$ echo '. $HOME/eldk_init arm' >> .bashrc
$ source $HOME/eldk_init arm
Now we can build test program with arm-linux-gcc

2.3. Configuring and building kernel.
Code:
$ make imx35_luigi_defconfig
$ make menuconfig
Device Drivers --->
   Network device support --->[*]Network device support
<M>   Universal TUN/TAP device driver support

$ sed -e 's/CONFIG_INITRAMFS_SOURCE=.*/CONFIG_INITRAMFS_SOURCE=""/' -i .config
$ make modules
Enjoy your own tun.ko at ./drivers/net!

Special thanks to
Pipeliners is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
openvpn n6pfk enTourage Archive 5 05-16-2011 12:07 AM
PocketBook 903 Pro - OpenVPN? stvader PocketBook 1 11-14-2010 06:37 AM
Classic OpenVPN on your nook stangri Barnes & Noble NOOK 28 03-11-2010 12:27 AM
OpenVPN on Iliad karioka iRex 10 09-02-2008 03:46 AM


All times are GMT -4. The time now is 12:13 PM.


MobileRead.com is a privately owned, operated and funded community.