当前位置:论坛首页 > Linux面板 > 求助

【待反馈】ubuntu的系统防火墙 无法生效

发表在 Linux面板2023-8-13 23:02 [复制链接] 12 1146

本帖最后由 堡塔运维小林 于 2023-8-14 09:25 编辑

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:
免费版 [url=]8.0.1[/url]
系统版本:

Ubuntu 22.04.3 LTS
问题描述:

telnet 端口 80能通85能通防火墙状态开启
ufw status
Status: active
面板防火墙也开启

相关截图(日志、错误):



使用道具 举报 只看该作者 回复
发表于 2023-8-14 09:24:56 | 显示全部楼层
您好,请问一下您说的这个系统防火墙无法生效是怎么回事呢?能否具体的说说呢
使用道具 举报 回复 支持 反对
发表于 2023-8-14 20:07:30 | 显示全部楼层
比如说我docker 使用了85端口 ,我防火墙禁用了,不过85页面我依然能访问 telnet 也能通85端口, (这个系统用的是最新的ubuntu)装系统之后 第一个装了bt
使用道具 举报 回复 支持 反对
发表于 2023-8-14 20:09:10 | 显示全部楼层
堡塔运维小林 发表于 2023-8-14 09:24
您好,请问一下您说的这个系统防火墙无法生效是怎么回事呢?能否具体的说说呢 ...

然后 端口防火墙也很诡异,我通过禁用一些端口来测试 ,发现部分telnet 能通,但是过一会儿就回掉了 ,
使用道具 举报 回复 支持 反对
发表于 2023-8-15 10:26:30 | 显示全部楼层
森林雪人 发表于 2023-8-14 20:07
比如说我docker 使用了85端口 ,我防火墙禁用了,不过85页面我依然能访问 telnet 也能通85端口, (这个系 ...

您好,docker使用的是底层的iptables防火墙规则,是不受限于上层的ufw防火墙,您可以执行下面的命令看一下iptables规则是否有docker的这个端口规则
  1. iptables -L -n
复制代码
使用道具 举报 回复 支持 反对
发表于 2023-8-16 09:54:48 | 显示全部楼层
堡塔运维小林 发表于 2023-8-15 10:26
您好,docker使用的是底层的iptables防火墙规则,是不受限于上层的ufw防火墙,您可以执行下面的命令看一下 ...
  1. Chain INPUT (policy DROP)
  2. target     prot opt source               destination         
  3. ufw-before-logging-input  all  --  0.0.0.0/0            0.0.0.0/0           
  4. ufw-before-input  all  --  0.0.0.0/0            0.0.0.0/0           
  5. ufw-after-input  all  --  0.0.0.0/0            0.0.0.0/0           
  6. ufw-after-logging-input  all  --  0.0.0.0/0            0.0.0.0/0           
  7. ufw-reject-input  all  --  0.0.0.0/0            0.0.0.0/0           
  8. ufw-track-input  all  --  0.0.0.0/0            0.0.0.0/0           

  9. Chain FORWARD (policy ACCEPT)
  10. target     prot opt source               destination         
  11. DOCKER-USER  all  --  0.0.0.0/0            0.0.0.0/0           
  12. DOCKER-ISOLATION-STAGE-1  all  --  0.0.0.0/0            0.0.0.0/0           
  13. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
  14. DOCKER     all  --  0.0.0.0/0            0.0.0.0/0           
  15. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
  16. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
  17. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
  18. DOCKER     all  --  0.0.0.0/0            0.0.0.0/0           
  19. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
  20. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
  21. ufw-before-logging-forward  all  --  0.0.0.0/0            0.0.0.0/0           
  22. ufw-before-forward  all  --  0.0.0.0/0            0.0.0.0/0           
  23. ufw-after-forward  all  --  0.0.0.0/0            0.0.0.0/0           
  24. ufw-after-logging-forward  all  --  0.0.0.0/0            0.0.0.0/0           
  25. ufw-reject-forward  all  --  0.0.0.0/0            0.0.0.0/0           
  26. ufw-track-forward  all  --  0.0.0.0/0            0.0.0.0/0           

  27. Chain OUTPUT (policy ACCEPT)
  28. target     prot opt source               destination         
  29. ufw-before-logging-output  all  --  0.0.0.0/0            0.0.0.0/0           
  30. ufw-before-output  all  --  0.0.0.0/0            0.0.0.0/0           
  31. ufw-after-output  all  --  0.0.0.0/0            0.0.0.0/0           
  32. ufw-after-logging-output  all  --  0.0.0.0/0            0.0.0.0/0           
  33. ufw-reject-output  all  --  0.0.0.0/0            0.0.0.0/0           
  34. ufw-track-output  all  --  0.0.0.0/0            0.0.0.0/0           

  35. Chain DOCKER (2 references)
  36. target     prot opt source               destination         
  37. ACCEPT     tcp  --  0.0.0.0/0            172.17.0.2           tcp dpt:9000
  38. ACCEPT     tcp  --  0.0.0.0/0            172.17.0.3           tcp dpt:5244
  39. ACCEPT     tcp  --  0.0.0.0/0            172.19.0.2           tcp dpt:443
  40. ACCEPT     tcp  --  0.0.0.0/0            172.19.0.2           tcp dpt:81
  41. ACCEPT     tcp  --  0.0.0.0/0            172.19.0.2           tcp dpt:80
  42. ACCEPT     tcp  --  0.0.0.0/0            172.17.0.4           tcp dpt:80
  43. ACCEPT     tcp  --  0.0.0.0/0            172.17.0.4           tcp dpt:4567

  44. Chain DOCKER-ISOLATION-STAGE-1 (1 references)
  45. target     prot opt source               destination         
  46. DOCKER-ISOLATION-STAGE-2  all  --  0.0.0.0/0            0.0.0.0/0           
  47. DOCKER-ISOLATION-STAGE-2  all  --  0.0.0.0/0            0.0.0.0/0           
  48. RETURN     all  --  0.0.0.0/0            0.0.0.0/0           

  49. Chain DOCKER-ISOLATION-STAGE-2 (2 references)
  50. target     prot opt source               destination         
  51. DROP       all  --  0.0.0.0/0            0.0.0.0/0           
  52. DROP       all  --  0.0.0.0/0            0.0.0.0/0           
  53. RETURN     all  --  0.0.0.0/0            0.0.0.0/0           

  54. Chain DOCKER-USER (1 references)
  55. target     prot opt source               destination         
  56. RETURN     all  --  0.0.0.0/0            0.0.0.0/0           

  57. Chain ufw-after-forward (1 references)
  58. target     prot opt source               destination         

  59. Chain ufw-after-input (1 references)
  60. target     prot opt source               destination         
  61. ufw-skip-to-policy-input  udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:137
  62. ufw-skip-to-policy-input  udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:138
  63. ufw-skip-to-policy-input  tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:139
  64. ufw-skip-to-policy-input  tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:445
  65. ufw-skip-to-policy-input  udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:67
  66. ufw-skip-to-policy-input  udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:68
  67. ufw-skip-to-policy-input  all  --  0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type BROADCAST

  68. Chain ufw-after-logging-forward (1 references)
  69. target     prot opt source               destination         

  70. Chain ufw-after-logging-input (1 references)
  71. target     prot opt source               destination         
  72. LOG        all  --  0.0.0.0/0            0.0.0.0/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "

  73. Chain ufw-after-logging-output (1 references)
  74. target     prot opt source               destination         

  75. Chain ufw-after-output (1 references)
  76. target     prot opt source               destination         

  77. Chain ufw-before-forward (1 references)
  78. target     prot opt source               destination         
  79. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
  80. ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0            icmptype 3
  81. ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0            icmptype 11
  82. ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0            icmptype 12
  83. ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0            icmptype 8
  84. ufw-user-forward  all  --  0.0.0.0/0            0.0.0.0/0           

  85. Chain ufw-before-input (1 references)
  86. target     prot opt source               destination         
  87. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
  88. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
  89. ufw-logging-deny  all  --  0.0.0.0/0            0.0.0.0/0            ctstate INVALID
  90. DROP       all  --  0.0.0.0/0            0.0.0.0/0            ctstate INVALID
  91. ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0            icmptype 3
  92. ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0            icmptype 11
  93. ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0            icmptype 12
  94. ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0            icmptype 8
  95. ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp spt:67 dpt:68
  96. ufw-not-local  all  --  0.0.0.0/0            0.0.0.0/0           
  97. ACCEPT     udp  --  0.0.0.0/0            224.0.0.251          udp dpt:5353
  98. ACCEPT     udp  --  0.0.0.0/0            239.255.255.250      udp dpt:1900
  99. ufw-user-input  all  --  0.0.0.0/0            0.0.0.0/0           

  100. Chain ufw-before-logging-forward (1 references)
  101. target     prot opt source               destination         

  102. Chain ufw-before-logging-input (1 references)
  103. target     prot opt source               destination         

  104. Chain ufw-before-logging-output (1 references)
  105. target     prot opt source               destination         

  106. Chain ufw-before-output (1 references)
  107. target     prot opt source               destination         
  108. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
  109. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
  110. ufw-user-output  all  --  0.0.0.0/0            0.0.0.0/0           

  111. Chain ufw-logging-allow (0 references)
  112. target     prot opt source               destination         
  113. LOG        all  --  0.0.0.0/0            0.0.0.0/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW ALLOW] "

  114. Chain ufw-logging-deny (2 references)
  115. target     prot opt source               destination         
  116. RETURN     all  --  0.0.0.0/0            0.0.0.0/0            ctstate INVALID limit: avg 3/min burst 10
  117. LOG        all  --  0.0.0.0/0            0.0.0.0/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "

  118. Chain ufw-not-local (1 references)
  119. target     prot opt source               destination         
  120. RETURN     all  --  0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL
  121. RETURN     all  --  0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type MULTICAST
  122. RETURN     all  --  0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type BROADCAST
  123. ufw-logging-deny  all  --  0.0.0.0/0            0.0.0.0/0            limit: avg 3/min burst 10
  124. DROP       all  --  0.0.0.0/0            0.0.0.0/0           

  125. Chain ufw-reject-forward (1 references)
  126. target     prot opt source               destination         

  127. Chain ufw-reject-input (1 references)
  128. target     prot opt source               destination         

  129. Chain ufw-reject-output (1 references)
  130. target     prot opt source               destination         

  131. Chain ufw-skip-to-policy-forward (0 references)
  132. target     prot opt source               destination         
  133. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           

  134. Chain ufw-skip-to-policy-input (7 references)
  135. target     prot opt source               destination         
  136. DROP       all  --  0.0.0.0/0            0.0.0.0/0           

  137. Chain ufw-skip-to-policy-output (0 references)
  138. target     prot opt source               destination         
  139. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           

  140. Chain ufw-track-forward (1 references)
  141. target     prot opt source               destination         
  142. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            ctstate NEW
  143. ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            ctstate NEW

  144. Chain ufw-track-input (1 references)
  145. target     prot opt source               destination         

  146. Chain ufw-track-output (1 references)
  147. target     prot opt source               destination         
  148. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            ctstate NEW
  149. ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            ctstate NEW

  150. Chain ufw-user-forward (1 references)
  151. target     prot opt source               destination         

  152. Chain ufw-user-input (1 references)
  153. target     prot opt source               destination         
  154. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:20
  155. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80
  156. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:443
  157. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:888
  158. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:24815
  159. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 39000:40000
  160. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:7777
  161. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 9090:9099
  162. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 10000:10010
  163. ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 10000:10010
  164. ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:80
  165. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:83
  166. ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:83
  167. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22
  168. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:81
  169. DROP       tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:85
  170. ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:86
  171. ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:86

  172. Chain ufw-user-limit (0 references)
  173. target     prot opt source               destination         
  174. LOG        all  --  0.0.0.0/0            0.0.0.0/0            limit: avg 3/min burst 5 LOG flags 0 level 4 prefix "[UFW LIMIT BLOCK] "
  175. REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-port-unreachable

  176. Chain ufw-user-limit-accept (0 references)
  177. target     prot opt source               destination         
  178. ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           

  179. Chain ufw-user-logging-forward (0 references)
  180. target     prot opt source               destination         

  181. Chain ufw-user-logging-input (0 references)
  182. target     prot opt source               destination         

  183. Chain ufw-user-logging-output (0 references)
  184. target     prot opt source               destination         

  185. Chain ufw-user-output (1 references)
  186. target     prot opt source               destination      
复制代码
使用道具 举报 回复 支持 反对
发表于 2023-8-16 09:59:37 | 显示全部楼层
堡塔运维小林 发表于 2023-8-15 10:26
您好,docker使用的是底层的iptables防火墙规则,是不受限于上层的ufw防火墙,您可以执行下面的命令看一下 ...

这个你看下 是不是这个没设置啥 ,系统我用的ubunt service 装在pve中的
,然后还有一个问题 那个面板防火墙方便还有一个防ping 的确有效果,不过我关闭了,后还是不能ping
  1. C:\Users\100667>ping xy.***.xyz

  2. 正在 Ping xy.***.xyz [49.70.*.35] 具有 32 字节的数据:
  3. 来自 49.70.*.35 的回复: 无法连到端口。
  4. 来自 49.70.*.35 的回复: 无法连到端口。
  5. 来自 49.70.*.35 的回复: 无法连到端口。
  6. 来自 49.70.*.35 的回复: 无法连到端口。
复制代码
使用道具 举报 回复 支持 反对
发表于 2023-8-16 10:00:54 | 显示全部楼层

另外不充一个问题 你们这个论坛 我chrom登陆不上来,需要登陆后我手动F5
,消息回复也chrom也回复不了 ,我目前用的是safari浏览器回复的
使用道具 举报 回复 支持 反对
发表于 2023-8-16 10:14:51 | 显示全部楼层
堡塔运维小林 发表于 2023-8-15 10:26
您好,docker使用的是底层的iptables防火墙规则,是不受限于上层的ufw防火墙,您可以执行下面的命令看一下 ...
  1. DROP       tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:85
复制代码


端口这块我85的确静止了

我说下我的访问路径 和85端口是干嘛的吧
外网-域名-dns服务器-我的服务器:85
85端口是bt内部 设置的代理的一个内网nas服务器
目前防火墙禁用这个端口,不过我浏览器访问当前网络的85端口,还是能访问我的nas服务网站
使用道具 举报 回复 支持 反对
发表于 2023-8-17 00:04:52 | 显示全部楼层
森林雪人 发表于 2023-8-16 10:14
端口这块我85的确静止了

我说下我的访问路径 和85端口是干嘛的吧

您好,私信我您的todes或者向日葵,我远程看看,私信后这里回复
使用道具 举报 回复 支持 反对
发表于 2023-8-17 14:46:57 | 显示全部楼层
堡塔运维小林 发表于 2023-8-17 00:04
您好,私信我您的todes或者向日葵,我远程看看,私信后这里回复

看下 收到了没
使用道具 举报 回复 支持 反对
发表于 2023-8-17 18:15:30 | 显示全部楼层

您好,私信回复您了,您看一下
使用道具 举报 回复 支持 反对
发表于 2024-3-15 21:44:19 | 显示全部楼层
您好,这个问题解决了吗
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理
快速回复 返回顶部 返回列表