Sign inSign up

liberatti/nxguard

By liberatti

โ€ขUpdated 8 days ago

NXGuard is a high-performance, secure API Gateway and Reverse Proxy powered by OpenResty

Image
Networking
Security
Web servers
0

3.9K

liberatti/nxguard repository overview

โ NXGuard

License Platform Sponsor

NXGuard is a high-performance, secure API Gateway and Reverse Proxy powered by OpenResty and ModSecurity. It provides a robust layer of protection for your API ecosystem, ensuring scalability, security, and operational simplicity.


โ ๐Ÿš€ Key Features

  • ๐Ÿ›ก๏ธ Advanced Security: Native integration with ModSecurity v3 for real-time threat detection (SQLi, XSS, etc.).
  • โšก High Performance: Leverages the power of OpenResty (Nginx + LuaJIT) for sub-millisecond request processing.
  • ๐Ÿ“Š Real-time Monitoring: Detailed transaction logging and telemetry for proactive threat identification.
  • โš–๏ธ Smart Load Balancing: Sophisticated traffic distribution across backend services.
  • ๐Ÿ› ๏ธ Operational Simplicity: Lightweight architecture with a modern management interface.
  • ๐ŸŒ Scalability: Modular design built for horizontal scaling in containerized environments.

โ ๐Ÿ“ธ Dashboard Preview

NXGuard Dashboard Preview Modern, intuitive management interface for full control over your API security.


โ ๐Ÿ—๏ธ Architecture

NXGuard Architecture Diagram High-performance architecture integrating OpenResty, ModSecurity, and Redis.


โ ๐Ÿšฆ Getting Started

โ Quick Start with Docker Compose

Deploy a full NXGuard stack including the Management UI and ipxa in seconds:

services:
  redis:
    image: redis:7.2
    command: ["redis-server", "--save", "", "--appendonly", "no"]

  nxguard:
    image: liberatti/nxguard:latest
    environment:
      NXGUARD_ROLE: "main"
      SERVERID: "nxguard-admin"
    ports:
      - 5000:5000
      - 80:80
      - 443:443
    deploy:
      resources:
        limits:
          memory: 256M

  ipxa:
    image: liberatti/ipxa:latest
    volumes:
      - ipxa_data:/opt/ipxa/data
    deploy:
      resources:
        limits:
          memory: 64M
      replicas: 2

volumes:
  ipxa_data:

โ ๐Ÿงช Security Validation

Validate your WAF rules using GoTestWAF:

docker run --rm \
  --shm-size=2g \
  --add-host nxguard.local:host-gateway \
  -v ${PWD}/.docs/reports:/app/reports \
  wallarm/gotestwaf --url=http://nxguard.local:8080/nxg/ --blockStatusCodes=403,404,400 --reportFormat=html --noEmailReport

Waf Evaluation Report

Generated by GoTestWAF showing blocking and alerting.

inspection:
    score:
        inbound: 5
        outbound: 10
    level: 3

โ ๐Ÿ”ข WAF Rule ID Reservations

RangeDescription
1 - 99,999Local/Internal Use
9001 - 9010NXGuard Exclusion Lists (up to 10 items)
100,000 - 199,999Oracle Published Rules
200,000 - 299,999Comodo Published Rules
300,000 - 399,999GotRoot.com Rules
900,000 - 999,999OWASP Core Rule Set (CRS)
2,000,000 - 2,999,999Trustwave SpiderLabs Rules

โ ๐Ÿ“ก Telemetry Notice

To improve our security engine, NXGuard collects anonymous traffic statistics over 24-hour cycles. No sensitive, personal, or request-specific data is ever collected. This information is used solely to enhance threat detection accuracy.


โ ๐Ÿ“„ License

This project is licensed under the Apache License 2.0. See the LICENSEโ  file for the full text.


Developed with โค๏ธ by Gustavo Liberatti

Tag summary

Content type

Image

Digest

sha256:945f25e37โ€ฆ

Size

168 MB

Last updated

8 days ago

docker pull liberatti/nxguard