kali虚拟机设置网络连接 |
您所在的位置:网站首页 › 虚拟机网络编辑器在哪里安装 › kali虚拟机设置网络连接 |
在kali中设置网络 大家在安装kali虚拟机之后没有进行设置进行网络连接可能会发现一直弹出dhcp网络连接错误。 这是因为你的网卡并没有ip地址而且是dhcp模式所以要进行一些设置。 1.首先把kali虚拟机的网络适配器更改为桥接模式直连物理网络。 2.查看自己主机的(是自己真实电脑的不是虚拟机)ip地址,网关,网段 你的windows 键(键盘左下角那个微软图标) + r ,然后输入cmd ,调出shell ,输入ipconfig查看ip 比如我的地址: 3.修改/etc/network/interfaces 文件:gedit /etc/network/interfaces “address”把ip地址设置为自己主机网段中的一个,比如我的ip是192.168.0.40,我可以设为192.168.0.66 “gateway” 在其中加上自己主机的网关,比如我的就是192.168.1.1 “netmask”子网掩码照抄自己主机的,比如我的为为255.255.254.0 修改结果如下: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface** auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.0.66 gateway 192.168.1.1 netmask 255.255.254.0 4.修改dns gedit /etc/resolv.conf 添加几个常用DNS 可以直接粘贴我下面写的 domain nameserver 8.8.8.8 nameserver 114.114.114.114 search localdomain 5.重启网络服务 /etc/init.d/networking restart(可能需要等一会) 弹出以下界面时就行了: 6.输入 ifconfig -a 查看ip 可以看出我的ip就是我自己设置的。 然后就可以上网了。 谢谢观看,有问题请留言。 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |