I have a situation at home, the room where I have my desktop PC, router, printer, etc is being remodeled so I moved my PC to another room. Now the PC is far away from the router but it will be only for a couple of days. The PC do not have any WiFi adapter so I'm using my Android phone to share the Internet connection.

The problem is that I need to access the web server running in the desktop PC from others devices connected to the same router. I usually do it by using from the other devices. Obviously this does not work now.

Additional info that may be useful:

  • The PC running a web server has Linux Ubuntu 14.04 as OS.
  • This PC has adb installed. adb detects this phone.
  • This PC sees its own IP as, the url works but only from the same PC.
  • This PC, according to nmap, sees the Android phone as
  • This PC can ping the others devices by the same IPs as before (192.168.2.x)
  • The others devices cannot reach this PC.
  • Router seems to have assigned to the Android phone. The url does not connect to the web server. obviously does not work (from the other devices), but I tried anyway.


It seems I almost there. It's not perfect but, using an app called "Port Forwarder" seems possible. The only gotcha is that you cannot forward ports requiring root privileges (and my device isn't rooted anyway). So I will have to conform with 8080 to 80 mapping, but it's better than nothing.

I will share the steps needed to accomplish this If I success.

  • The way Android shares your internet connection is by acting as a modem. That way it creates a independent network with its own IP address pool. I think it's also not easy to pass a specific port through your phone to your PC.
    – GiantTree
    Commented Jan 30, 2015 at 23:03
  • But is it possible to do at all? Maybe using adb to configure something in the phone? Commented Jan 30, 2015 at 23:14
  • I know there is a way to do it, but I can't remember how to do it.
    – GiantTree
    Commented Jan 30, 2015 at 23:23

1 Answer 1


The port forward app you mention won't port below 1024.

The app you require is TCP Port Fowarding. It is installed in Android. You can use it with USB adb to setup a VPN. It also is ran from user-space and root is not required.

  • I will try it and report back the results. Commented Jan 31, 2015 at 10:20
  • Lamentably that app crash as soon as I tap on "Begin". The other "Port Forwarder" seems to do its job but for some reason connection to my web server is very unstable, the pages never finish loading. While internet browsing is ok. Commented Jan 31, 2015 at 21:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .