OSI-licensed open source

Open-Source Web Security Gateway Software (2026)

A web security gateway sits between users and the internet, or between the internet and your applications, to filter traffic, enforce policy and block threats. There are two directions: secure web gateways filter outbound browsing with proxy, content filtering and malware checks, while reverse-proxy gateways and web application firewalls protect inbound traffic to your sites.

This page covers both directions with eight open-source options verified on their repositories on 2026-11-07: forward proxy and filtering (Squid, E2Guardian, OPNsense, pfSense CE) and inbound web application firewalls (Coraza, ModSecurity, BunkerWeb, SafeLine). Open source rarely matches a commercial cloud SWG feature for feature, so expect to assemble components.

Tools, licences and pricing checked against vendor and repository pages on November 7, 2026.

What to look for

  • •Direction: outbound web filtering versus inbound application protection
  • •TLS inspection support and certificate management
  • •Content categories, blocklists and rule sets such as OWASP CRS
  • •Deployment: standalone proxy, firewall distribution or plugin
  • •Performance and caching
  • •Management UI, logging and licence terms

At a glance

ToolBest forPricingLicence
SquidForward proxy and caching with access controlFree, open sourceGPL-2.0
E2GuardianContent filtering for schools and small networksFree, open sourceGPL-2.0
OPNsenseFirewall distribution with proxy and filtering pluginsFree, open source; paid business edition and support, see vendor pricingBSD-2-Clause
pfSense CEFirewall distribution with Squid-based filtering packagesFree Community Edition; paid pfSense Plus from Netgate, see vendor pricingApache-2.0
CorazaEmbeddable WAF for Go, proxies and ingressFree, open sourceApache-2.0
ModSecurityClassic WAF engine with the OWASP Core Rule SetFree, open sourceApache-2.0
BunkerWebAll-in-one reverse proxy WAF with a UIFree, open source; paid PRO offering, see vendor pricingAGPL-3.0
SafeLineSelf-hosted WAF with a management consoleFree, open source community edition; see vendor pricing for paid optionsGPL-3.0

1. Squid

GPL-2.0

Best for: Forward proxy and caching with access control · Free, open source

Squid is a widely used caching and forwarding web proxy that supports access control and is the base of many open-source web filtering deployments.

Strengths

  • + Mature and widely deployed
  • + Access control and caching
  • + Base for many filters

Trade-offs

  • − Needs add-ons for category filtering and a UI

2. E2Guardian

GPL-2.0

Best for: Content filtering for schools and small networks · Free, open source

E2Guardian is an open-source web content filter that works with a proxy such as Squid to filter web traffic by content and category. Its stable 5.5 line is in bug-fix mode only.

Strengths

  • + Content and URL filtering
  • + Works with Squid
  • + Long-running project

Trade-offs

  • − Stable v5.5 is frozen apart from bug fixes

3. OPNsense

BSD-2-Clause

Best for: Firewall distribution with proxy and filtering plugins · Free, open source; paid business edition and support, see vendor pricing

OPNsense is an open-source firewall and routing platform with a web GUI whose plugin system supports proxy and filtering functions.

Strengths

  • + Full firewall with web UI
  • + Plugins for proxy and IDS
  • + Permissive licence

Trade-offs

  • − Proxy filtering depends on plugins

4. pfSense CE

Apache-2.0

Best for: Firewall distribution with Squid-based filtering packages · Free Community Edition; paid pfSense Plus from Netgate, see vendor pricing

pfSense is a free network firewall distribution based on FreeBSD whose package system adds functionality such as proxy and filtering.

Strengths

  • + Large user base
  • + Package system
  • + Web UI

Trade-offs

  • − Advanced features tied to Netgate commercial editions

5. Coraza

Apache-2.0

Best for: Embeddable WAF for Go, proxies and ingress · Free, open source

Coraza is an open-source, high-performance web application firewall written in Go that supports ModSecurity SecLang rulesets and is fully compatible with the OWASP Core Rule Set v4.

Strengths

  • + OWASP CRS compatible
  • + Embeddable library
  • + Apache-2.0

Trade-offs

  • − A library; needs a host proxy or plugin

6. ModSecurity

Apache-2.0

Best for: Classic WAF engine with the OWASP Core Rule Set · Free, open source

ModSecurity (libmodsecurity) loads and interprets rules in the SecRules format and applies them to HTTP traffic through connectors for web servers.

Strengths

  • + De facto WAF rule language
  • + Broad rule ecosystem
  • + Apache-2.0

Trade-offs

  • − Connector setup required

7. BunkerWeb

AGPL-3.0

Best for: All-in-one reverse proxy WAF with a UI · Free, open source; paid PRO offering, see vendor pricing

BunkerWeb is a next-generation open-source web application firewall built on NGINX that secures web services by default, with a web UI and plugins.

Strengths

  • + NGINX based and secure by default
  • + Web UI and plugins
  • + Docker and Kubernetes support

Trade-offs

  • − AGPL obligations

8. SafeLine

GPL-3.0

Best for: Self-hosted WAF with a management console · Free, open source community edition; see vendor pricing for paid options

SafeLine is a self-hosted web application firewall that protects web apps from attacks and exploits.

Strengths

  • + Self-hosted with dashboard
  • + Easy deployment
  • + GPL-3.0

Trade-offs

  • − Vendor documentation is partly oriented to Chinese-language users

New tools in this space, weekly

One email a week with the tools, launches and releases added to TechLogHub. Unsubscribe in one click.

Get the TechLogHub digest

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.

How to choose

If you need…Start with
Outbound proxy and cachingSquid
Category-based web filteringE2Guardian
Firewall plus proxy in one applianceOPNsense, pfSense CE
Embed a WAF in your stackCoraza, ModSecurity
Turnkey WAF with UIBunkerWeb, SafeLine

Open-Source Web Security Gateway Software: FAQ

Quick answers to common questions

What is a web security gateway?

A system that filters web traffic to enforce policy and block threats, either for outbound user browsing or inbound traffic to web applications.

Is there a complete open-source secure web gateway?

Not as one product. Teams combine Squid with a filter such as E2Guardian or run it inside OPNsense or pfSense.

Are WAFs included?

Yes. Coraza, ModSecurity, BunkerWeb and SafeLine protect inbound web applications and are included for the reverse-proxy side of the gateway role.

Does ModSecurity still work?

Yes, libmodsecurity is Apache-2.0 and its rules are compatible with Coraza and the OWASP Core Rule Set.

Related categories

Building a tool in this category?

List it on TechLogHub and we'll review it for this guide.

Submit a tool