Network configuration in bridge mode in kali-VM
Preface
After installing kali, I couldn’t ping Baidu. After going through many pitfalls, I finally configured KALI in bridge mode. Let’s take a look at how to configure it.
1. Basic settings of VM.
1. View and click on the virtual machine software, then find [Edit] and click on [Virtual Network Editor]
2. Click [Change settings]
3. Check the WLAN network card type in the network link
4. Configure bridged network
Check to see if there is a VMnet0 network card (if you did not click Restore default settings in the lower left corner first, just uninstall the component and install it again) and then check the bridge mode. Bridged to this column, you need to select your WLAN network card (you can use the network adapter View), after making your selection, click Apply and then OK.
2. Open KALI and enter the command line to set up:
1. Open the network card configuration file (note this, it is different from the centos configuration IP file)
vim /etc/network/interfaces
2. Edit the network card content (here we change it to static ip)
#静态
auto eth0
iface eth0 inet static
address xxxx.xxxx.xxxx.xxxx(这里是你要预设的ip地址)
netmask xxxx.xxxx.xxxx.xxxx(这里是子网掩码)
gateway xxxx.xxxx.xxxx.xxxx(这里是网关)
Enter ipconfig on the cmd command line and you can see all the information:
In vim mode, press I in input mode, press ESC to exit input mode, and enter: wq to exit and save. (For details, you can check online for more usage methods)
###3. Type the command to configure DNS
vim /etc/resolv.conf
You can view it in the physical machine network configuration.
nameserver 192.168.31.1
4. Save and exit, refresh the network:
Both of the following methods are available
/etc/init.d/networking start
service networking restart
To view network information, enter ifconfig
Try pinging Baidu
Introduction to kali
kali is a linux distribution based on Debian
Kali is a Linux distribution based on Debian. Kali Linux contains hundreds of security-related tools,
such as: penetration testing, security detection, password security, reverse engineering, etc.,
official website: kali.org.