安装kali后,使用独立ip上网,但是设置bridge模式后依然上不了网,后来查了好多资料才解决。

能ping通网页,能ping通DNS,就是不能打开网页。

最后的原因是主机的防火墙拦截,把防火墙关了就好了。

很崩溃。。。

如果你使用的是比较变态的avast,防火墙可以这样设置:

Tools-FireWall-Settings-Preferences-Enable "Internet Connection Sharing Mode"

下面附上kali linux的ip设置方法:

vim /etc/network/interfaces

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
将其中的eth0网卡设置为static模式
修改为
allow-hotplug eth0  #修改前
auto eth0  #修改后
 
将:
iface eth0 inet dhcp  #修改前
修改为:
iface eth0 inet static  #修改后
 
面是写上自定义的IP地址及网关,子网掩码。
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1
 
其中iface eth0 inet dhcp的意思是动态获取IP。
iface eth0 inet static的意思是静态获取IP。
 
接下来修改DNS。
vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
 
重启网卡或者重启计算机。
/etc/init.d/networking restart
 
完成修改。


相关文章:

  • 2021-12-31
  • 2021-12-03
  • 2022-01-18
  • 2021-12-25
  • 2022-01-24
  • 2022-12-23
  • 2021-07-14
猜你喜欢
  • 2021-10-22
  • 2021-12-16
  • 2021-04-06
  • 2021-12-10
  • 2021-06-12
  • 2021-10-26
  • 2022-01-02
相关资源
相似解决方案