Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My latop is connected to a wired modem for internet. I want to access internet on my android phone.

Can i do it by connecting my Android to laptop via usb cable and then enabling tethering.


Operating System: Ubuntu 12.04

share|improve this question
I forgot to mention: its ubuntu 12.04 – Mohit Aug 1 '13 at 12:43
@CharlieRB can you remove 'This question may have an answer here' banner as it is apparent that question has been edited to update the OS. – Mohit Aug 2 '13 at 4:05
I removed my vote and comment related to being a duplicate. If my answer was correct, please select it as being the answer. Thank you. – CharlieRB Aug 2 '13 at 11:56

2 Answers 2

You will need do a reverse tether. As far as I know, the phone must be rooted for this to be done.

Here are instructions at XDA Developers - HOWTO: Ubuntu USB reverse tethering

share|improve this answer

Here's the closest to a "one-click" solution that I got to.


  • Rooted Android device

  • Root access on the PC

  • ADB installed on the PC (apt-get install android-tools-adb on Debian-based distros)

  • USB Debugging enabled on Android


  1. Connect Android device to the PC via USB
  2. Enable USB tethering on the Android device (Settings)
  3. Run the following script:

    WAN="wlan1"       # interface providing internet connection on the PC
    LAN="usb0"        # usb interface on the PC
    AND="rndis0"      # usb interface on Android
    sudo su -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
    sudo iptables -F -t nat
    sudo iptables -F FORWARD
    sudo iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE
    sudo iptables -A FORWARD -i $WAN -o $LAN -m state --state RELATED,ESTABLISHED -j ACCEPT
    sudo iptables -A FORWARD -i $LAN -o $WAN -j ACCEPT
    sudo ifconfig $LAN $LAN_IP netmask $NETMASK up
    adb shell su -c busybox ifconfig $AND $AND_IP netmask $NETMASK up
    adb shell su -c busybox route add default gw $LAN_IP
    adb shell su -c ndc resolver setifdns $AND "" $DNS1 $DNS2
    adb shell su -c ndc resolver setdefaultif $AND
    adb shell ping -c4 $DNS1
    adb shell ping -c4
  4. Done!


  • You probably need to adjust the interface names LAN, WAN and AND.

  • I found that some apps would either not recognize the network connection or only work partially. I was able to fool them using Fake Wifi Connection module for the Xposed Framework

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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