修改网卡配置
在终端输入命令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