kali的網卡配置文件為/etc/network/interfaces 下面定義了lo、eth0和eth1的配置
auto lo # auto表示開機啟動該網卡設備 iface lo inet loopback auto eth0 # 使用dhcp分配地址 iface eth0 inet dhcp iface eth0 inet6 auto auto eth1 # 使用靜態地址 iface eth1 inet static a ddress 192.168.1.2/24 gateway 192.168.1.1 iface eth1 inet6 static address fec0:0:0:1::2/64 gateway fec0:0:0:1::1
然后重啟網絡
service networking restart
或者重啟某個網卡
ifdown eth1
ifup eth1