小编Gas*_*sim的帖子

CentOS 7 VirtualBox 无法访问互联网

我在将 CentOS 7 客户机连接到互联网时遇到问题。我的 VirtualBox 网络配置如下:

Adapter 1: NAT; Adapter 2: Host-Only (vboxnet0)
Run Code Online (Sandbox Code Playgroud)

vboxnet0 使用默认 VirtualBox 参数通过 DHCP 连接设置。

在我的 CentOS 来宾中,我命令ip a并得到以下信息:

enp0s3: 10.0.2.15/24 (NAT adapter)
enp0s8: 192.168.56.102/24 (Host-Only adapter)
Run Code Online (Sandbox Code Playgroud)

我可以从我的主机连接到我的 VirtualBox:

ping 192.168.56.102
Run Code Online (Sandbox Code Playgroud)

可以发送和接收数据包。

但是,我的 VirtualBox 无法访问互联网:

ping www.google.com
Run Code Online (Sandbox Code Playgroud)

输出“未知主机 www.google.com”

这是我的ifcfg-enp0s3

TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
IPV4_FAILURE_FATAL=no
IPV6_INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s3
UUID=UUID HERE (sorry I cannot copy from my guest host yet, no Guest Additions and it was too long)
DEVICE=enp0s3 …
Run Code Online (Sandbox Code Playgroud)

networking centos virtualbox

61
推荐指数
3
解决办法
12万
查看次数

debian 无法卸载 dovecot

我在卸载 dovecot 时遇到问题。在试图修复它时,我让它变得更糟。这是“日志”:

Errors were encountered while processing:
 dovecot-imapd
 dovecot-pop3d
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@gasimzada:/usr/lib# apt-get remove -f dovecot-imapd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  dovecot-imapd dovecot-pop3d
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 976 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... …
Run Code Online (Sandbox Code Playgroud)

debian apt-get dovecot

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

apt-get ×1

centos ×1

debian ×1

dovecot ×1

networking ×1

virtualbox ×1