I need to install packets in a KVM guest (vm) but the KVM host (hypervisor) doesn't have internet.
I already know how to configure an ssh+apt proxy to give apt install capabilities to computers in a one jump lenght proxy.
I tried setting a bridged interface but I keep getting connexion error after a few seconds of apt install through ssh.
I'm now in the need to perform a double jump to work aroung this issue. I tried chaining the proxy like below but I encounter some errors :
| pc-wan | | hypervisor |
|192.168.254.50|<-------ssh1------->|192.168.254.20| | VM1 |
/ |192.168.122.1 |<-------ssh2------->|192.168.122.15 |
-R 3334:ftp-debian:80 | \ |
| -R 3333:pc-wan:3334 |
| |
apt-proxy = localhost:3334 apt-proxy = localhost:3333
\_______________working_______________/
\_____________________________________________KO_____________________________________________/
The first jump work fine, I can apt install on the hypervisor. But when I try it on VM1, the following error apprear : connect_to to 192.168.254.50 port 3344: failed
.
It seems to come from the redirection between the two ssh sessions, the hypervisor seems to fail to redirect the apt install request from VM1 to the ssh1 tunnel.
Do you know how to resolve my issue ?
Note : The KVM host-guest network interconnexion is done by the default NAT bridge (switch).