kali linux下的網路設定

來源:互聯網
上載者:User

標籤:networkmanager 固定ip kali

最近拿著kali在虛擬機器上玩一下,需要對網卡配置靜態IP地址;通過圖形化介面配置以後,發現/etc/network/interfaces裡面並沒有顯示IP地址,也找不到在哪裡,經過查閱資料確定了位置;

  1. 系統版本

[email protected]:~# cat /etc/network/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 interfaceauto loiface lo inet loopback[email protected]:~# uname -aLinux kali 4.9.0-kali4-amd64 #1 SMP Debian 4.9.25-1kali1 (2017-05-04) x86_64 GNU/Linux[email protected]:~# more /etc/os-release PRETTY_NAME="Kali GNU/Linux Rolling"NAME="Kali GNU/Linux"ID=kaliVERSION="2017.1"VERSION_ID="2017.1"ID_LIKE=debianANSI_COLOR="1;31"HOME_URL="http://www.kali.org/"SUPPORT_URL="http://forums.kali.org/"BUG_REPORT_URL="http://bugs.kali.org/"

2.想到新版的linux中有NetworkManager工具管理網路設定資訊,所以找到/etc/NetworkManager/system-connections目錄下面,發現有一個檔案,通過查看這個檔案時發現裡面有網路地址的配置資訊,如下:

[email protected]:/etc/NetworkManager/system-connections# pwd/etc/NetworkManager/system-connections[email protected]:/etc/NetworkManager/system-connections# ll總用量 4.0K-rw------- 1 root root 315 5月   9 12:45 Wired connection 1[email protected]:/etc/NetworkManager/system-connections# cat Wired\ connection\ 1 [connection]id=Wired connection 1uuid=f33717da-334a-4c31-b0be-bbba3a9606c7type=ethernetpermissions=timestamp=1494305073[ethernet]mac-address-blacklist=[ipv4]address1=192.168.20.222/24,192.168.20.254dns=8.8.8.8;dns-search=method=manual[ipv6]addr-gen-mode=eui64dns-search=ip6-privacy=2method=auto[email protected]:/etc/NetworkManager/system-connections# ll總用量 4.0K-rw------- 1 root root 315 5月   9 12:45 Wired connection 1[email protected]:/etc/NetworkManager/system-connections#

3.通過systemctl disable NetworkManager.service服務後進行重啟,發現IP地址沒有載入,網路沒有生效,說明網路的IP目前由NetworkManager來進行控制的

[email protected]:/etc/NetworkManager/system-connections# systemctl disable NetworkManager.serviceRemoved /etc/systemd/system/multi-user.target.wants/NetworkManager.service.Removed /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.[email protected]:/etc/NetworkManager/system-connections#

4.目前NetworkManager與/etc/network/networking的作用我還沒有進行比較。


kali linux下的網路設定

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.