[sf-lug] Android mobile phone tethered to computer

Micah Lee micahflee at gmail.com
Thu Feb 24 16:13:03 PST 2011

This isn't all that straight-forward, and you need to have an ssh
account on a server somewhere on the internet. But it works!

Download ConnectBot from the android market (an android ssh client).
Connect to your ssh server. After you connect press Menu, and select
Port Forwards. Add a port forward of type "Dynamic (SOCKS)" and put it
on port 8080. What this means is while you're connected to this ssh
server on your phone, localhost:8080 on your phone is a socks5 proxy server.

On your computer, install the Android SDK. Once it's installed and you
put the Android SDK tools folder in your path, there's a tool called adb
that lets you manage your android phones and emulators running. To get a
list of attached android devices, plug in your phone and type:

adb list

You might need to use adb as root if permissions aren't set up right.
Once adb works, you can run this:

adb forward tcp:8080 tcp:8080

This will forward port 8080 on your phone to port 8080 on your laptop.
Then you can open up Firefox and install the plugin FoxyProxy Basic.
It's a simple proxy server switcher. Add a proxy server (I call mine
sshtunnel) to it that's listening on localhost, port 8080, and make sure
to check that it's a SOCKS5 proxy (not an http proxy).

Then you can tell FoxyProxy to use the sshtunnel proxy. What will happen
is when you go to websites you'll be tunneling through your laptop on
port 8080, which will then be tunneling through your phone on port 8080,
which will then be tunneling through your remote server over ssh. Your
IP address in Firefox will be your ssh server's IP.

In summary:
- Use ConnectBot to connect to your ssh server with dynamic port forwardnig
- Run "adb forward tcp:8080 tcp:8080" on your laptop (you might want to
put it in a script)
- In Firefox, set FoxyProxy to use sshtunnel

You now have tethered internet on your linux laptop without a rooted
phone or paying for anything, using only open source software.

The downside is this isn't like a VPN like PdaNet is, this is just a
SOCKS5 proxy server. If you want to use more software than just Firefox
to access the internet you'll need to configure it to use your SOCKS5
proxy on localhost:8080. But this is easy to configure in thunderbird,
pidgin, etc.


On 02/24/2011 11:22 AM, Bobbie Sellers wrote:
>     The process is described at this url:
> <http://www.howtogeek.com/howto/44304/how-to-use-your-android-phone-as-a-modem-no-rooting-required/>
>     Are there Linux equivalent softwares?
>     later
>     bliss
> _______________________________________________
> sf-lug mailing list
> sf-lug at linuxmafia.com
> http://linuxmafia.com/mailman/listinfo/sf-lug
> Information about SF-LUG is at http://www.sf-lug.org/

More information about the sf-lug mailing list