无法远程访问windows下的linux(ubuntu)子系统里服务的问题解决方案
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
·
1,问题:当我在windows下的ubuntu中启动spring boot项目后,在本地浏览器访问:
http://10.240.xxx.75:8089/health/status
是正常的,然而远程访问时,却访问不了
2,解决过程:
1)按照网上类似问题提供的解决方法:
首先查询防火墙状态:sudo ufw status,结果执行后报错:
ERROR: initcaps [Errno 2] iptables v1.6.0: can't initialize iptables table `filter':
Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.
于是安装防火墙:sudo apt-get install ufw,事实上因为ubuntu默主已安装防火墙,所以执行安装不会安装新的东西
Reading package lists... Done
Building dependency tree
Reading state information... Done
ufw is already the newest version (0.35-0ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 74 not upgraded.
2)然后看有的网友不知道从哪里来的升级kernel复杂教程,还不忘备注“以上还还没有验证”类似说明,所以为了大量操作后,升级途中再出问题卸载不了,所以暂时放弃了这种方式
3,最终解决办法:
将windows中的防火墙全部关闭,结果远程可以正常访问ubuntu中部署的服务了。
但是关闭全部防火墙肯定不是个好办法,所以正确的做法应该是将指定的端口开放给指定的机器访问,设置方法访问下面链接:
windows 10 防火墙设置规则:使特定ip通过某端口连接我的电脑
A beautiful web dashboard for Linux
最近提交(Master分支:4 个月前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)