修改網卡配置
在終端輸入命令vim /etc/network/interfaces,配置網絡信息
# This file describles the network interfaces available on your system
#and how to activate them. For more information,see interfaces(5).
#The loopback network interface
Auto lo
Iface lo inet loopback
# The primary network interface
Allow-hotplup eth0
Iface eth0 inet dhcp
配置完成后,在終端輸入“reboot”
如果kali需要采用靜態地址上網方式序言修改/etc/network/interfaces配置文件
文件
# This file describles the network interfaces available on your system
#and how to activate them. For more information,see interfaces(5).
#The loopback network interface
auto lo
Iface lo inet loopback
# The primary network interface
allow-hotplup eth0
iface eth0 inet static//配置eth0使用默認的靜態地址
address 192.168.1.1 //設置eth0的IP地址
netmask 255.255.255.0 //設置eth0的子網掩碼
開啟ssh和apache2服務
開啟ssh服務,在終端輸入“vim /etc/ssh/sshd_config”。將#passwordAuthentication yes 注釋去掉,保存並推出,在終端中輸入“service ssh start”啟動ssh服務
在終端中輸入命令“vim /etc/apache2/ports.conf”,修改apache2的默認端口號,把監聽端口修改為“8080”,保存退出
輸入service apache2 start
在瀏覽器中輸入http://localhost:8080回車,或http://ip:8080