title: Kali網(wǎng)絡(luò)配置
date: 2016-07-31 21:24
tags: Kali滲透測(cè)試 Kali安裝與環(huán)境優(yōu)化
0x00 Kali 網(wǎng)絡(luò)配置
當(dāng)在一個(gè)有DHCP服務(wù)器的網(wǎng)絡(luò)環(huán)境中,kali會(huì)自動(dòng)獲取到IP地址,如果獲取失敗則將手動(dòng)配置網(wǎng)絡(luò)。
臨時(shí)ip地址(電腦重啟后失效)
自動(dòng)獲得ip地址:
$ dhclient eth0
手動(dòng)獲得ip地址:
$ ifconfig eth0 192.168.1.10/11
查看網(wǎng)絡(luò)配置:
$ ifconfig eth0
添加網(wǎng)關(guān):
$ route add default gw 192.168.1.1
查看:
$ netstat -nr
靜態(tài)路由的添加并指定網(wǎng)卡:
$ route add -net 192.168.0.0/24 gw 192.168.1.100 eth0
編輯DNS:
$ echo nameserver 8.8.8.8 > /etc/resolv.conf
重啟網(wǎng)卡:
$ /etc/init.d/networking restart
重啟網(wǎng)絡(luò)管理:
$ /etc/init.d/network-manager restart
設(shè)置固定ip
編輯網(wǎng)卡配置文件路徑:
$ vi /etc/network/interfaces
allow hotplug eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.254
dns-nameservers 192.168.0.10 8.8.8.8
#auto lo
#iface to inet loop back
當(dāng)然也可以安裝wicd,它可是比系統(tǒng)自帶的network-manager好用多了:
$ apt-get install wicd
$ /etc/init.d/network-manager stop //停用network-manager
$ update-rc.d network-manager disable //禁止network-manager開機(jī)啟動(dòng)
$ wicd-client //啟動(dòng)wicd