W
W
waltaki2020-09-07 08:52:57
linux
waltaki, 2020-09-07 08:52:57

How to forward a static IP to a dynamic non-white?

There is a server with a static IP. And a regular PC that has a dynamic non-white IP. It is necessary to make sure that the server IP is available on the PC (for example, so that I can run a web server located on the PC on the server IP, and it would be accessible by the server IP). That is, create a tunnel. But the problem is that the IP of the PC is not white, that is, I think that you need to use a VPN, but I still don’t understand how to set it up for this.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
pfg21, 2020-09-07
@pfg21

even vpn, even ssh.
google forwarding the "remote port of the pc" for example so ssh
plus in ssh that it exists and is used on each server. vpn needs to be additionally prikolhozit.

A
Alexey Dmitriev, 2020-09-07
@SignFinder

VPN server on server, VPN client on PC.
Set up the VPn to always give out the same ip and work with it.

A
Anton Teremshonok, 2020-09-18
@TerAnYu

I propose to set up some kind of VPN, set up permission for forward traffic, then execute:

iptables -t nat -A PREROUTING -p tcp --dport 55170 -j DNAT --to 10.10.14.5:55170

where dport 55170 is the external port on the server
10.10.14.5 : 55170 - 10.10.14.5 is the client's internal address (the VPN address that the client receives), 55170 is the port to forward to
. I hope I explained it clearly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question