Android Question Web project using Httpserver program

frederic

Member
Licensed User
Longtime User
Hello,

I have try the program HTTPServer, it works well locally, but how can I sûre it works also outside, it mean via the web in another place?
The command stay the same ? 192.168.x.xx.5555 ? or it is another one?
I don't understand the mechanisme.
I thought, from outside, I had to go through the external address of my "livebox", how to proceed?
Thanks.
frederic
 

MarkusR

Well-Known Member
Licensed User
Longtime User
the web server app have a ip : port for listening at new tcp connections, after the connection the port 80 or 443 is free for other connections and
the connection between client and server use a free port.
https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
u need setup port forwarding in your router to access him from world wide web. often it have a predefined config for http / https.
so you have a public ip : port that is connected to a intern local ip : port
https://en.wikipedia.org/wiki/Port_forwarding
you should assign/allocate a ip for your server pc in router, so after a restart it get the same ip.
in some routers you can use a Dynamic Domain Name System, its a web service where you have an account and you can choose a free domain name.
this name is then connect to your public ip in router by automatic. something like https://www.noip.com/
https://en.wikipedia.org/wiki/Dynamic_DNS
Snap_2018.07.10_21h33m39s_002_.png
 
Last edited:
Upvote 0

frederic

Member
Licensed User
Longtime User
ok. I already read the article, but some persons says that no-ip is not really free of charge?
In term of sécurisation, the firewall play her role?
Thank
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Hi Frederic,

IMHO a firewall is very important altough it's just the last line of defense. So it's advisable to shut down any port but those few that you really use.
Another line of defense is made up of an SSL certificate (e.g. free ones from Let's Encrypt); this one keeps the communication between server and clients encrypted making life harder for an attacker.

Just one question: did you explore the possibility to move your server code to a public VPS? AFAIK, Aruba offers in France and some other countries a low-grade VPS for just 1 euro/month (I acquired one from their webfarm in Italy).

udg
 
Upvote 0

frederic

Member
Licensed User
Longtime User
No, I don't know, for the moment I explore, I am at the beginning of my project.
Anyway thank for the information.
frederic
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
that no-ip is not really free of charge
free is valid 30 days or something and then i got a mail and i must refreshed it online by human input, some clicks.
i used it only for myself. i can connect easy via remote desktop (at holiday) to my raspberry pi at home.
 
Upvote 0
Top