I've build a ubuntu(18.04) guest os on a virtualbox in win server2016.
Previously, I set up a "NAT" network and "Host-Only" network.
In order for the host to access the guest, I set the static ip for the "Host-Only",
(solution refers to this topic: https://serverfault.com/questions/22515 ... s-internet )
It did create a connect between the host and guest os, and that worked beautifully.
But somehow, there is something wrong recently.
I found the connetction between guest and host is failed.
I can't access one from the other.
I don't remember that I did something special with network setting.
All I did on that guest ubuntu is to build a docker on it, and run some container to testing.
In the network of ubuntu, I didn't find the "NAT Interface", but the "Host-Only" interface is still the same with static ip.
I've tried reboot, or check the setting from VirtualBox, Everything seems good enough.
But yet, the NAT is still missing in guest os.
Then I tried to rebuild one, it turns out if I didn't set the static ip for "Host-Only" interface in guest, the "NAT" works fine, but if I tried set the static ip, the NAT go missing.
It's a paradox from my experience that build the first one.
I have needs for the host to connect the guest.
Can anyone points a instuction, so that I can try?
Grateful with any help
Vbox: 7.0.12
Host: Win Server 2016
Guest: Ubuntu 18.04
Network Issue: NAT will be missing.
Network Issue: NAT will be missing.
Last edited by scottgus1 on 25. Dec 2023, 14:30, edited 1 time in total.
Reason: de-obfuscated link
Reason: de-obfuscated link
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Network Issue: NAT will be missing.
I wonder if it's possible if the static IP for Host-Only is within the NAT IP address space?
Please do the following, once when the networks are working correctly, and again when the networks are failing:
- Right-click the VM in the main Virtualbox window's VM list, choose Show in Explorer/Finder/File Manager. Zip the VM's .vbox file (not the .vbox-prev file), and post the zip file, using the forum's Attachments tab. (Configure your host OS to show all extensions if the folder that opens does not show a .vbox file.)
- Start the VM from full normal shutdown, not save-state.
- In both host and VM OS's, run the correct command from the following in the Command Prompt or Terminal:
ipconfig /all
ifconfig
ip address
Post the outputs, label which is which. - In both host and VM OS's, ping 8.8.8.8. Post the outputs, label which is which.
- Shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.
Right-click the VM in the main Virtualbox window's VM list, choose Show in Explorer/Finder/File Manager. In the "Logs" subfolder, zip the VM's "vbox.log", and post the zip file, using the forum's Attachments tab. (Configure your host OS to show all extensions so you can find the "vbox.log", not "vbox.log.1", etc.)
-
- Volunteer
- Posts: 5678
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Network Issue: NAT will be missing.
@scottgus1:
As a general hint (and Christmas present ):
When more than one network interface is involved, the routing table is sometimes important (*). In consequence, in step 3 you could additionally ask for the routing tables. A set of matching commands would be:
(*) An example is the combination of a network interface in NAT mode <N> and a network interface in Host-only mode <HO>, when for some reason <HO> has a default route with a higher priority than the default route of <N>. A ping to 8.8.8.8 wouldn't work in that case (unless the IP address range of <N> included 8.8.8.8, of course ).
As a general hint (and Christmas present ):
When more than one network interface is involved, the routing table is sometimes important (*). In consequence, in step 3 you could additionally ask for the routing tables. A set of matching commands would be:
Code: Select all
Windows ipconfig /all route print
Linux ip address ip route
Linux ifconfig route -n
macOS ifconfig netstat -rn
Re: Network Issue: NAT will be missing.
@scottgus1
@fth0
Merry Xmas... I hope it's not to late
Wish you all have a great vacation !
I'm so happy to have you guys' help.
But I cannot provide more details, since I'm restricted by corporate policy.
That is the reason I didn't give anything further at first.
To prevent your confusion or bother,
I think it's better to figure it out on my own.
Thank you, and I would update some answers once I've got progress on it.
PS:
I tried the similar things for a Oracle Linux 7 guest, and it went well.
@fth0
Merry Xmas... I hope it's not to late
Wish you all have a great vacation !
I'm so happy to have you guys' help.
But I cannot provide more details, since I'm restricted by corporate policy.
That is the reason I didn't give anything further at first.
To prevent your confusion or bother,
I think it's better to figure it out on my own.
Thank you, and I would update some answers once I've got progress on it.
PS:
I tried the similar things for a Oracle Linux 7 guest, and it went well.
Last edited by O-Amer on 27. Dec 2023, 08:05, edited 2 times in total.
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Network Issue: NAT will be missing.
That's too bad. We'll if your bosses told you not to provide the info, that's all that can be done...
I hope you get things worked out!
FWIW if your work requires these VMs, you bosses would want them to work theoretically, and wouldn't boggle at providing the information, especially seeing that everything in the logs and command outputs is virtual or a private IP address behind a NAT router and common to practically all the networks on the planet. (unless your workstation gets a public IP address, which can be obfuscated.)
Thanks, fth0, for the idea of the routing table! I will have to read up on it, I haven't looked into these tables before.
I hope you get things worked out!
FWIW if your work requires these VMs, you bosses would want them to work theoretically, and wouldn't boggle at providing the information, especially seeing that everything in the logs and command outputs is virtual or a private IP address behind a NAT router and common to practically all the networks on the planet. (unless your workstation gets a public IP address, which can be obfuscated.)
Thanks, fth0, for the idea of the routing table! I will have to read up on it, I haven't looked into these tables before.