View Single Post
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, 212 views)
Pipeliners is offline   Reply With Quote