kali linux 配置dns Linux kali配置IP與DNS
設置IP地址:
# vi /etc/network/interfaces
以下是該文件內容:
# 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 #配置eth0使用默認的靜態地址
address 192.168.0.200 #設置eth0的IP地址
netmask 255.255.255.0 #配置eth0的子網掩碼
gateway 192.168.0.1 #配置當前主機的默認網關
———————————————
設置DNS:
# vi /etc/resolv.conf
以下是該文件內容:
domain
nameserver 192.168.168.1 #首選DNS
nameserver 114.114.114.114 #備用DNS
———————————————
重啟網絡服務:
# /etc/init.d/networking restart
———————————————