{"id":14632680,"url":"https://github.com/moreKing/web-firewall","last_synced_at":"2025-09-06T22:31:03.087Z","repository":{"id":255950118,"uuid":"852120991","full_name":"moreKing/web-firewall","owner":"moreKing","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-27T15:20:02.000Z","size":2692,"stargazers_count":182,"open_issues_count":1,"forks_count":33,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-28T00:33:24.377Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moreKing.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-04T09:04:06.000Z","updated_at":"2025-08-27T15:20:06.000Z","dependencies_parsed_at":"2024-10-23T09:56:40.569Z","dependency_job_id":"b610f2b8-1c34-4321-9acf-827404935e17","html_url":"https://github.com/moreKing/web-firewall","commit_stats":null,"previous_names":["moreking/web-firewall"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moreKing/web-firewall","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moreKing%2Fweb-firewall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moreKing%2Fweb-firewall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moreKing%2Fweb-firewall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moreKing%2Fweb-firewall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moreKing","download_url":"https://codeload.github.com/moreKing/web-firewall/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moreKing%2Fweb-firewall/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273973379,"owners_count":25200575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-09T17:00:32.446Z","updated_at":"2025-09-06T22:31:03.066Z","avatar_url":"https://github.com/moreKing.png","language":"Vue","funding_links":[],"categories":["Vue","防火墙"],"sub_categories":[],"readme":"\r\n# 简介\r\n\r\n`web-firewall`基于golang+vue3 开发的Web Linux防火墙，前端使用`SoybeanAdmin`框架，后端使用`goframe2`，数据库支持 `sqlite3(默认)`/`postgresql` ，它可以在Linux系统中基于`nfatables`用于替代`firewalld`工具。\r\n\r\nGitee Star：[![gitee star](https://gitee.com/moujun/web-firewall/badge/star.svg)](https://gitee.com/moujun/web-firewall)\r\n\r\nGithub Star：[![github star](https://img.shields.io/github/stars/moreKing/web-firewall)](https://github.com/moreKing/web-firewall)\r\n\r\nGithub Forks：[![github forks](https://img.shields.io/github/forks/moreKing/web-firewall)](https://github.com/moreKing/web-firewall)\r\n\r\n该防火墙可以提供以下功能\r\n\r\n\r\n\r\n### 功能设计\r\n\r\n   - [x] 本地策略\r\n     - [x] 出站策略 output链\r\n     - [x] 出站流控 output链\r\n     - [x] 入站策略 input链\r\n     - [x] 入站流控 input链\r\n   - [x] 路由策略\r\n     - [x] DNAT prerouting链\r\n     - [x] SNAT postrouting\r\n     - [x] 转发策略forward 链\r\n     - [x]  流量控制 forward 链\r\n   - [x] 审计\r\n     - [x] 登录日志\r\n     - [x] 配置日志\r\n     - [x] webSSH日志\r\n   - [x] WebShell\r\n     - [x] webshell 支持rzsz\r\n     - [ ] 文件上传下载\r\n     - [ ] 文本在线编辑\r\n   - [ ] 首页\r\n   - [x] 系统设置\r\n     - [ ] ip黑名单 prerouting链\r\n     - [x] 本地密码\r\n     - [x] 会话配置\r\n     - [x] 邮件配置\r\n     - [x] 短信配置\r\n     - [x] 登录设置\r\n\r\n### 安装\r\n\r\n本项目提供一个已经打包编译好的项目，用户仅需自己[下载](https://moujun.top/web-firewall/version.html)本项目解压后，执行 里面的`install.sh`文件即可，如果自己编译项目请根据前后端代码自行进行打包即可\r\n\r\n```shell\r\nunzip v1.1.0.zip\r\ncd v1.1.0\r\nbash install.sh\r\n\r\n# 查看服务是否正常运行\r\nsystemctl status web-firewalld\r\n\r\n# 建议停用firewalld服务\r\nsystemctl disable  firewalld\r\nsystemctl stop  firewalld\r\n```\r\n\r\n访问地址：http://ip:8000\r\n\r\n默认账号密码：admin/admin\r\n\r\n### docker部署\r\n\r\n构建项目镜像\r\n```bash\r\n# 拉取源代码\r\ngit clone https://github.com/moreKing/web-firewall.git\r\ncd web-firewall\r\n# 构建镜像\r\ndocker build -f ./server/manifest/docker/Dockerfile  -t web-firewall:latest .\r\n```\r\n\r\ndocker使用必须以特权和host模式运行才能操作主机的网络配置\r\n```bash\r\ndocker run -itd --network host --privileged \\\r\n-v /etc/sysctl.conf:/etc/sysctl.conf \\\r\n-v  /proc:/host_proc \\\r\nweb-firewall\r\n```\r\n\r\n数据持久化需要映射以下几个目录\r\n\r\n```bash\r\n-v /path/config:/web-firewall/manifest/config  # 配置文件 docker模式下 默认数据库文件也在此目录\r\n-v /path/log:/web-firewall/log  # 日志文件目录 所有日志文件均会在此目录下\r\n-v /path/resources/template:/web-firewall/resources/template  # 模板文件，用户可以自定义邮件样式\r\n```\r\n\r\n`/path/config`目录内需要提供config.yaml配置文件和db.sqlite3初始化数据库文件，可先运行一个镜像从里面对应位置拷贝出里面的默认文件，然后修改配置文件即可\r\n\r\n### 项目截图\r\n\r\n![登录](./img/login.png)\r\n\r\n![主题](./img/theme.png)\r\n\r\n![国际化](./img/i18.png)\r\n\r\n![添加策略](./img/add_policy.png)\r\n\r\n![添加流控](./img/add_limit.png)\r\n\r\n![暗模式](./img/dark.png)\r\n\r\n![自适应](./img/mobile.png)\r\n\r\n\r\n\r\n## 捐赠支持\r\n\r\n为了开源项目更好的发展，现在接受捐赠。如果您觉得本项目对您有所帮助，请通过下列方式进行捐赠。您的帮助将给我们动力持续更新，谢谢！\r\n\r\n![收款码](./img/pay.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FmoreKing%2Fweb-firewall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FmoreKing%2Fweb-firewall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FmoreKing%2Fweb-firewall/lists"}