I'm trying to USB tether an Android phone (SGS2 LTE) to 12.04 to use its Internet connection. Enabling "USB tethering" on the phone brings up a "wired connection 2" on the network connections menu.

I can receive/send email in Thunderbird.

If I try to use Internet it gets to "waiting for www....." but never loads the site.

ifconfig shows:

tim@timbo:~$ ifconfig 
eth0      Link encap:Ethernet  HWaddr
           UP BROADCAST MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000 
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo         Link encap:Local Loopback  
           inet addr:  Mask:
           inet6 addr: ::1/128 Scope:Host
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:5023 errors:0 dropped:0 overruns:0 frame:0
           TX packets:5023 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0 
           RX bytes:358105 (358.1 KB)  TX bytes:358105 (358.1 KB)

usb0       Link encap:Ethernet  HWaddr 66:36:b9:5b:28:ce  
           inet addr:  Bcast:  Mask:
           inet6 addr: fe80::6436:b9ff:fe5b:28ce/64 Scope:Link
           RX packets:1415 errors:0 dropped:0 overruns:0 frame:0
           TX packets:1410 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000 
           RX bytes:948389 (948.3 KB)  TX bytes:735740 (735.7 KB)

wlan0      Link encap:Ethernet  HWaddr 38:59:f9:84:bd:34  
           inet6 addr: fe80::3a59:f9ff:fe84:bd34/64 Scope:Link
           UP BROADCAST MULTICAST  MTU:1500  Metric:1
           RX packets:60694 errors:0 dropped:0 overruns:0 frame:0
           TX packets:53446 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000 
           RX bytes:61303968 (61.3 MB)  TX bytes:7559223 (7.5 MB)

So far I've spent two days fiddling with this to try and get it to work based on posts I've found on these forums, but I don't really know what I'm doing.

  • 2
    Is the Internet on your device working correctly? Because, since Thunderbird works then the tethering is working. But If browsing is working on your mobile, then you might have a firewall that is blocking port 80. – Dan Sep 14 '12 at 8:55
  • 1
    Some cell service providers try to block tethered data use. – user68186 Sep 14 '12 at 11:42
  • Thanks for your replies. My ISP doesnt block tethering. I've checked and port 80 appears to be blocked. Is there anything I can do about this? regards Tim. – timbo Sep 14 '12 at 23:11

Open the terminal (Ctrl+Alt+T) and run this command (root privileges is required):

sudo iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 8289 -j ACCEPT

Replace 8289 with the port you want to open.

So in your case, you should use

sudo iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 80 -j ACCEPT

This will allow all incoming and outgoing connection through port 80.

Usually, by default, this is not blocked, so if you have installed some kind of firewall, it is best to try and unblock the port using the firewall.

ref: http://www.upubuntu.com/2012/01/how-to-open-specific-port-under-ubuntu.html

  • Hi Again, so i've unblocked port 80, and google works now, but no other sites, they attempt to load but never do. Any thoughts? cheers tim – timbo Sep 20 '12 at 3:02
  • Guess you figured that the problem is not the tethering. Try the command line (eg wget) to fetch a page (eg this page). If that works, then check the proxy settings on your browser. If it doesn't, you may have to go back to your ISP. (As a TEMPORARY test, you can flush all your firewall rules 'iptables -F'). – crafter Sep 30 '13 at 7:55
  • I once had an issue where an install of 9.04 (or something equally as ancient) wouldn't connect to any other site but google.com. I'm pretty sure we had to mess with the MTU settings to get things working again. – amanthethy Jul 14 '14 at 6:53

Google probably works because you have it set to use ssl (https:// instead of http://) which means it is using port 443 and the packets are encrypted so they cannot use packet examinations on select ports to determine if you are tethering. Some mobile providers, including at least metroPCS and T-Mobile, use this IPE to block tethering both over wifi and USB

One workaround for this problem, if it is in fact the cause of your problem, is to use Chrome on linux, or set your user agent to the one for Chrome on linux:

"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.65 Safari/537.36"

The reason this works is because Android uses Linux user agents, so they cannot block those, or your browser on your phone wouldn't work either.

I did a quick search for you and found a page on how to change user agents in various browsers HERE. I'm not sure if that page is up to date/accurate but it could be a place to start, or a more precise google search for your specific browser might give you a better result.

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.