A
A
Akarant2022-04-21 13:54:30
SSH
Akarant, 2022-04-21 13:54:30

How to forward ssh to a Hyper-V virtual machine?

There is a virtual machine with WinServer 2016, another virtual machine with CentOS 8 is raised inside to host the project. The windows machine has an external white IP, two network interfaces: one looks to the WAN, on the second a Hyper-V virtual switch is created, to which the second VM with CentOS is connected. Both network interfaces are configured with static IPs from different subnets. A routing and remote access service in NAT mode is installed, through which packets go from the WAN interface to the Hyper-V virtual switch, and thanks to this, CentOS has the Internet. The NAT settings between the interfaces have a separate port for ssh, which implies that all packets coming from the WAN to this port will be redirected to the local IP address of the CentOS virtual machine. On it itself, sshd is configured to work on this port, iptables does not block this port (all chains policy is ACCEPT). Windows Firewall has rules to allow connections on this port over both TCP and UDP. What I want to do: I need to be able to connect to the CentOS VM through the white IP of the server through a certain ssh port (traffic on this port should be redirected to the virtual machine). For some reason the current configuration does not work. What happens behind the Windows WAN interface is unknown to me, there is no access there. Connecting to windows via RDP For some reason the current configuration does not work. What happens behind the Windows WAN interface is unknown to me, there is no access there. Connecting to windows via RDP For some reason the current configuration does not work. What happens behind the Windows WAN interface is unknown to me, there is no access there. Connecting to windows via RDP

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question