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.
Cannot access guest using port forwarding
-
- Posts: 27
- Joined: 10. Nov 2018, 14:04
Cannot access guest using port forwarding
- Attachments
-
- VMKlaaslaptop-Centos.vbox.zip
- (2.03 KiB) Downloaded 9 times
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Cannot access guest using port forwarding
Your NAT port forwarding is set to this:
Can you access your desired services through the Host-Only network?
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.)<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>
Can you access your desired services through the Host-Only network?