Debian 修改网络配置

来源:互联网 发布:查询域名是否已备案 编辑:程序博客网 时间:2024/05/16 05:07
背景:下载了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


--完成--
原创粉丝点击