Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Feature] Country (GeoIP) based rules in firewall for TCP/UDP ports

Abierto
#14,087 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@wanghe-fit2cloud ya está trabajando en esto.

Desde el 14/10/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

1Panel Version

v2.3.2

Please describe your needs or suggestions for improvements

I would like to be able to block or allow traffic by country (GeoIP) directly in
Host → Firewall, for specific ports (e.g. TCP 853 for DNS-over-TLS, SSH, custom
services).

Currently the firewall page only supports port rules and individual IP/CIDR rules.
Country-based filtering exists only in the Website WAF, which covers HTTP(S) via
OpenResty and not raw TCP/UDP ports. Users running non-HTTP services therefore
have to maintain nftables/ipset scripts by hand, and those rules are not visible
in the 1Panel UI.

Please describe the solution you suggest

Add a "Country" rule type to the firewall page (works with both iptables and
nftables backends):

  • Allow or deny by country code (ISO 3166-1), per port/protocol
  • Allowlist mode (allow DK, drop everything else) and denylist mode
  • Automatic GeoIP list updates (e.g. daily) using ipset/nft sets, with a failure
    fallback so an empty list never locks the user out
  • Optional ASN-based blocking (e.g. hosting providers)
  • Rules visible and editable in the firewall UI
  • Safety check that warns before blocking the country/IP the user is
    currently connected from
Additional Information

No response

Lenguaje dominante
Go
Estrellas
37.1k
Forks
3.4k
Merge medio
11 h 49 min
PR fusionados (30 d)
94

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de 1Panel-dev/1Panel

Todos los issues de 1Panel-dev/1Panel

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.