6

Is there a way to do WiFi tethering on my Android and do port forwarding for my PC from the Android device?

What I mean is:

  • Internet --> Android

  • Android has the port forwarding to PC (XAMPP)

  • PC running XAMPP --> Android

  • Android --> Internet

I'm trying to see if I can get a server running from my PC being able to be accessed from the internet using my Android.

Is there any way to do that?

Giacomo1968
  • 58,727
johnny
  • 61
  • 1
  • 1
  • 2

3 Answers3

0

If you run iptables -L in Android then you can see that the FORWARD Chain has a DROP policy. This means it can't forward the packets from the internet to your pc.

If your Android is rooted then you can install AFWall+.

In that tick WiFi and DATA box for DHCP and DNS services entry from the list. Then option->enable firewall.

Burgi
  • 6,768
kaushikC
  • 75
  • 1
  • 8
0
  1. Open port forwarding in router

  2. Set DMZ Address

Set ports as [Computer IP:Normal Port] - - - - [DMZ_IP:Different port to internet]

So if for whatever reason im sharing on port 80.

Then its [192.168.0.5:80] - - - - [172.123.132.158:8080].

80 to 8080.

My web server is on [192.168.0.5:80] or [127.0.0.1:80].

But my Android will connect [172.123.132.158:8080].

Giacomo1968
  • 58,727
TardisGuy
  • 502
0

Depending on your cell service provider, many of them block ports such as HTTP, HTTPS, FTP, SMB, POP/SMTP/IMAP, etc (as a server) on their cell phones. I would first check with them to see if they even allow those through their cell network, even with different port numbers assigned. Having said that...

If the device is rooted, and you have access to the terminal, you should be able to use some *nix wizardry to do so. Short of that, I woulnd't know exactly what app would allow you to do so

Canadian Luke
  • 24,640