Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running server on a phone, using cellular connection

Tags:

sockets

I'm curious to know, is it possible to run a server on a phone and use the phone's mobile connection as the external IP? I've seen many servers (web, ftp, etc) for android phones, but many of these say that it will host the server over wifi. I'm wondering if these types of servers can use the mobile connection to host their files?

AFAIK, the phone has an IP address and no firewall.

EDIT: This is not a discussion whether it is prudent to use the cellular connection, just whether it is possible.

like image 651
MarkP Avatar asked Apr 13 '13 16:04

MarkP


2 Answers

While it is technically possible to host a server on a phone, it is unlikely to be usable without a special arrangement from your service provider (teleco). The phone sits with one or more firewalls and NAT devices between it and the internet. For most cell companies, these are configured to block incoming connections to the phone and so your server is not usable. For some companies, special arrangements can be made to allow such access. These arrangements are more often made with secure sub-networks than the open internet. Note that once incoming connections are allowed, you have no control over bandwidth use as people can, and will, just hammer your IP address.

Ps. Note, I say "most" above as I have seen, very rarely, telecos that allow incoming connections. They usually fix that fairly quickly.

like image 124
DrC Avatar answered Oct 16 '22 02:10

DrC


Yes, it is possible, as long as your mobile connection provider doesn't block that kind of traffic. External IP for 'public service' might be needed. It isn't any different from a regular PC - as long as your software is set properly, you're free to go.

It might be pretty inconvenient to use external IP, though. If you want to use something privately you can just set up VPN on the phone (most Android phones can do that out of the box). That way you can connect between devices freely, as long as you have a VPN server that phone can connect to.

Another option would be to do a reverse tunnel; that can be done with most of SSH software on PC, but I don't really know how Android goes. Good thing in that option is that SSH traffic seems to be rarely blocked - it never happened to me that it would be.

like image 41
TNW Avatar answered Oct 16 '22 02:10

TNW