0

I've installed Ubuntu server it's doing good on its own (local host). When I searched for how to host my web server on internet so I found that I have to do port forwarding but I use internet on my mobile hotspot, so, is there any other way to do it?

Note:My mobile is rootable.

4
  • 2
    Lets make that clear: you want to run a server via a mobile used as hotspot? Hacking attempts will exhaust you data plan pretty quickly.
    – xenoid
    Aug 23, 2020 at 12:20
  • Many mobile operators use CGNAT ( en.wikipedia.org/wiki/Carrier-grade_NAT ). If this is your case, you are out of luck.
    – FedKad
    Aug 23, 2020 at 12:31
  • Please edit your question to include more detail. For example, if you doing port fowarding why do you need to use a mobile hotspot. Perhaps you can link what you found on google so that we can help you better
    – ldias
    Aug 23, 2020 at 12:35
  • 1
    Welcome to Ask Ubuntu. How to configure your mobile has nothing to do with Ubuntu. Mobile hotspots are not intended for running servers.
    – user68186
    Aug 23, 2020 at 13:13

4 Answers 4

1

Port forwarding is fairly important if you want to allow connections into your network to your server. Let's assume this isn't possible.

The only other viable way I've used before is SSHing out to another server. I use this to expose a development version of a site I'm working on and show it via the production server without having to upload anything.

ssh -NC example.dom -R 8000:localhost:8000

This makes localhost:8000 available on my server. On the server you should be able to then run curl -I localhost:8000 and see the request come through to your local machine.

To let others see this, I use nginx to proxy that onto port 80, add some TLS, password protection, etc. The how you do that will depend slightly on your existing infrastructure, so I'm not going to load you down with nonsense about proxy_pass.

0

Well i have tried every possible way to do this. Spend more than 10 hours of my time just for this. Have searched all over the internet, every forum, every related page. Answer is NO!. you cannot do it so do not waste you time again on this. Either you need to get a Static IP router from an ISP or you can use tunnels like NGROK. that would make your job done but little slow

1
  • I guess it's possible but not very effective. Feb 16, 2021 at 9:31
0

There are always chances. You don't need a static IP,just need to use services like NOIP or Dynamic DNS and then use tunneling so that outsiders could get to you server port. https://github.com/anderspitman/awesome-tunneling [great article with alternatives to Ngrok] Peace (:

0
0

most mobile internet providers use Ipv6 and a DS-Lite Tunnel for IPv4 connections (One IPv4 Address for multiple users), which makes it impossible to connect over ipv4.Have you tried to connect over your IPv6 GUA address? Note if you get a free hostname from no ip, you'll probably need a AAAA Record.

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