root@kali:~# service networking restart
[....] Running /etc/init.d/networking restart is deprecated because it may not r[warnble some interfaces ... (warning).
[....] Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/eth0/00:0c:29:e2:03:ff
Sending on LPF/eth0/00:0c:29:e2:03:ff
Sending on Socket/fallback
DHCPRELEASE on eth0 to 192.168.1.1 port 67
Reloading /etc/samba/smb.conf: smbd only.
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/eth0/00:0c:29:e2:03:ff
Sending on LPF/eth0/00:0c:29:e2:03:ff
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
done.

  结果如上图, 笔者用的是VMWare, 运行的是Kali Linux, 希望用桥接模式通过路由器获取动态IP, 但是无论如何也不能正确获取IP地址.

一点点排查

1. 排查DNS

root@kali:~# cat /etc/resolv.conf
nameserver 192.168.1.1
nameserver 114.114.114.114

192.168.1.1在里面, DNS设置没有问题

2. 排查网卡

root@kali:~# 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). # The loopback network interface
auto lo
iface lo inet loopback # The primary network interface
#allow-hotplug eth0
auto eth0
iface eth0 inet dhcp

  网卡自动激活, 并配置dhcp获取IP方式

3.排查VMWare 桥接设置

由于笔者装有Virual Box & VMWare Workstation, 所以有多个虚拟网卡, 桥接为自动模式, 心想是不是自动桥接到不能连外网的Virtual Box的虚拟网卡了?

果断选成实际外网网卡, 重启Kali Linux networking服务, 问题解决.

root@kali:~# service networking restart
[....] Running /etc/init.d/networking restart is deprecated because it may not r[warnble some interfaces ... (warning).
[....] Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/eth0/00:0c:29:e2:03:ff
Sending on LPF/eth0/00:0c:29:e2:03:ff
Sending on Socket/fallback
DHCPRELEASE on eth0 to 192.168.1.1 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
Reloading /etc/samba/smb.conf: smbd only.
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/eth0/00:0c:29:e2:03:ff
Sending on LPF/eth0/00:0c:29:e2:03:ff
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.1.1
DHCPACK from 192.168.1.1
Reloading /etc/samba/smb.conf: smbd only.
bound to 192.168.1.101 -- renewal in 3353 seconds.
done.

[解决]Kali Linux DHCP自动获取IP失败 坑爹的VMWare桥接的更多相关文章

  1. Kali桥接模式DHCP自动获取IP失败(VMware)

    Kali桥接模式DHCP自动获取IP失败笔者用的是VMware运行Kali Linux,突然发现桥接模式无法上网,只能使用NAT模式.身为有一点点强迫症的人来说,这就很不爽了.于是马上切换为桥接模式, ...

  2. Centos 7开启网卡打开DHCP自动获取IP

    在Windows10上安装了CentOS7的Hyper-V虚拟机. 虽然配置了可访问外网的网卡(Win8.1 Hyper-V 共享本机IP上网),但是默认安装的CentOS是没有开启配置网卡信息的,也 ...

  3. ARM-Linux配置DHCP自动获取IP地址

    备注:内核版本:2.6.30.9busybox版本:1.15.2 PC Linux和开发板Linux的工作用户:root 1. 配置内核:[*] Networking support --->N ...

  4. linux如何自动获取ip地址

    第一步:激活网卡 系统装好后默认的网卡是eth0,用下面的命令将这块网卡激活. # ifconfig eth0 up 第二步:设置网卡进入系统时启动 想要每次开机就可以自动获取IP地址上网,就要设置网 ...

  5. CentOS 7如何设置Linux开机自动获取IP地址

    centos7 minimal版默认安装好后没有获取ip地址,需要手动配置.方法如下: 1.输入“ip addr”并按回车键确定,发现无法获取IP(CentOS 7默认没有ifconfig命令),记录 ...

  6. CentOS7 DHCP自动获取IP地址

    # 设置auto自动获取IP[root@localhost ~]# nmcli c modify eth0 ipv4.method auto //etho0 网卡名称     # 重新启动网卡并重新加 ...

  7. linux设置自动获取IP地址

    右键单击,选择设置 勾选桥接模式

  8. Centos7(Linux)网络配置,自动获取ip地址

    Centos7.0 Vmware 网络桥接配置,利用DHCP自动获取ip地址 首先要将Vmware10.0.3设置为桥接模式. CentOS 7.0默认安装好之后是没有自动开启网络连接的! cd  / ...

  9. 详解如何设置CentOS 7开机自动获取IP地址

    本例中以CentOS 7举例说明如何设置Linux开机自动获取IP地址和设置固定IP地址. 自动获取动态IP地址 1.输入“ip addr”并按回车键确定,发现无法获取IP(CentOS 7默认没有i ...

随机推荐

  1. js中replace的正则替换

    temp: video":"\t<ul class=\"g-list tabview-cont on\">\t\r\n\t\t<li clas ...

  2. Spring+MyBatis实践—MyBatis数据库访问

    关于spring整合mybatis的工程配置,已经在Spring+MyBatis实践—工程配置中全部详细列出.在此,记录一下几种通过MyBatis访问数据库的方式. 通过sqlSessionTempl ...

  3. the structure of the project (MVC)

    HTML <--- JSP <---- JS <---- Java controller <---- DAO <---- Database The JSP Model 2 ...

  4. HDU 2159 FATE (DP 二维费用背包)

    题目链接 题意 : 中文题不详述. 思路 : 二维背包,dp[i][h]表示当前忍耐值为i的情况下,杀了h个怪得到的最大经验值,状态转移方程: dp[i][h] = max(dp[i][h],dp[i ...

  5. windows中断与共享的连接(samba)

    问题:window下当成功登录到samba服务器上的共享的目录的时候,若要是再系想登录此服务器上另外一个共享目录时,会弹出登录窗口. 但是不管输入的用户名和密码对错都会提示. “不允许一个用户使用一个 ...

  6. Linux下Nginx+Tomcat整合的安装与配置

    因为nginx处理静态页面的速度很快,并且是免费的,它还可以配置负载均衡的服务器集群来搭建多个tomcat,所以nginx+tomcat是企业搭 建javaee项目很好的选择.nginx主要是通过反向 ...

  7. 好用的linux命令

    sudo chown -R `whoami` /usr/local # ps aux |grep php-fpm php-frm start and stop php-fpm -D killall p ...

  8. JavaScript DOM高级程序设计 2.4-try{}catch{}--我要坚持到底!

    先看一段有异常的语句 var sound = 'Roar!'; function myOrneryBeast() { this.style.color='green';//window没有style属 ...

  9. JS计算字符串所占字节数

    最近项目有个需求要用js计算一串字符串写入到localStorage里所占的内存,众所周知的,js是使用Unicode编码的.而Unicode的实现有N种,其中用的最多的就是UTF-8和UTF-16. ...

  10. The only legal comparisons are between two numbers, two strings, or two dates.

    The only legal comparisons are between two numbers, two strings, or two dates. Left  hand operand is ...