I need your advice.
Brief to my question:
I got two Linux/Ubuntu 18.04 Lts. machines. First one is the host(SSHD) and has a VM machine installed on it(virtual machine's ethernet is configured as NAT: Qemu/KVM - virtualization). Simple SSH connection between host and VM on it in NAT regime works perfectly: ssh [email protected] > pass
First machine is connected to router via LAN and second machine is a ssh-client connected to a router via Wifi.
machine1(host machine, LAN) > Router < (wifi) machine2(SSH Client)
Is there any solution to access VM(on host machine) with machine that is connected to wifi network only? I'm pretty new with Unix/Linux, so I would really appreciate your support with this case.
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.122.x netmask 255.255.255.0 broadcast 192.168.122.255
P.S. I would prefer not to switch NAT to bridge regime. If you need more data, I will gladly provide you with some more details.
iptables
command. Since this is a common requirement, you will find plenty of tutorials on the internet. Alternatively, it might also be possible to create a route to the VM's address on machine2, with machine1 as router.