kali linux下的网络配置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了kali linux下的网络配置相关的知识,希望对你有一定的参考价值。
最近拿着kali在虚拟机上玩一下,需要对网卡配置静态IP地址;通过图形化界面配置以后,发现/etc/network/interfaces里面并没有显示IP地址,也找不到在哪里,经过查阅资料确定了位置;
系统版本
[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 interface auto lo iface lo inet loopback [email protected]:~# uname -a Linux 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=kali VERSION="2017.1" VERSION_ID="2017.1" ID_LIKE=debian ANSI_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 1 uuid=f33717da-334a-4c31-b0be-bbba3a9606c7 type=ethernet permissions= timestamp=1494305073 [ethernet] mac-address-blacklist= [ipv4] address1=192.168.20.222/24,192.168.20.254 dns=8.8.8.8; dns-search= method=manual [ipv6] addr-gen-mode=eui64 dns-search= ip6-privacy=2 method=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.service Removed /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下的网络配置的主要内容,如果未能解决你的问题,请参考以下文章