Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
= About = andreth is a basic _And_roid _re_verse te_th_ering script that will allow your Android powered device to use the LAN connection of your linux box to connect to the internet. = Prerequisites = You'll need * python 2.7 * the Android SDK on your linux box * a working adb setup * the ability to execute commands as root on your machine You need to enable * USB debugging on your device. = Usage = $ sudo python andreth.py -h usage: andreth.py [-h] [-l IP] [-r IP] [-i IFACE] Reverse tethering over USB for your Android device optional arguments: -h, --help show this help message and exit -l IP, --local-ip IP the IP on the host side of the PPP tunnel [default: 192.168.55.51] -r IP, --remote-ip IP the IP on the device side of the PPP tunnel [default: 192.168.55.52] -i IFACE, --interface IFACE the interface that provides the internet connection [default: eth0] $ = Notes = 1.) andreth needs to be run as root in order to * enable/disable packet forwarding in the kernel * set up/tear down the firewall rules for NATting * create/destroy the PPP tunnel device 2.) The local and remote IPs need to be unique in your networking environment. They don't have to be from the same subnet or lie within the same subnet as the interface providing the uplink. So I suggest you chose two IP addresses from an unused private subnet. = Troubleshooting = In case you don't get replies to your packages, you might wanna check the firewall rules on your linux box. cf . = Disclaimer = I stole the information on how to make Android use reverse tethering over USB from xda developers and wrapped them in this small script. All props to them. In addition, I borrowed the syntax to teach iptables NATting rules from freyo. Thx to him as well. = More Information = In case this script is too basic for your needs, you can find more information here. Obviously, I would be glad if you forked this project, patched the script and sent me merge requests so everyone may profit from your enhancements. Thx. -----  http://developer.android.com/sdk/index.html  cf http://forum.xda-developers.com/showthread.php?t=640158 for the 'no permissions' problem  for setting up the tunnel device  so andreth can configure it via the USB connection  http://forum.xda-developers.com/showthread.php?t=835912  http://blog.mycila.com/2010/06/reverse-usb-tethering-with-android-22.html  http://www.xinotes.org/notes/note/1500/