项目场景:
最近做项目的时候,需要通过本地django项目连接虚拟机环境中的redis
问题描述:
本地搭的虚拟机环境(桥接模式)和window主机的网络连接表现如下:
本地ping虚拟机:(不能ping通)

虚拟机ping本地:(可ping通)

检查本地防火墙:(已全部关闭)

检查虚拟机防火墙:(已关闭)

原因分析:
网上说的大部分是防火墙没关闭导致的,但是这个问题检查两边都是防火墙已关闭。经分析,本地ping虚拟机这条路没通,猜测是本地这边什么配置拦截了,朝着这个思路去找本地网络连接。
解决方案:
经过多次尝试,发现一个配置:(window10)设置--网络和Internet--WLAN--更改适配器选项--无线网WLAN那个右键--属性--共享页面:

 
发现有个选项:允许其他网络用户通过此计算机的Internet连接来连接,打钩,下面选以太网,确定保存,再试下ping,

完美! |