root@DESKTOP-GKH1O80:/home/youyou# sudo ufw status
ERROR: problem running iptables: iptables v1.6.1: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
1、解决过程:
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.
root@DESKTOP-GKH1O80:/home/youyou# sudo apt-get install ufw
Reading package lists... Done
Building dependency tree
Reading state information... Done
ufw is already the newest version (0.36-0ubuntu0.18.04.1).
0 upgraded, 0 newly installed, 0 to remove and 43 not 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复杂教程,还不忘备注“以上还还没有验证”类似说明,所以为了大量操作后,升级途中再出问题卸载不了,所以暂时放弃了这种方式
2、最终解决办法:
将windows中的防火墙全部关闭,结果远程可以正常访问ubuntu中部署的服务了。
但是关闭全部防火墙肯定不是个好办法,所以正确的做法应该是将指定的端口开放给指定的机器访问,设置方法访问下面链接:
windows 10 防火墙设置规则:使特定ip通过某端口连接我的电脑