T
T
thatmaniscool2018-08-11 03:28:14
Java
thatmaniscool, 2018-08-11 03:28:14

How to connect to a computer through a router and remote access?

So, I have a small server that I want to use as a smart home server.
To do this, I wrote a simple server program, the program accepts commands from outside, and does what it needs.
I also wrote a simple android program that manages to send these commands.
The server has access to the network only through a router, for which I made port forwarding in the router.
Those. specified the local address of the server and the port to which commands should be sent.
The question arose, what next? The router has a different IP address and it turns out that I will connect to the router, and not to the server.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2018-08-11
@xmoonlight

port mapping :(

H
Humsterkill, 2018-08-11
@Humsterkill

If port forwarding does not suit you, then set it to vpn and you will connect as if from a local network.
I don't see a problem with connecting to the router ip (better dns name) to an external port with subsequent forwarding to your application. Explain what's wrong?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question