I need help.
I will try to describe the situation in detail:
There is a dedicated server with a primary IPv4 address and an additional IPv4 address.
This dedicated server has LXD containerization installed.
The containers have internal IPv4 addresses that by default cannot be accessed from the outside.
At the moment, I set it up like this (MobaXterm, PuTTY):
When an SSH connection is made externally, the primary IPv4:Port is redirected to the correct container, e.g:
184.108.40.206:33 → 10.50.190.200:22
220.127.116.11:44 → 10.50.190.100:22
lxc config device add [container_name] sshproxy proxy proxy proxy listen=tcp:18.104.22.168:33 connect=tcp:10.50.190.200:22
The extra external IPv4 leads directly to one of the containers (the container has no internal IP).
When accessing an additional external IP:port, redirect the SSH connection (MobaXterm, PuTTY) to another container using, for example, HAPRoxy:
Additional external IP - 22.214.171.124
126.96.36.199:33 → 10.50.190.40:22
188.8.131.52:44 → 10.50.190.40:22
Please describe how to do this (in as much detail as possible), with commands if possible (I am not good at these settings).