Reaching homeserver from the internet via Android hotspot

this looks quite interesting:
https://stackoverflow.com/questions/6176609/connect-an-android-device-to-a-web-service-on-local-host

yes, it does it for sure. I am used to key in APN params 1by1 each time. Which key should then I use?
Calling provider is out of question: is a huge loss of time and energy. Better know the right key for a shot: works or not. end.

probably yes. I am thinking of some tor routing then, but no so sure… Any other idea?

Why would a nomad need to bring a music stream server or own chat server with himself lol? Will he stream from his server in his tent to his mobile phone down by the lake? Just take the server with you to the lake. And no need for streaming, just plug in speakers and press play. :stuck_out_tongue:

Anyhow, I’m just telling you how it usually is. I don’t know how it is in your case. Check what is the external IP you get on your phone. Running traceroute/tracepath could work too possibly. And if you see IP in the range of 100.64.0.0/10 then you are f*****. Well, there are still ways around it, if you google a bit.

only because was a dumb proposition :slight_smile: first thing in mind :slight_smile:
Of course I was thinking of more serious things… but even lunatic are widespreaded :slight_smile:
Btw, external android IP is in the range 5.90.0.0 so looks good…

ok, tryied out: no idea how to conf it…

This is beside the point.
The initial possibility was:

with the emphasis on what you want: a public address

The fact that you can change (or need to type in) your APN data doesn’t mean that your provider will offer a public address.
Perhaps they do - but with a different plan, that will likely be more expensive …

I had a Dutch provider, KPN, in the past. Nowadays I don’t have the need for 4G/LTE setup.
I could use these APN’s with the exception of the Corporate ones:

Use a translator…
I used advancedinternet.

So @alimurgia would have to find out if the APN is transparent.

Ok, so let rephrase my target:

From the internet, I want to connect to an homeserver linked to the net through an Android phone acting as home router.

Any idea for a robust, safe and simple way? Thank You

Breaking news:
my operator DOES NOT support port-forwarding :frowning:
Alternative solutions? Creative ideas?

Yesterday I began this post:

After few hours researching, with many helps, it was discovered that Mobile Operators do block NATting (mine does…).

Since I go on wishing to reach my homeserver connected via Android, I am asking which alternatives there are:

INTERNET----->MOBILEandroid----->LAN PC with webserver
HTTP(s)-------->CG-NAT blocked!!—>Port-forwarding
HTTP(s)-------->??alternatives??----->??alternatives?? (in case of eg TOR, how is done?)

The cellular network is not designed for hosting - so the only real alternative is a VPS e.g. Oracle free tier.

mmm… Oracle…
then would be Tor a better bet…

Why do you think Tor is safe? Tor is about disguising the endpoints by bouncing the traffic between nodes - but if you run an exit node - you can capture all traffic - so safe - absolutely not safe.

You cannot host anything on a cellular network - all devices uses non-routable addresses - whether trying to access through tor or otherwise - they are inaccessible.

Oracle is a cloud provider with hosting centers in various countries among them Switzerland - my search engine sx.nix.dk is on a free tier located in Switzerland.

You may be able to use something like Teamviever or NoMachine because your device using the cellular network creates an outgoing connection to a third party server - and when you connect - the third party server hands over that connection to the connecting device.

If you want to get around the solution implicating third party servers like Teamviewer or NoMaching you still need a VPS on a static IP.

Using a VPS you can setup a ssh or vpn server and connect your home device to that server. Then configure that service to allow routing between your home client and the VPS - and to utilize it connect your roaming device to the VPS using ssh or vpn and by means of the configured routing you access the data on your home device.

This is an advanced usecase and out of scope for this forum. You will have to be proficent in network and service configuration to achieve this.

from reading here (the link from above)

https://android.stackexchange.com/questions/168422/how-to-port-forward-internet-using-android-hotspot-to-pc

first answer

you can find this link, explaining the background a bit more in depth:

https://android.stackexchange.com/questions/203996/how-to-connect-to-android-through-ssh-over-3g-4g-public-ip/205807#205807

where it essentially says:

One of the possible solutions is
connect through a VPN - choose a provider which lets you do port forwarding

As I understand it, this should work.

quote from there:

As far as CGNAT is concerned:

You can opt to buy a static public IP if your ISP provides this service but the price isn’t “hearing friendly” in most cases.

Sign up for a service that lets you configure Port Forwarding on public VPN. There are free (for one port forwarding) solutions like portmap.io as well if you are not afraid of your traffic being sniffed :slight_smile: