00-04.kaliLinux-手動配置IP地址


在KaliLinux中手動配置網卡

用vim打開網卡的配置文件,配置各個網卡信息

root@kali:~# cd /etc/network
root@kali:/etc/network# 
--------------------------------------------------------------------
root@kali:/etc/network# ls if-down.d  if-post-down.d  if-pre-up.d  if-up.d  interfaces  interfaces.d
root@kali:/etc/network# 
--------------------------------------------------------------------
root@kali:/etc/network# vim 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 address 192.168.4.36 netmask 255.255.255.0 gateway 192.168.4.1

auto eth1 iface eth1 inet static address 192.168.23.200 netmask 255.255.255.0
~
----------------------------------------------------------------------- :wq

 

配置DNS相關信息

root@kali:/etc/network# vim /etc/resolv.conf -------------------------------------------------------------------
~
nameserver 114.114.114.114 
nameserver 192.168.4.1 
~
-------------------------------------------------------------------
:wq

 

最后一定要重啟網卡服務

root@kali:/etc/network# service networking restart
root@kali:/etc/network#

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM