NAT does not work

This is for discussing general topics about how to use VirtualBox.
Post Reply
lamouette
Posts: 1
Joined: 15. Feb 2024, 19:43

NAT does not work

Post by lamouette »

OS: CentOS Stream release 8
Kernel: Linux localhost.localdomain 4.18.0-536.el8.x86_64 #1 SMP Thu Jan 18 15:15:29 UTC 2024 x│
86_64 x86_64 x86_64 GNU/Linux
VirtualBox: Version 7.0.14 r161095 (Qt5.15.3)

I want to configure NAT.
In File -> Tools -> Network Manager -> NAT Networks:
NatNetwork 10.0.2.0/24, DHCP enabled (yes I know Nat network is not NAT in vbox glossary, but
but there is no a NAT tab).
Networking settings on the VM:
Attached to: NAT
Cable Connected is checked

Code: Select all

in the VM:                                                                                    
ip -br -c addr                                                                                
lo              UNKNOWN         127.0.0.1/8 ::1/128                                           
enp0s3          UP                                                                            
enp0s8          DOWN                                                                          
virbr0          DOWN            192.168.122.1/24                                              
virbr0-nic      DOWN   


as you can see, no ip address belonging to netowrk 10.0.2.0/24 is showing up by default

question: I am an absolute beginer in vbox; what shall I do so that I can have my NAT configuration working?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: NAT does not work

Post by scottgus1 »

lamouette wrote: 16. Feb 2024, 09:30 I am an absolute beginer in vbox
The best thing to do in this case is stick to the basics and get a working VM first, then start learning why it's doing what it's doing before changing things.

The VM by default uses NAT, not NAT Network. Did you try running the VM with the default NAT first?

Also see Virtualbox Networks: In Pictures
Post Reply