Deploying
Firewall
Jokku bans the addresses that scan your sites for weaknesses, and slows floods of requests, without being set up.
Every site on the internet gets scanned. Bots ask for /.env, /.git/config, /wp-login.php and hundreds of other files that might give something away, and on a small site they can make most of the requests. Jokku's firewall is on for every app from the start. It bans an address that asks for too many pages that don't exist, and slows one that sends too many requests a second.
What it does#
A banned address gets a short 403 Forbidden from every site, saying why and for how long, until the ban ends.
- Where: in the proxy a visitor reaches first. Behind an edge that's the edge, so blocked requests never travel up your home connection. Each proxy keeps its own counts, in memory.
- Never banned or slowed: private addresses (your home network, the cluster's own, Tailscale's
100.64.0.0/10), and addresses you allow. - A site's broken links don't count: a page not found that one of the site's own pages asked for, like a missing image, is the site's mistake, not the visitor's.
- IPv6: a ban covers the address's /64, which belongs to one customer, so a scanner can't step to the next address.
- The visitor's own address: the one their connection came from, whatever
X-Forwarded-Forthey send. Apps get it inX-Forwarded-For, and the router logs show it asclient=.
See what it's doing#
The Firewall view of jokku top (key 9) shows the same, live, site by site. Each ban is an event, and a request the firewall answered is marked in the app's router logs:
Those answers take no time, so jokku top leaves them out of response times.
Change it#
What it can't stop#
A flood from thousands of addresses at once, or one big enough to fill the edge's connection, can't be stopped by the server it reaches. That takes a network in front of your sites, such as Cloudflare. The firewall handles what small sites actually get: scanners, and one address sending far too much.
Behind a proxy of your own, such as Cloudflare's, rather than a Jokku edge, every visitor arrives from that proxy's addresses, and the firewall can't tell them apart: allow its addresses with firewall:add-allowed-ip, or turn the firewall off.
Bans live in each proxy's memory, so a proxy that restarts starts over. Databases reached from outside aren't behind the firewall: limit who can connect with --allow.