0

So I've run out of ideas on troubleshooting this to resolve the problem and figured this was the next stop. In short I'm running Ubuntu within VirtualBox and I'm trying to SSH to the virtual machine using VirtulBox's natted network feature. To accomplish this Ive made the following configurations within VirtualBox.

NatNetwork - IPv4 prefix:10.0.0.0/24 DHCP:disabled ( Guest assigned statically within network range using 10.0.0.2 )

Port forward rule - protocol:TCP Host:172.0.0.1 port:61022 <--> Guest:10.0.0.2 port:22

Ive verified port 61022 is listening on my Host machine with the loopback address and that openSSH is running and listening on my guest machine using port 22. However when I attempt to SSH to the machine using PuTTY I get the following error.

Network Error: Software cause connection abort

I altered the network type within VirtualBox to bridged and assigned the machine an IP on my local network. Im able to SSH to the machine with that configuration, but not when using NAT or NAT network.

Iv done the following troubleshooting with no success. Updated all software PuTTY and Virtualbox along with the guest and host OS. Reset the windows firewall using netsh advfirewall -r along with the winsock settings and rebooted the system, but I am still getting the error when attempting to SSH. I also ran a packet capture to ensure that the correct port was being used.

No.     Time           Source                Destination           Protocol Length Info
      1 0.000000       127.0.0.1             127.0.0.1             TCP      56     49786 → 61022 [SYN]

No.     Time           Source                Destination           Protocol Length Info
      2 0.000064       127.0.0.1             127.0.0.1             TCP      56     61022 → 49786 [SYN, ACK]

No.     Time           Source                Destination           Protocol Length Info
      3 0.000104       127.0.0.1             127.0.0.1             TCP      44     49786 → 61022 [ACK]

No.     Time           Source                Destination           Protocol Length Info
      4 0.010466       127.0.0.1             127.0.0.1             TCP      72     49786 → 61022 [PSH, ACK]

No.     Time           Source                Destination           Protocol Length Info
      5 0.010497       127.0.0.1             127.0.0.1             TCP      44     61022 → 49786 [ACK]


No.     Time           Source                Destination           Protocol Length Info
      7 18.635780      127.0.0.1             127.0.0.1             TCP      44     61022 → 49786 [RST, ACK]

Any suggestions or troubleshooting ideas to resolve this would be greatly appreciated, Thank you!

4
  • 1
    "I just want my guest PC to reach the Host machine" – With NAT this should be possible out of the box. Many other parts of the question make me suspect you want the other way around. It's quite unclear; often when you say "the machine", it's not clear if you mean the host or the quest. Frankly my impression is maybe you confuse the two terms. The host runs VirtualBox, the guest is a VM. Please edit and clarify like "The host is …, its config is …; the guest is …, its config is … I run PuTTY on …, here's the screenshot of its settings …". How can the guest be 172.0.0.1? Commented Oct 3, 2023 at 5:18
  • if you only want host<-->guest connectivity, why not just use an internal network? You don't need to mess with NAT for this.
    – essjae
    Commented Oct 3, 2023 at 10:04
  • Putty into a virtual machine is very easy. I have posted instructions here how to do it. You are making this complicated and unclear.
    – anon
    Commented Oct 3, 2023 at 10:28
  • 1
    Please take our short tour to see how the site is designed to work. Solutions belong to answers. You should remove your solution from the question and post it as an answer. The "incorrect labels for the host and guest machines" should be fixed by editing the question. Commented Oct 4, 2023 at 4:04

1 Answer 1

0

I ended up discovering the trouble. It appears altering the default Network during my initial set up from 10.0.2.0/24 to 10.0.0.0/24 caused some issues. I noticed this after enabling DHCP on the network and switching the guest machine to DHCP. It was receiving an IP from the default network range not the configured one. Removing and re-adding the Nat-network and providing it firewall permissions again resolved this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .