Eu tenho o gentoo linux rodando dentro de um host do VirtualBox Windows 10, que costumava funcionar até recentemente.
Basicamente, não importa qual protocolo eu tente usar, eu entendo que a rede é inacessível, para qualquer rede pública, exceto pelo fato de que pesquisas de DNS e ping funcionam. O firewall do Windows está completamente desativado. Como posso obter 'acesso à Internet' e tal trabalho?
Eu tenho 5 Vlans na minha rede, então eu defini qual deles deve ser usado usando:
VBoxManage modifyvm "Gentoo" --natbindip1 10.XXX.XXX.XXX
, que parece ter feito o truque, caso contrário, nada funcionará.
Também tive que fazer VBoxManage modifyvm "Gentoo" --natdnshostresolver1 on
, caso contrário, a resolução de DNS não funciona, mesmo quando eu configuro os servidores DNS corretos.
Se eu alterar VBoxManage modifyvm "Gentoo" --natdnshostresolver1 off
, as pesquisas de DNS não funcionarão, no entanto, ainda posso pingar, mas o wget (como exemplo) ainda recebe Network is unreachable.
O erro que recebo ao tentar acessar qualquer tipo de recurso de rede é:
Connecting to www.mirrorservice.org|212.219.56.184|:80... failed: Network is unreachable.
O DNS / dhcp parece estar funcionando corretamente, como se define:
tim@vbox ~ $ cat /etc/resolv.conf
# Generated by dhcpcd from enp0s3.dhcp
# /etc/resolv.conf.head can replace this line
nameserver 10.0.2.3
# /etc/resolv.conf.tail can replace this line
tim@vbox ~ $ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.2.2 0.0.0.0 UG 2 0 0 enp0s3
10.0.2.0 0.0.0.0 255.255.255.0 U 2 0 0 enp0s3
EDITAR :
Como um adicional de estranheza, se eu em vez disso ligar a uma vlan diferente, que usa um servidor proxy, e configurar o servidor proxy na VM - isso, então, tem conectividade total com a internet, como esperado. É quase como se, ao ligar-se a algumas das vlans, nem todo o tráfego fosse passado pela vlan.
Eu não posso usar a ponte de rede, já que não há um conjunto padrão de VLANs, e não quero tentar configurar em outra VLAN por causa da política de escritório;)
c:\Program Files\Oracle\VirtualBox>VBoxManage showvminfo "Gentoo" --details
Name: Gentoo
Groups: /
Guest OS: Gentoo (64-bit)
UUID: 991fc173-6689-4a7f-b1e3-2873acb119a9
Config file: C:\Users\XXX\VirtualBox VMs\Gentoo\Gentoo.vbox
Snapshot folder: C:\Users\XXX\VirtualBox VMs\Gentoo\Snapshots
Log folder: C:\Users\XXX\VirtualBox VMs\Gentoo\Logs
Hardware UUID: 991fc173-6689-4a7f-b1e3-2873acb119a9
Memory size: 4096MB
Page Fusion: off
VRAM size: 16MB
CPU exec cap: 100%
HPET: off
Chipset: piix3
Firmware: BIOS
Number of CPUs: 1
PAE: off
Long Mode: on
Triple Fault Reset: off
APIC: on
X2APIC: 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
BIOS APIC mode: APIC
Time offset: 0ms
RTC: UTC
Hardw. virt.ext: on
Nested Paging: on
Large Pages: on
VT-x VPID: on
VT-x unr. exec.: on
Paravirt. Provider: Default
Effective Paravirt. Provider: KVM
State: powered off (since 2018-01-02T11:34:10.174000000)
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
SATA (0, 0): C:\Users\XXX\VirtualBox VMs\Gentoo\Gentoo.vdi (UUID: c702659a-4ca0-4941-9fcd-32c78be9c0f5)
NIC 1: MAC: 0800279E528E, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 1 Rule(0): name = SSH, protocol = tcp, host ip = 127.0.0.1, host port = 2222, guest ip = 10.0.2.15, guest port = 22
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1: disabled
UART 2: disabled
UART 3: disabled
UART 4: disabled
LPT 1: disabled
LPT 2: disabled
Audio: enabled (Driver: DSOUND, Controller: AC97, Codec: AD1980)
Audio playback: enabled
Audio capture: enabled
Clipboard Mode: Bidirectional
Drag and drop Mode: Bidirectional
VRDE: disabled
USB: enabled
EHCI: disabled
XHCI: disabled
USB Device Filters:
<none>
Bandwidth groups: <none>
Shared folders: <none>
Capturing: not active
Capture audio: not active
Capture screens: 0
Capture file: C:\Users\XXX\VirtualBox VMs\Gentoo\Gentoo.webm
Capture dimensions: 1024x768
Capture rate: 512 kbps
Capture FPS: 25
Capture options: ac_enabled=false
Guest:
Configured memory balloon size: 0 MB