My First Guide. Hope it Helps..
HOW TO REVERSE TETHER YOUR PHONE / INTERNET PASS THROUGH
Reverse Tethering / Internet Pass through is the method in which you can make your android phone use the internet connection of your computer without a WIFI and by using a usb cable. It is helpful for those people who don’t have a WIFI at their place and for those who don’t have a good internet plan for their mobile.
BASIC REQUIREMENTS
Rooted Phone With S-OFF
SuperUser [QR Code]
BusyBox [QR Code]
Terminal Emulator [QR Code]
Windows O.S. [I am using Win-7]
USB Cable for your phone
THE PROCESS
Connect Your Android Phone to your PC. Make sure you are rooted and have terminal emulator installed. Turn on USB Tethering from
SETTINGS -> WIRELESS AND NETWOKRS -> TETHERING AND PORTABLE HOTSPOT -> USB TETHERING.
Screen
Next you will get a new connection in your PC. Open Networking and Sharing Center from
CONTROL PANEL -> NETWORK AND SHARING CENTER
You get a scene in a similar manner.
Screen
Now There will be one connection which will be your Main Net Connection and the Other one will be your Android Phone’s Created Connection for tethering. Click on your main net connection i.e. the one you use for Connecting to net Local Area Connection(in my case).
You will get the following screen.
Screen
Now click on Properties.After this click on sharing and tick on Allow other network users to connect through this computer’s internet connection and click ok for any dialog box shown and click ok to come back to the main networking screen.
Screen
Now click on the new connection made by the android phone Local Area Connection 2 (in my case)
You will get the following screen
Screen
Click on properties. Then go to Internet Protocol version 4(TCP/IPv4) and click on properties.
Screen
Now You need to enter 192.168.2.1 in IP address and enter 255.255.255.0 in Subnet mask and keep remaining things empty.
Screen
PART ON THE PHONE
NOTE:- ALL CODES HAVE TO BE WRITTEN WITHOUT QUOTES
Open Android Terminal on the Phone and type "su". Provide it superuser permissions.
Screen
Now type “ifconfig usb0 192.168.2.2 netmask 255.255.255.0”
Screen
“busybox route delete default”
Screen
You may get an error here but it does not matter.
Now type “iptables –F –t nat”(* -F in caps is must)
Then type “busybox route add default gw 192.168.2.1”
Screen
“setprop net.dns1 8.8.8.8”
Next (setprop “net.gprs.http-proxy” “” ) [*Note :- here the code is written in bracket to avoid confusion.. The quotes(“”) are required.
Screen
CONGRATS.... YOU ARE DONE!!
RESULTS
Works on Android Browser.(FOR ME)
Works on Opera & Opera Mini.
Works on XDA Premium App.
DOES NOT Work on Android Market.(Finding a Solution... if anyone gets it working please tell)
You may need to repeat this process each time you connect the phone to PC.
Works even without a SIM inserted.
Nice guide
To enable the market click settings under the sharing tab and add a new service called market with the port number 5228.
how use other app for internet
No resolution
currently m using a wildfire and cannot switch on USB tethering until mobile network is connected followed all the steps but no luck
I am also a wildfire user. I did so many searching for reverse usb tethering, what I searched for were similar to the script of this thread. I follow all the steps but also not success.
I did do some searching, I just GUESS the main problem is the router at my home. My computer access the modem via router, maybe the router cannot give my WF a IP so my WF cannot access the internet? I dunno.
I didn't try access the internet with my computer connecting directly via modem without router since my home wire connection is so so so so complicated, but I believe that it will success. Would somebody try it and share your experience?
I think you can write a batch file for this. Using netsh and adb it would be easily done just from PC
thanks for the guide worked for me.
Problem though is that after i turned off the tethering and disconnected my phone from the pc then reconnect it again just to check if it works the 2nd time, if found that usb tethering is having an error and does not turn on.
question is how to disable this or how i disconnect my phone from pc the right way? well after restarting, tethering is again ok and
I did it on linux!
The configuration on the PC is next:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
ifconfig usb0 192.168.2.1 netmask 255.255.255.0
iptables -A POSTROUTING -t nat -s 192.168.2.1/24 -o wlan0 -j MASQUERADE
On the phone same az you did, but I had to edit
Code:
setprop net.dns1 8.8.8.8
to match my DNS server i.e.
Code:
setprop net.dns1 87.120.131.2
worked !!!!!!!!!!!!!
After about two months of searching I finally found this guide which makes it work. Thanks a lot! Surfing everything is fine but downloads just don't start (market or browser) I'm using G2x by the way so I guess this should work for most people.
meknb said:
Nice guide
To enable the market click settings under the sharing tab and add a new service called market with the port number 5228.
Click to expand...
Click to collapse
I did this which enabled me to browse the market. It won't download anything. I even forwarded the port on my broadband modem and the downloads don't start. Just keep saying "Starting downloading..."
How to make a script for apps like script manager so we do not have to keep typing the configs everytime we restart our phone?
URLs instead of QR Codes, please.
rahuliyer95 said:
[*]SuperUser [QR Code]
[*]BusyBox [QR Code]
[*]Terminal Emulator [QR Code]
Click to expand...
Click to collapse
Anyone with URLs to the above, please? I don't have a QR code scanner
mnongkhlaw said:
Anyone with URLs to the above, please? I don't have a QR code scanner
Click to expand...
Click to collapse
https://market.android.com/details?...wsMSwxLDEsImNvbS5ub3NodWZvdS5hbmRyb2lkLnN1Il0.
https://market.android.com/details?...t=W251bGwsMSwxLDEsInN0ZXJpY3Nvbi5idXN5Ym94Il0.
https://market.android.com/details?...251bGwsMSwxLDEsImphY2twYWwuYW5kcm9pZHRlcm0iXQ..
Thank you!
rahulparekh said:
https://market.android.com/details?...wsMSwxLDEsImNvbS5ub3NodWZvdS5hbmRyb2lkLnN1Il0.
https://market.android.com/details?...t=W251bGwsMSwxLDEsInN0ZXJpY3Nvbi5idXN5Ym94Il0.
https://market.android.com/details?...251bGwsMSwxLDEsImphY2twYWwuYW5kcm9pZHRlcm0iXQ..
Click to expand...
Click to collapse
Thanks, does it work with Market, email etc? Have you used it with Samsung Galaxy S2?
mnongkhlaw said:
Thanks, does it work with Market, email etc? Have you used it with Samsung Galaxy S2?
Click to expand...
Click to collapse
This method actually stopped working for me after I reflashed CM7 on my phone. (TMobile G2X). It doesn't work with market but I think ASProxy makes it work.
rahulparekh said:
It doesn't work with market but I think ASProxy makes it work.
Click to expand...
Click to collapse
What is ASProxy ?
method worked good all apps working...
i can browse through market also but when select download option downloading and freezes.. what could be problem ??
mnongkhlaw said:
What is ASProxy ?
Click to expand...
Click to collapse
It's a proxy app which supposedly allows all Google apps to work on reverse tethering and such. Search the market for it.
rahulparekh said:
It's a proxy app which supposedly allows all Google apps to work on reverse tethering and such. Search the market for it.
Click to expand...
Click to collapse
Do you mind a tutorial on how to get ASProxy to work?
mudkipstar said:
Do you mind a tutorial on how to get ASProxy to work?
Click to expand...
Click to collapse
I haven't had a chance to use the app as reverse tethering stopped working for me before I got the app.
Related
Internet Tethering over USB? Is that something that was added with 1.6 or is that Eclair functionality? I notice it is in the CyanogenMod latest builds.
How does it work in comparison to bluetooth or wifi tether?
Does it require root?
TIA
What do you mean work in comparison, it's wired and the others are wireless. Speeds shouldn't depend on connection.
If you install cyanogen's build, then you have root so it shouldn't matter as you have it already. There is an application wired tether for root users, name explains.
I don't think it is in the AOSP build, so it was added by him or whoever he gives credit to.
There are 2 different Tethers for root users
Wired - Means u gotta connect your usb to your computer
Wireless - This will create an Ad Hoc wireless connection to your computer (no cable required)
This was added by cyanogen and is not part of eclair
nephron said:
There are 2 different Tethers for root users
Wired - Means u gotta connect your usb to your computer
Wireless - This will create an Ad Hoc wireless connection to your computer (no cable required)
This was added by cyanogen and is not part of eclair
Click to expand...
Click to collapse
What I was originally asking I guess was if the Wired USB tethering was now standard issue in Android 1.6 or 2.0 and as such was available to non-root users. From your response, I understand that is incorrect, and that wired tethering via USB was added by CM in the CM builds and therefore implicitly requires root.
Thanks for clarifying that for me!
If you wanted a non rooted version, search the market -there are several that don't require root.
so...
how is this done exactly on cyanogens rom? i cant find anything about it after searching for about an hour...
mr_brain said:
how is this done exactly on cyanogens rom? i cant find anything about it after searching for about an hour...
Click to expand...
Click to collapse
Yeah me and some people on another thread figured it out......
But first things first you need Windows XP service pack 3 or Windows Vista or Windows 7... I dont know about Mac.....
but Windows Xp is different than Vista or 7 because you need to download HTC sync to get the drivers for your G1 to be reconized as a modem..... Do not mount your G1..... once you have HTC sync installed you do not need to run it..... but now when you connect your G1 just check the internet tethering box and it should work(unless I missed a step)...
OK With Vista and Windows 7 the drivers are preloaded into the OS s do NOT need to download HTC synce... You just need to connect your phone do NOT mount and check the tehtering box... it should work....
is there a certain version for the G1 that I need?
Reverse tether g1 to pc network over usb cable
My android os is CyanogenMod 4.2.14.1,
1.Enable "Settings\Wireless controls\Internet tethering"
2.Install HTC Remote NDIS based Device driver(View attachment 277122)
3.Set the HTC adapter as: IP:192.168.2.1, Mask:255.255.255.0
4.Set the PC ethercard as shared connection
5.Run these codes in terminal:
su
ifconfig usb0 192.168.2.2 netmask 255.255.255.0
busybox route delete default
iptables -F
iptables -F -t nat
busybox route add default gw 192.168.2.1
setprop net.dns1 8.8.8.8
setprop "net.gprs.http-proxy" ""
6.Now your g1 could open browser to view any web pages on the internet, and update apps in the Market.
for diyism
just wanted to say that
This works on Nexus One as well!
The routing stuff disuse posted, I mean.
The only problem is that I can't download stuff from the market yet. But hopefully I'll find a solution to this soon.
Thanks a lot! I've been looking for this for like a whole week.
I think I'll write an app which will just run this as a shell script.
thanks again!
XBOX PS3 Wii anyone????
can someone please tell us or provide a step-by-step on how to have gaming consoles tether the device's web connectivity...or in other words how to make my xbox 360 connect to the web by tethering my device's internet....PLEASE PLEASE...I SWEAR I BUY BEER...I BUY BEER !!!
Reverse tethering not working with Play Store
GuShPaNdA said:
This works on Nexus One as well!
The routing stuff disuse posted, I mean.
The only problem is that I can't download stuff from the market yet. But hopefully I'll find a solution to this soon.
Thanks a lot! I've been looking for this for like a whole week.
I think I'll write an app which will just run this as a shell script.
thanks again!
Click to expand...
Click to collapse
Sure, I've seen before two attempts of reverse tethering with this approach with the same problem: Play Store stays "Downloading" or "Waiting for network" but It doesn't work. I've tried also my own method with the same results: Play Store is not working.
I think this has something to do with the way Play Store app is testing for Internet conectivity. Since it doesn't know if you've got one, it doesn't let you download nothing.
Maybe there is some Android SDK API call to flag the system that Internet connection is up? Any other clue?
Hi guys,
Have a question for you...
I'm outside of US... I have private hosting on US soil... I've used it like ssh tunnel proxy on my Win7-PC (Socks5+Putty)
No the question. How can I run this proxy on Nexus One of mine. I want it for "App Market" (to see/buy not-free apps)
Much simpler - root your Nexus and use Market Access.
david2tm said:
Hi guys,
Have a question for you...
I'm outside of US... I have private hosting on US soil... I've used it like ssh tunnel proxy on my Win7-PC (Socks5+Putty)
No the question. How can I run this proxy on Nexus One of mine. I want it for "App Market" (to see/buy not-free apps)
Click to expand...
Click to collapse
In case there are other motives, you can still do it, but you need a rooted phone.
I know I have a proxy section in the networks and wireless, but it's possible its just a cyanogenmod app. That's where you'll want it though, you'll need to open an ssh tunnel using ssh -D (never done this, but this is how you do it on traditional linux) and then localport:remotehost:remoteport. After that you log in, and your tunnel is made!
So a command for opening up a local proxy on port 8118 to myproxy.org on port 22 (ssh) would look like
Code:
ssh -D 8118:myproxy.org:22
You then set your local proxy to 127.0.0.1 on port 8118 and all your traffic goes through your established ssh tunnel.
Jack_R1 said:
Much simpler - root your Nexus and use Market Access.
Click to expand...
Click to collapse
Well, I want market to think that I'm in US too. For updated version of Maps app - for example
Acidictadpole said:
In case there are other motives, you can still do it, but you need a rooted phone.
I know I have a proxy section in the networks and wireless, but it's possible its just a cyanogenmod app. That's where you'll want it though, you'll need to open an ssh tunnel using ssh -D (never done this, but this is how you do it on traditional linux) and then localport:remotehost:remoteport. After that you log in, and your tunnel is made!
So a command for opening up a local proxy on port 8118 to myproxy.org on port 22 (ssh) would look like
Code:
ssh -D 8118:myproxy.org:22
You then set your local proxy to 127.0.0.1 on port 8118 and all your traffic goes through your established ssh tunnel.
Click to expand...
Click to collapse
I've rooted stock froyo. And there's no proxy option in my Wireless & Network.
1. How can I get this app (?) w/o cyanogenmod?
2. where do I type ssh commands? [I'm not a Linux guy]
*. I wish my wireless router had the option to share "proxyfied" connection....
david2tm said:
Well, I want market to think that I'm in US too. For updated version of Maps app - for example
Click to expand...
Click to collapse
That's exactly what you get, I guess you never tried. Market recognizes provider's MCC and MNC, and SSH tunneling won't help you even a little bit. On the other hand, Market Enabler / Market Access allow faking MCC and MNC to match any supported provider for paid markets.
Jack_R1 said:
I guess you never tried
Click to expand...
Click to collapse
I'll try it right now
Hi all,
I need to access my campus internet through wifi. It has a given proxy adress and port. How can I access it using my unrooted nexus one?.....
Thanks,
Android does not natively support a non-transparent proxy.
GldRush98 said:
Android does not natively support a non-transparent proxy.
Click to expand...
Click to collapse
I see. So, I have no choice but to root my phone to use the proxy....
Previously I used the Firefox mobile browser to bypass proxy settings. However, the only application you can use on your phone is the Firefox browser itself.
# Run Firefox, and in address bar type: about:config. This will take you to the advanced configuration panel.
# Now you need to find proxy entries, to simplify that you can filter it out by typing proxy in the field below address bar.
# Modify network.proxy.http and network.proxy.http_port to your proxy server and port.
# Set network.proxy.type value to 1.
I am not sure if this still works but give it a try.
eky said:
I see. So, I have no choice but to root my phone to use the proxy....
Click to expand...
Click to collapse
Yeah... or as madballs (lol) posted, you can try the Firefox beta. But keep in mind, on Firefox will work... no other data services on the phone will.
It is kind of crappy they don't support it, especially when there are other roms out there that have this little function added in.
LOL, I was surprised nobody has taken this name when I registered.
I really cant understand ,, if they could add proxy settings to the browsers without rooting,,
why don't the developers add it in their apps?!?!
Go to the wifi settings there push the menu button and select advanced.
now you have a list within you can set your proxy settings over the current wifi connection.
I have tested it with my DHD at work. works perfect but hope they will connect to the same concept for proxy as by android 3.2.
There you can configure a proxy for each connection.
Cheers
Dave
And sorry for english skills...
After a few evenings of searching, reading and testing, I finally found a solution for setting up a reverse-tether connection between my Droid 3 and my Ubuntu box over a USB cable, which I can use to download apps and app updates from Google Play without eating up my mobile data credit. And since it seems to me that complete and clear explanations of how to do this with USB and Ubuntu are not available anywhere, I want to detail here all the steps of my connection setup process, in a way that will hopefully be accessible to most users of Android and Ubuntu. So here goes:
Prerequisites:
- a PC that is connected to the Internet and running Ubuntu, where you have root access and a free USB port
- a rooted Android device (in my case the Motorola Droid 3) with a SIM and an active mobile subscription
- a USB cable (I have the one that came with the phone).
Setup:
#1. Disconnect your Android device's data connection from your mobile carrier by touching the corresponding icon in the notifications tray (2 parallel vertical arrows pointing in opposite directions) or by switching your phone to Airplane Mode.
#2. Launch the Terminal emulator app on your Android device and enter this command:
ifconfig
You should get a response that shows only one network interface, named "lo" or "lo0" or something like that, with an information field that says "inet addr:127.0.0.1". This is the local loopback connection. We will not be using it - just know that it's always there in responses to "ifconfig" and ignore it from now on.
#3. Re-enable your Android device's data connection by reversing what you did at #1. Go back to the Terminal and do another
ifconfig
This time, in addition to the "lo" interface, you should see another interface that is used to communicate with the Internet through your mobile carrier. For me this interface is called "ppp0"; you may have something else, but just remember what it is because you will have to use it later wherever you see me use ppp0 in the commands below.
#4. Now connect your Android device to your Ubuntu PC using the USB cable. Access the USB connection notification in your Android notifications tray and select "PC Mode" as your USB Mode. (If you don't have this option, then I don't know what to say, you will probably have to try them all, but in that case I wouldn't start with the "Mass storage" option - that's the least likely one to work for this.)
#5. Still on the Android, open Settings -> Wireless & networks -> Tethering & Mobile Hotspot and enable "USB tethering". You should get a second, green USB icon on your status bar after tethering is enabled.
#6. Go back to the Terminal app on your Android device and do yet another
ifconfig
This time you should receive information for 3 network interfaces: in addition to "lo" and "ppp0" you should now see a new interface that corresponds to your USB. For me it's called "gether0"; remember what yours is and use it wherever I use gether0 in the commands below.
Also, look at the "inet addr:" specification of your gether0 interface and remember this IP address because we will need it later. (My USB tether interface always gets the same IP address - 192.168.42.129 - so this is what I will be using in my example commands below.)
#7. Now let's look at the PC's network interfaces. Open a terminal emulator (I use Ctrl-Alt-T to do this; depending on what launchers, shortcuts or desktop environments you have, you may need to find it in a menu or do something else to get to it) and type
ifconfig
This response depends a lot on how your PC is set up, but generally I'd expect to see at least a "lo" (local loopback) interface, a "usb0" interface, one or more "eth0", "eth1" etc. interfaces and maybe a "ppp0" interface. The "ppp0" and "eth0" type interfaces will be for your PC's Internet connection and the "usb0" interface will correspond to the USB cable connecting you to the Android device. If you have a "ppp0", that's probably the one you should use in all setup commands to be run on the PC where I will use ppp0. Otherwise if you only have "lo", "usb0" and "eth0", your PC's Internet is probably on "eth0", so use that one in place of my ppp0 in commands run on the PC. (If you have any other combinations without a "ppp0", I don't know what to suggest except try them all one by one, everything you have besides "lo" and "usb0".)
#8. Back to the Android device. What we want here is for the ppp0 interface to remain enabled - because that's the only way the app store will agree to download any apps - but all our Internet communication to actually go through the gether0 interface, i.e. through the USB tether. To do this, we need to change the default route Android apps use to send data, namely to delete the default route that points to ppp0 and add a new default route that points to gether0 and that uses as a gateway the IP address of the Ubuntu PC (an address we will set up on the PC at the end of this process). So run these commands in the Terminal on the Android:
su
route del default
route add default gw 192.168.42.1 dev gether0
setprop net.dns1 8.8.8.8
Notice that the gateway IP address we will be using is made up of the first 3 numbers from our USB tether interface's IP from step #6, followed by a ".1" instead of whatever the 4th group was in the original IP.
#9. On the PC we want to set up standard Internet connection sharing between usb0 and ppp0 according to the instructions from the Ubuntu manual, so we will run these commands in the terminal window:
sudo su -
(enter your password here to get root access and then do 5 more lines)
iptables -A FORWARD -o ppp0 -i usb0 -s 192.168.42.0/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
Here again you can see we're using the first 3 numbers from the USB tether interface's IP, but adding a ".0" and a "/24" at the end to specify an entire class of IPs we're going to accept packets from over the USB, a class that includes our Android's actual IP, 192.168.42.129. (We could probably just use that single IP without a "/24", but whatever, this class stuff is usually the way it's done.)
#10. Finally, we will set our PC's usb0 interface IP to the gateway IP we already told the Android to send everything to, i.e. 192.168.42.1, after which we need to quickly check that the connection is working and jump right into Google Play to download some apps. I say "quickly" because in my case, for whatever reason, after I set the gateway IP on the PC I can only leave the connection unused for about 1 minute before it drops on its own. So don't wait too much after #10.1 to do the rest:
#10.1. Enter this into your PC's terminal:
ip addr add 192.168.42.1/24 dev usb0
#10.2. Check that the connection is up by entering this into your Android's terminal first:
ping -c 3 google.com
If you get 3 responses from Google, you're all set to launch Google Play and download some apps:victory:. If there's no response, go back to #10.1 and try again.
Another indication that the PC has dropped the connection is that you get a notification popup on the PC that says "Wired network/ Disconnected". That tells you you need to jump back to #10.1 to get the USB link working again.
Also, you will know you need to do this again if you find Google Play is suddenly refusing to load apps or pages even though it was loading them before - you probably waited too long between clicks and allowed the connection to drop.
#11. To reset all the connections to normal when you're done, make sure to
#11.A. Go to Settings -> Wireless & networks -> Tethering & Mobile Hotspot and disable "USB tethering" before you unplug the USB cable from either device, otherwise the gether0 interface may remain active and interfere with your ability to get back your data link to your mobile carrier.
#11.B. Do steps #1 and #3 again to get your Android to automatically re-establish the proper settings for the link to your mobile carrier.
Final remarks:
- In order to streamline this process, especially steps #8-#10, you should probably put these commands and your specific interface names and IP addresses in some scripts - one on the PC, one on the Android device - that you can then launch more easily. I'm a newbie at both Ubuntu and Android, so I have to do some more searching to figure out how to do this properly.
- Keeping the connection up even if you're idle - e.g. while reading app descriptions and deciding what to download - is probably a matter of sending some dummy packets periodically through the USB, which would probably involve another script running in the background - again something I haven't taken the time to figure out how to set up yet.
- Anytime you get paranoid about whether the apps are being downloaded through the USB cable or your mobile data plan, go to your Android terminal and check whether your default network route is still pointing to your gateway PC by running:
route
This will show you all the routes that are configured on your Android. The last line in the table should say "default", then "192.168.42.1" and end with "gether0". This means the data is still going through the USB and not eating up your mobile data credit.
Enjoy!
It seems to work, but I'm still not sure whether my phone uses my computer's internet connection or my 3G. Upon executing:
Code:
busybox route
I get a lot of lines instead of just "192.168.42.1" ended with "rndis0" (this is how its named on my device) though this "192.168.42.1" exists.
leledumbo said:
It seems to work, but I'm still not sure whether my phone uses my computer's internet connection or my 3G.
Click to expand...
Click to collapse
The simple way I confirm it is by looking at the 3G icon at the top: during normal usage the two arrows in the icon light up depending on whether I'm transmitting or receiving or both; when I'm reverse-tethered they never light up at all.
I get a lot of lines instead of just "192.168.42.1" ended with "rndis0" (this is how its named on my device) though this "192.168.42.1" exists.
Click to expand...
Click to collapse
Well, in principle you should only need to care about the "default" line, but if by any chance you have some rule in that table that specifies a non-default route for exactly the websites you're trying to access in all this and that rule happens to specify a different interface than "rndis0", then yes - you might be using your mobile data plan after all. But I wouldn't bet on it. I have a few routes on there, but I think they're just related to services my carrier is offering at some specific IPs it has.
If you can't confirm the 3G is being bypassed by looking at the icon and if you can't spare the traffic to do a direct consumption test (query how much traffic is left/spent, use some more traffic through this setup, query again and compare), then the only other way to make sure that I can think of is to clean up the whole routing table ("route del" everything) and leave only the "default" rule from the instructions above. Then there really won't be any other path for your network packets to take but through the USB. But then you have to hope the routing table will get rebuilt as it was after you reset everything. Or you could just write down all the rules you had before so you can reconfigure them if they don't get re-created automatically at reset.
In fact - what am I talking about? - there's another way you can make sure your Android is really trying to go through the USB to get to the Internet: when you do step #10.1 on the PC just set up a wrong gateway IP, for example 192.1.1.1. If your Android fails to open any webpages or the app store and then if you do #10.1 properly it starts working (again), then it's clear that it's trying to go through the USB cable and isn't using any alternate route.
Weird, the method doesn't work anymore for the subsequent trials. I'll try rebooting the phone.
Works for Windows too
I mixed the instructions found in this thread with another thread here in xda and it worked well under Windows 7.
Thank you for the excelent guide!
donjoe0 said:
After a few evenings of searching, reading and testing, I finally found a solution for setting up a reverse-tether connection between my Droid 3 and my Ubuntu box over a USB cable, which I can use to download apps and app updates from Google Play without eating up my mobile data credit. And since it seems to me that complete and clear explanations of how to do this with USB and Ubuntu are not available anywhere, I want to detail here all the steps of my connection setup process, in a way that will hopefully be accessible to most users of Android and Ubuntu. So here goes:
[guide goes here, edited quote]
Enjoy!
Click to expand...
Click to collapse
So I tried everything on a LG Phoenix running Kitkat and no go. All the commands go through except the ping command. Any suggestions?
AndrMatr said:
So I tried everything on a LG Phoenix running Kitkat and no go. All the commands go through except the ping command. Any suggestions?
Click to expand...
Click to collapse
All I can say is this method continued to work for me pretty much the same as described when I switched to KitKat on an ASUS Padfone 2 with two minor exceptions:
- busybox was no longer set up to be invoked automatically on this other custom ROM so I had to prefix some commands with "busybox " (e.g. the "route" commands)
- my USB tether connection is now named "rndis0" instead of "gether0"; I had to fiddle around a bit with the "netcfg" command to figure that out.
If you're like me, a PdaNet customer running Linux who's sad that there's no build of PdaNet designed for Linux for hiding tether usage over USB Tethering, then fear not! After some research I've devised a plan to hide USB tethering usage from carriers that DOES NOT require PdaNet!. I've tested this myself on T-Mobile and Verizon, and on both of these carriers it looks like it works just fine. This does not mean that it will only work with these carriers, these are just the ones I've tested myself (with the exception of the appended notes below). If you have another carrier not mentioned here, please test this out and let me know if it works for you and I'll add it to the OP at the bottom
Here's a precaution I'd take on Android too, just to make sure the carrier really doesn't find anything out:
Go to Magisk Manager and get yourself the OpenDNS or DNSCrypt addon and install that. I think Verizon is catching on that I'm tethering somehow through DNS, even when I use VPN. By setting my DNS on my phone's LTE connection to something that's not-verizon, this should allow me to dodge that. I recommend you doing it too as a precaution
Here's what you have to do for Linux:
1) Hop over to your Linux machine, open a terminal emulator, and type the following commands (with root privileges):
sudo sysctl net.ipv4.ip_default_ttl=65
echo 65 | sudo tee /proc/sys/net/ipv4/ip_default_ttl
What this does is sets your PC's network packets to have a Time To Live of 65. This is to make it seem like the packets were originated from your phone instead of your PC. Android's default TTL for its packets is 64, so when the PC sends packets to your phone through tethering with a TTL of 65, they have a TTL of 64 by the time your phone sends them out to T-Mobile's towers (the internet).
2) If you want to have the PC's TTL set to 65 on every startup so you don't have to keep entering the two commands above again and again every time you reboot, add the following line to your PC's /etc/sysctl.conf file and save:
net.ipv4.ip_default_ttl=65
Here's what you have to do for Mac: (credits for the instructions and post going to @BrettB0727)
For those wondering how to do this on a Mac, it can be done temporarily using:
Code:
sudo sysctl -w net.inet.ip.ttl=65
Or permanently by creating or editing /etc/sysctl.conf to add
Code:
net.inet.ip.ttl=65
if you end up creating the file, you will need to be sure and do:
Code:
sudo chmod 0644 /etc/sysctl.conf
sudo chown root:wheel /etc/sysctl.conf
Here's what you have to do for Windows:
1) Open up regedit and go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
2) Make a new REG_DWORD entry in there called DefaultTTL and set it to 65
3) Reboot
NOTE: I've found that downloading files can be finicky. I was able to download an MP4 video before without it detecting I was using tethering data, but when I tried to get a .zip file from ModDB T-Mobile found out what I was doing. Just take warning that not all forms of network traffic will be hidden when tethering.
NOTE 2: Confirmed by @triggerlord to work with WiFi Hotspot, as well as with Simple Mobile
NOTE 3: If you're one of those people who have trouble hiding their data with this method, take @niry's advice and see if it helps: he said to remove `dun` type from pcweb.t-mobile.com APN and add it to the end of the fast.t-mobile.com one (if it's not already there)
Lol, this fixed my Simple Mobile (powered by T-Mobile) tethering issues. Nice! This works with the WiFi hotspot feature too BTW.
triggerlord said:
Lol, this fixed my Simple Mobile (powered by T-Mobile) tethering issues. Nice! This works with the WiFi hotspot feature too BTW.
Click to expand...
Click to collapse
Were you able to browse the web (hidden) without changing your browsers user agent? I find that if I don't set Chrome to look like Android its 50/50 if it gets hidden or not.
Sent from my Moto G Play using XDA-Developers Legacy app
jasonmerc said:
Were you able to browse the web (hidden) without changing your browsers user agent? I find that if I don't set Chrome to look like Android its 50/50 if it gets hidden or not.
Sent from my Moto G Play using XDA-Developers Legacy app
Click to expand...
Click to collapse
Everything works fine. I didn't need to change browser agents or anything. (I'm using chromium though.) I've only tried this via WiFi hotspot. EDIT: And I didn't need to change the APN setting either. Changing the TTL was enough to get it working.
is ma.t-mobile.com working for anyone? i keep getting sent to my.t-mobile.com even after doing what OP suggested. it used to work for me a few weeks back.
shawtydat said:
is ma.t-mobile.com working for anyone? i keep getting sent to my.t-mobile.com even after doing what OP suggested. it used to work for me a few weeks back.
Click to expand...
Click to collapse
Maybe they shut down the website. Haven't been on it myself in months
jasonmerc said:
Maybe they shut down the website. Haven't been on it myself in months
Click to expand...
Click to collapse
i'm afraid that to be the case, but is there another way to monitor tether vs mobile data?
shawtydat said:
i'm afraid that to be the case, but is there another way to monitor tether vs mobile data?
Click to expand...
Click to collapse
You might be able to in the T-Mobile app on your phone but other than that I think we're screwed now
jasonmerc said:
If you're like me, a PdaNet customer running Linux who's sad that there's no build of PdaNet designed for Linux for hiding tether usage over USB Tethering, then fear not! After some research I've devised a plan to hide USB tethering usage from T-Mobile. Tested and confirmed working with Ubuntu 16.10 and Mint 18.1, with the latest ResurrectionRemix on my XT1607.
Click to expand...
Click to collapse
When using this method, is the PdaNet app required on the phone?
MountainX said:
When using this method, is the PdaNet app required on the phone?
Click to expand...
Click to collapse
No, you don't need any apps
triggerlord said:
Lol, this fixed my Simple Mobile (powered by T-Mobile) tethering issues. Nice! This works with the WiFi hotspot feature too BTW.
Click to expand...
Click to collapse
Can you supply more information.
I'm looking at switching carriers due to my location(In the mountains with just about nothing for service providers) and want to know how much data you actually use.
What's the most data you have used with this TTL method?
Have they throttled you? and if so, how much?
Any information you can supply is extremely helpful. Thank you! =D
I've used 60gb no throttle.
That's awesome. Thank you for that information.
shawtydat said:
is ma.t-mobile.com working for anyone? i keep getting sent to my.t-mobile.com even after doing what OP suggested. it used to work for me a few weeks back.
Click to expand...
Click to collapse
Works for me.
jasonmerc said:
What this does is sets your PC's network packets to have a Time To Live of 65. This is to make it seem like the packets were originated from your phone instead of your PC. Android's default TTL for its packets is 64, so when the PC sends packets to your phone through tethering with a TTL of 65, they have a TTL of 64 by the time your phone sends them out to T-Mobile's towers (the internet).
Click to expand...
Click to collapse
Thanks, jasonmerc! This put me in the right direction to remove the need for PdaNet on my Mac and also to be able also use my phone as a Wi-Fi Hotspot at full speed on T-Mobile. I'll be looking for your tutorial to bypass T-Mobile's international speed limits!
For those wondering how to do this on a Mac, it can be done temporarily using:
Code:
sudo sysctl -w net.inet.ip.ttl=65
Or permanently by creating or editing /etc/sysctl.conf to add
Code:
net.inet.ip.ttl=65
if you end up creating the file, you will need to be sure and do:
Code:
sudo chmod 0644 /etc/sysctl.conf
sudo chown root:wheel /etc/sysctl.conf
BrettB0727 said:
Thanks, jasonmerc! This put me in the right direction to remove the need for PdaNet on my Mac and also to be able also use my phone as a Wi-Fi Hotspot at full speed on T-Mobile. I'll be looking for your tutorial to bypass T-Mobile's international speed limits!
For those wondering how to do this on a Mac, it can be done temporarily using:
Code:
sudo sysctl -w net.inet.ip.ttl=65
Or permanently by creating or editing /etc/sysctl.conf to add
Code:
net.inet.ip.ttl=65
if you end up creating the file, you will need to be sure and do:
Code:
sudo chmod 0644 /etc/sysctl.conf
sudo chown root:wheel /etc/sysctl.conf
Click to expand...
Click to collapse
I just noticed your reply right now, and I appreciate the steps for doing this on a Mac! I'm going to add these Mac steps to the first post and give you credit for it
As far as international data limits go, I'm not sure I can address that with a fix like this unfortunately.
Still working?
I haven't been able to get over 500kbps using this method. Is this approach still working for folks in 2018?
tatemz said:
I haven't been able to get over 500kbps using this method. Is this approach still working for folks in 2018?
Click to expand...
Click to collapse
I haven't used this in a while, but I'll give it a try soon to see if it still does
tatemz said:
I haven't been able to get over 500kbps using this method. Is this approach still working for folks in 2018?
Click to expand...
Click to collapse
It works in combination with altering the `type` string in the APNs: remove `dun` from pcweb.t-mobile.com one and add it to the fast.t-mobile.com one so it will read `default,supl,hipri,fota,dun`.
niry said:
It works in combination with altering the `type` string in the APNs: remove `dun` from pcweb.t-mobile.com one and add it to the fast.t-mobile.com one so it will read `default,supl,hipri,fota,dun`.
Click to expand...
Click to collapse
Thanks for letting me know about this. I was talking to some people about using this method and they said it was a hit or miss in terms of hiding their tethering usage. I'll update the OP to include what you said as a fix, for people to try out if it's not working