kali设置static ip, gateway, dns

 

sudo vim /etc/network/interfaces

 

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.10.1.69
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 10.10.1.1

 来源:https://www.unixmen.com/how-to-find-default-gateway-in-linux/

 

修改DNS:

sudo vim /etc/resolv.conf

添加
nameserver 10.10.1.111

 

来源:https://www.grepper.com/answers/326280/How+to+change+DNS+on+Kali

 

posted @ 2024-06-22 16:42  profesor  阅读(21)  评论(0编辑  收藏  举报