Answer the question
In order to leave comments, you need to log in
How to access the local network from the outside if there is a white IP?
At home, there is a Redmi ax6 router with a static ip (188.226.xx), a hypervisor (192.168.xx) with several machines is connected to it, as well as several physical servers with local ip (192.168.xx).
The task is to connect from the outside (from the laptop to which the Internet is distributed) to the hypervisor or Linux machine via SSH.
What is the best way to implement such a connection?
Answer the question
In order to leave comments, you need to log in
you forward the ssh port on the router (most likely called nat - virtual servers) to your linux server, you can do everything else using ssh port forwarding (works in both directions), moreover, many management and remote administration tools in linux imply that they can connect via ssh connection.
in addition, ssh has a regular vpn
Choose a server that will play the role of a bastion (jump host), that is, a server from which you can connect to other servers.
Throw out port 22 (or whatever you chose for SSH) of this bastion or (jump host).
Add your public ssh key to the servers you are going to connect to and disable password authentication.
Connect to the bastion with authentication forwarding (a flag -A
on the regular ssh client so that there is no private key on the bastion), and from the bastion to the server of interest.
In order not to enter a long command every time, describe the connections in ~/.ssh/config
PS
Magic SSH
Reminder to ssh users
Hmm.. Have you considered a VPN?
IMHO - the most convenient option.
OpenVPN is the most popular solution. The Best of the best in everything but speed.
WireGuard is a newcomer, but has already gained a lot of adherents.
They say that WG is faster than OpenVPN, but I didn't notice much difference.
Where m WG wins is in the ease of setup.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question