天天看点

Debian 修改网络配置

背景:下载了Kali-Linux-2017.1-vm-amd64镜像,在VM中打开后无法联网

解决:

1. 修改IP配置文件

vi /etc/network/interfaces

auto lo

iface lo inet loopback

auto eth0

iface eth0 inet static

pre-up ifconfig eth0 hw ether 00:0C:29:6D:59:32

address 192.168.1.116

netmask 255.255.255.0

gateway 192.168.1.1

注意:确保mac地址

2.修改dns

vi /etc/resolv.conf

nameserver 114.114.114.114

3.重启网络服务

# sudo /etc/init.d/networking restart

--完成--

继续阅读