Is it possible to mount a server that works from my computer?

Asked

Viewed 775 times

0

I have a chat made in Delphi that works only on internal network, I also have his project in case you want to make any changes, and I was wondering if it is possible to make this chat work on remote network computers from a server mounted on my own PC, as an example, Apache or any other type.

  • Who gave -1, could explain the pq? +1, this question will help many people.

3 answers

2


It is possible yes, but not recommended for obvious reasons: 24h operation, security, stability, guarantee and quality of connection, performance, energy, etc.

Nowadays it is so cheap a lodging or a VPS that there is no reason to host in own structure - its final cost probably (and side effects) will be much higher hosting on your computer. You don’t even need to register a domain, and you can use the IP of the VPS directly.

Some services with affordable prices:

  • You can indicate me a free serve for this same functionality?

  • @Pascalstarting here has a free plan for 6 months: http://gratisvps.net/vpswindows.html

  • There’s this one I’ve used and it’s very good, with server in Brazil: http://www.host1plus.com.br/hospedagem-vps/

2

If you fulfill this:

  1. Your client application connects to the server, not the opposite;
  2. Your computer has a real IP or you can configure your router, or more than one if you have (unusual but exists), to forward the requests to the ports assigned to your application or your application can configure the router with upnp (only works with a single router);
  3. Your external IP is fixed or you have a dynamic DNS service or each time a client will connect he will know your updated IP.

Certainly it is possible.

If they are requisitions http common, the door 80 should be exposed to an external real ip. If they are https, the common door is the 443. It can be any door you want, even if it doesn’t have to be the same external and internal door.

These numbers are default setting, as the application is yours, you can choose any number, just configure your network accordingly.

Editing

I agree with the recommendation of Alfredbaudisch. + 1 for his reply.

2

The short answer is:

Yes. It’s perfectly possible to make that happen. You don’t need any specific application like Apache. All you need is a router, know your Public IP and redirect, on your router, the packets coming from the Public IP on a specific TCP port to the internal IP of the computer running the Chat server. This port redirection (Port Forward) is critical, unless the chat is running on the router itself.

The long answer is:

On the internal network, if computers are on the same subnet, it is easy to get them to communicate. This is your current case.

However, when you want to communicate with a computer that is inside your home, from a computer that is outside your home, things get a little more complicated. The fundamental question is that to communicate this way, you need to know your Public IP, IE, the IP that the provider provides you for you to be able to surf the Internet from your home.

It is very common for the provider to also provide you with a router, as this allows several devices that are connected on your home network, whether by wi-fi or wire, to surf the Internet simultaneously. In addition to knowing your Public IP, you need to know which TCP port your chat is listening to (this you already know).

For you to understand better, let’s call the computer outside your home from EXT and the computer inside your home INT. The INT is connected to your home router, called here ROT.

EXT - External Computer - Public IP hypothetical: 200.123.12.21

ROT - Router (or gateway) connecting INT on the Internet. IP Public hypothetical: 179.79.12.12. Internal IP: 192.168.1.1

INT - Internal Computer - Hypothetical Internal IP: 192.168.1.23. Hypothetical TCP port that the chat server is listening to: 3131

Basically it works like this:

Goal: EXT want to connect to a chat service running on the machine INT who is in the house of @Pascalstarting;

  • EXT need to know the Public IP of ROT.
  • EXT also need to know the port that the chat service is listening to.
  • EXT then, with the chat client, it connects at 179.79.12.12:3131.
  • The package sent by EXT go through several routers until arriving in ROT.
  • The moment that package arrives in ROT it is redirected to port 3131 on Internal IP 192.168.1.23 (the IP of the INT)
  • INT then receives this package, processes and responds. (Like INT responds and that package arrives again on EXT leave for you to search.)

That’s basically it. There are interesting questions to consider, such as security and availability as the other answer said. Another very important issue is that providers change their Public IP constantly, so having a DDNS (Dynamic DNS or Dynamic DNS) service configured on the router is critical.

As a form of learning, I strongly recommend that you try this, because much will be learned in the process.

As a curiosity, I have a scheme of this kind in my house. I can turn a computer on remotely, work and then turn it off, also remotely. However, as I am boring with security, I use SSH Port Forward. My router is a TP-Link N750, running Openwrt (Linux), so I can have SSH and other services that allow me to manage my home network securely.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.