Machines: Host laptop: 192.168.0.5 VirtualBox VM with NAT Network Adapter: 192.168.56.101
If I run this it doesn't work if I open in the browser
ssh -L 30012:192.168.0.5:8080 -N -f -l usersu 192.168.56.101
But this works perfectly fine:
ssh -L 30012:127.0.0.1:8080 -N -f -l usersu 192.168.56.101
I also added the rule in UFW to allow 30012. What am I doing wrong?
I need to do this port forwarding from VirtualBox VM in which I do web site development. I wanted to check the web site using mobile device.
The VirtualBox VM has two network interfaces NAT and host only. For some reason Virtual Box NAT port forwarding stopped to work (Host and guest restart did not help). I decided to use SSH port forwarding. But it only works on
I know I could add 3rd network inteface "Bridged Adapter" in VirtualBox to get a new IP in local network but this solution I don't like because it introduces some complexity.
192.168.56.101 is the host only network interface of VirtualBox VM. I can access it only from host and guest VMs, but not from mobile phone which is connected to the local network which is
Tried to use this
ssh -L 30012:0.0.0.0:8080 -N -f -l usersu 192.168.56.101
It works for 127.0.0.1, but doesn't work for 192.168.0.5.
Based on the @JakeGould’s comment at the moment I use workaround in which I added 3rd Bridged Network interface and for webpack did this change as explained in this answer.