Couldn't connect to internet using "NAT Network"

Discussions related to using VirtualBox on Linux hosts.
Post Reply
knightsu
Posts: 2
Joined: 26. Jan 2016, 13:18

Couldn't connect to internet using "NAT Network"

Post by knightsu »

ok this is a fresh install-two adapters enabled(NATNetwork and host-only) for this vm. Settings as in preferences- 1. "NATNetwork" (supports dhcp enabled) 2.Host-only Network i.e vboxnet0 (dhcp server disabled). I cannot connect to the internet inside the vm(couldn't connect to sites in browser or yum install things).
How can connect to the internet using this "NATNetwork" ?
Host:openSUSE Leap 42.1
Guest:CentOS 7
I want to use "Nat Network" for connecting to the internet and host-only for interacting with the host.

# ip a show (inside the vm)
Image

# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 (inside vm)
Image

VBoxManage list natnets

Code: Select all

NetworkName:    NatNetwork
IP:             10.0.2.1
Network:        10.0.2.0/24
IPv6 Enabled:   No
IPv6 Prefix:    
DHCP Enabled:   Yes
Enabled:        Yes
loopback mappings (ipv4)
		127.0.0.1=2 

ping -c4 google.com
ping : unkown host google.com

Details

Code: Select all

Name:            centgui
Groups:          /
Guest OS:        Red Hat (64-bit)
UUID:            d24c592d-5e48-4b01-86e7-8cccb3549e37
Config file:     /home/knightfuri/VirtualBox VMs/centgui/centgui.vbox
Snapshot folder: /home/knightfuri/VirtualBox VMs/centgui/Snapshots
Log folder:      /home/knightfuri/VirtualBox VMs/centgui/Logs
Hardware UUID:   d24c592d-5e48-4b01-86e7-8cccb3549e37
Memory size:     2048MB
Page Fusion:     off
VRAM size:       12MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
PAE:             on
Long Mode:       on
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
Time offset:     0ms
RTC:             UTC
Hardw. virt.ext: on
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
VT-x unr. exec.: on
Paravirt. Provider: Default
State:           running (since 2016-01-26T21:26:52.881000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address: 
Teleporter Password: 
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration: 
Autostart Enabled: off
Autostart Delay: 0
Default Frontend: 
Storage Controller Name (0):            IDE
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
Storage Controller Name (1):            SATA
Storage Controller Type (1):            IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  30
Storage Controller Port Count (1):      1
Storage Controller Bootable (1):        on
IDE (1, 0): Empty (ejected)
SATA (0, 0): /home/knightfuri/VirtualBox VMs/centgui/centgui.vdi (UUID: 0b0b3942-a13e-4814-9f31-e49aa43bcc34)
NIC 1:           MAC: 080027ECD1B4, Attachment: NAT Network 'NatNetwork', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2:           MAC: 08002723DCD4, Attachment: Host-only Interface 'vboxnet0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           enabled (Driver: PulseAudio, Controller: AC97, Codec: AD1980)
Clipboard Mode:  Bidirectional
Drag and drop Mode: disabled
Session name:    GUI/Qt
Video mode:      1024x768x32 at 0,0 enabled
VRDE:            disabled
USB:             enabled
EHCI:            disabled
XHCI:            disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Bandwidth groups:  <none>

Shared folders:  <none>

VRDE Connection:    not active
Clients so far:     0

Video capturing:    not active
Capture screens:    0
Capture file:       /home/knightfuri/VirtualBox VMs/centgui/centgui.webm
Capture dimensions: 1024x768
Capture rate:       512 kbps
Capture FPS:        25

Guest:

Configured memory balloon size:      0 MB
OS type:                             RedHat_64
Additions run level:                 0

Guest Facilities:

No active facilities.
Post Reply