Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug] iptables Rule Persistence and Restoration Order Issues

未关闭
#14,019 2 条评论 0 个 reaction 已指派 2 人 在 GitHub 查看

维护者通常 1 天内回复

@ssongliu 已经在做这个了。

开始于 2026年10月14日。

评估

这个 Issue 还没有评估数据。

描述

status: dev-complete status: ready-for-release type: optimization
Contact Information

当前 iptables 规则恢复只考虑了 1panel 自己,未考虑 fail2ban 规则

1Panel Version

v2.3.2

Problem Description

系统未开启ufw和firewalld,重启系统后,端口 ssh 22 等会被 1PANEL_BASIC_BEFORE 放行,重启 fail2ban 才能恢复正常拦截

Steps to Reproduce
┌💁  alice @ 💻  Alice in 📁  ~
└❯ sudo iptables -nvL INPUT --line-numbers
Chain INPUT (policy ACCEPT 352 packets, 25932 bytes)
num   pkts bytes target     prot opt in     out     source               destination         
1    11991 5846K 1PANEL_BASIC_BEFORE  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
2      824 41910 1PANEL_BASIC  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
3      324 13482 1PANEL_BASIC_AFTER  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
4       38 11326 f2b-sshd   tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           

┌💁  alice @ 💻  Alice in 📁  ~
└❯ sudo systemctl restart fail2ban

┌💁  alice @ 💻  Alice in 📁  ~
└❯ sudo iptables -nvL INPUT --line-numbers
Chain INPUT (policy ACCEPT 389 packets, 27168 bytes)
num   pkts bytes target     prot opt in     out     source               destination         
1       79 19620 f2b-sshd   tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           
2    12585 5978K 1PANEL_BASIC_BEFORE  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
3      928 47498 1PANEL_BASIC  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
4      363 15306 1PANEL_BASIC_AFTER  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
The expected correct result

No response

Related log output

Additional Information

No response

主要语言
Go
星标
37.1k
派生
3.4k
平均合并
11 小时 49 分钟
30 天内合并 PR
94

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

1Panel-dev/1Panel 的其他 Issue

查看 1Panel-dev/1Panel 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。