【轉】kali配置--修改IP和DNS


修改IP地址

1 編輯文件
nano /etc/network/interfaces
2 在選擇靜態IP或DHCP,編輯文件內容並保存退出
(1)靜態IP:
```
#Loop回環地址
auto lo
iface lo inet loopback
#將網卡eth0設置為靜態IP
auto eth0
iface eth0 inet static    
#修改IP、子網掩碼、網關
address  XX.XX.XX.XX
netmask XX.XX.XX.XX 
gateway XX.XX.XX.XX
```
(2)DHCP自動獲取IP:
```
#Loop回環地址
auto lo
iface lo inet loopback
#將網卡eth0設置為DHCP自動獲取
auto eth0
iface eth0 inet dhcp
```
3 重啟網卡服務
```/etc/init.d/networking restart```

修改DNS

1 編輯文件
```nano /etc/resolv.conf```
2 添加DNS
```nameserver XX.XX.XX.XX```

from:http://blog.csdn.net/Stu_Li/article/details/52086851


免責聲明!

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



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