Page 1 of 1

Cannot access guest using port forwarding

Posted: 17. Dec 2021, 09:32
by macandroid
I have a Centos 7 guest which could be accessed from the host and had internet access in itself, using network adapter in Bridged mode.
However after upgrading macOS op Monterey and upgrading VB from 6.1.28 to 6.1.30, internet access from guest did not work anymore and access host => guest was unreliable.
So now I switched to 'Host only adapter' on Adapter 1 and to NAT on Adapter 2. On the latter I enabled port forwarding of SSH port 22 => host port 2022, port 80 to host port 2080 and so on. I have followed the instructions how to do port forwarding.
Internet access did work now from guest but I still have no access from host to guest. When I do a request to localhost:2080 from the host, it does not issue an error but issues zero bytes. Same with SSH. Just nothing happens, it appears that ports are open, but no data is passed.

Find attached the .vbox file.

Re: Cannot access guest using port forwarding

Posted: 21. Dec 2021, 16:16
by scottgus1
Your NAT port forwarding is set to this:
<NAT>
<Forwarding name="http" proto="1" hostport="2080" guestport="80"/>
<Forwarding name="https" proto="1" hostport="2443" guestport="443"/>
<Forwarding name="ssh" proto="1" hostport="2022" guestport="22"/>
</NAT>
The settings look good to me. Did you pick TCP for the protocol? (I'm curious what 'proto="1" ' means, and I can't check now.)

Can you access your desired services through the Host-Only network?