Sari la conținutul principal
FreeThree checks for your projectUptime, accessibility, SEO and cookie checks for your project
Toate articolele

Security20 octombrie 20265 min de citit

What a web application firewall does, and what it does not

Eric ZsigmondCo-Founder & Senior Frontend Engineer

Every website that can be reached from the internet gets visits nobody asked for. Most of them are not aimed at you. They come from programs that work through long lists of addresses and try the same things on each one. A web application firewall, WAF for short, is a filter that stands in front of a website and turns much of that traffic away before the site has to deal with it. This article explains what such a filter does, how to switch one on without shutting out your own customers, and which jobs it leaves with you.

The traffic nobody invited

It helps to sort unwanted traffic into a few kinds, because each is handled in a different way.

  • Scans. Programs that ask your site for things that should not be public, or check whether it runs software with a known weakness.
  • Break-in attempts. Requests written to misuse a form, a search box or an address on your site.
  • Floods. Far more requests than any visitor would send. Some are meant to take a site down. Others come from a badly written program that does not know when to stop.
  • Unwanted bots. Automated visitors that copy your content or work through every page of a shop, and use capacity your customers need.

None of this depends on your website being well known. A small site is found the same way as a large one, by a program working through a list.

What a firewall in front of a site does

The idea is simple. Every request to your website passes through the firewall first. What the firewall accepts goes on to your site. What it refuses never arrives, so your site spends nothing on it. Tilizy WAF works this way for a website hosted anywhere, and it is the firewall included in every Tilizy Hosting plan. Here is what it does with a request.

Attack rules

Each request is checked against rules that describe what known attacks look like. Tilizy WAF uses the OWASP Core Rule Set, an open standard for recognising break-in attempts, and we keep it up to date. A request that matches is blocked. You choose how strict the rules are, in four levels. Stricter levels catch more and need more tuning to fit your site.

Country and address blocking

You decide who may reach the website at all. You can block countries or whole continents, and single addresses or ranges of them. An allow list sits above all of it: an address on that list is never blocked, whatever else you set.

Rate limits

Each visitor gets a fair number of requests, with room for a short burst. Someone who sends too many, too fast, is told to wait, so a flood cannot use up your website. There is also a cap on the connections one visitor can hold open at the same time, and the pages you choose can be exempt. While a site is under attack, a short automatic browser check turns away flood bots.

Bots

Bots are not all unwelcome. Verified search engines are always let through, even from a country you have blocked. Known scanners are turned away, and you can add other bots by name.

Automatic bans

An address that keeps attacking is banned automatically, for a limited time. The ban applies on every website the firewall protects, so an address caught on another site is already blocked when it reaches yours. Bans end on their own, and an address that comes back gets a longer one. Search engines and your allow list are never banned.

All of this is visible. A live feed lists every blocked, limited or banned request, with the rule, the country and the address.

Watch first, block later

Will a firewall block real visitors by mistake? It can, as any firewall can. A rule judges a request by its shape, and some honest requests have an unusual shape: an editor saving a long page with code samples in it, or a tool your own team uses to import products.

That is why Tilizy WAF starts in watch-only mode. It logs what the rules would block and blocks nothing. Read that log for a while and look for your own people in it:

  • editors and shop staff doing their normal work;
  • services that call your site, such as a payment provider confirming an order;
  • your own monitoring and import tools.

Where something legitimate shows up, you have three remedies. Put the address on the allow list, skip the checks for one page, or switch off the single rule that does not fit your website. When the log holds only traffic you are glad to lose, switch to blocking. Go back to the feed after every larger change to the site, because new features bring new kinds of request.

Where its job ends

A firewall filters requests. That is a narrow job, and it helps to know what lies outside it.

The firewall doesStill your job
Turns away requests that look like known attacksRepairing the weakness those requests were looking for
Slows down floods of web requestsEnough capacity for your real visitors
Blocks the countries, addresses and bots you nameDeciding who should be let in, and keeping the list current
Bans addresses that keep attackingUpdates, backups and the accounts on your site

It does not fix vulnerable code. If your website has a weakness, the weakness is still there behind the firewall. The lasting repair is always in the site itself: an update, or a change to the code. What a firewall gives you is time to make that repair calmly.

It does not replace updates. Software that is behind on security updates stays behind. You still need to know which updates are waiting, and to install them, ideally after trying them on a staging copy. How to find out what is waiting is covered in Your website is up. Is it healthy?

It does not replace backups. A firewall prevents some damage and restores none. A failed update, a page deleted by accident or a mistake in an import is repaired from a backup. Keep them, keep them away from the server, and know how a restore is done before you need one.

It does not look after your accounts. Strong passwords, two-step sign-in where your site offers it, and removing the accounts of people who have left all stay with you.

It works on web requests. An attack that aims at the network connection itself, below the level of web requests, is not something a web firewall can stop. That is the work of the network protection of a data centre.

The order that makes sense

A firewall is one layer. Updates and backups come first. The firewall goes in front, in watch-only mode until its log looks right. Monitoring tells you when something still goes wrong.

The full list of what Tilizy WAF does, and its price, is on the WAF page.

Scris de

Eric Zsigmond

Co-Founder & Senior Frontend Engineer

Now check your own project.

Add your project and see what it needs. The first three checks are free.