Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1603814
  • 博文数量: 695
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 4027
  • 用 户 组: 普通用户
  • 注册时间: 2013-11-20 21:22
文章分类

全部博文(695)

文章存档

2018年(18)

2017年(74)

2016年(170)

2015年(102)

2014年(276)

2013年(55)

分类: 网络与安全

2016-03-17 14:27:57

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 
 
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 
 
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 
 
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 
 
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.

 

阅读(5579) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~