F
F
frankiedsf2016-10-28 13:11:12
Programming
frankiedsf, 2016-10-28 13:11:12

Point-to-point connection over the Internet?

Good day!
I apologize if I'm creating an existing thread.
I wrote a TCP server in c# and ran it on my home computer. The server listens on port 13000. In the router settings, I made port forwarding (.nat). Checked on 2ip.ru - the port is open.
Wrote a client that connects via TCP. But attempts to establish a connection with the indication of the external ip of the router and port 13000 were unsuccessful.
Question: How can I connect to this server from work via the Internet?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
R
Rou1997, 2016-10-28
@Rou1997

No way without an external static IP, rent a VPS or DS, set up a server there, and make both your computers clients, and if the connection takes a long time, then many more factors will have to be taken into account, for example, bots and network outages.

B
bnytiki, 2016-10-28
@bnytiki

You need a properly configured router. For example, Mikrotik can.
But it’s cheaper, as they already said here - just rent a server for 100 rubles a month (it’s unlikely that you will need more than 2 months for debugging, and this is only 200 rubles, the router will cost more)

D
dmb_1945, 2016-10-28
@dmb_1945

what router? what ip (above question)? in a network "client" was connected?

M
Mercury13, 2016-10-28
@Mercury13

The first thing to check is to hold the session within the same computer with a connection to localhost or 127.0.0.1. There's nothing wrong with setting up your router.
Then - within the same local network at the intranet address. This is the first real network!
Then you can try online.
If you connected from the same network to the external IP address of the router: there is no such routing (the so-called NAT hairpin) by default, but in some routers it happens: a packet that came from the internal network to an external address is considered to have come from outside.
If you were connecting from another network(by external IP address, of course): check your router settings. Make sure that the external address on the router is the real Internet one. Try to set up another server (for example, Apache or gaming). As a rule, after all these ordeals there are no problems.
If "from the outside" is work, then a bunch of ports are probably blocked. It would be worth checking too.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question