Every website needs protection. Just like your personal computer, online servers can be targeted for attack. You need a way to keep out hackers or other sources of illegitimate traffic. Thatâ€™s where firewalls come in.
What is a firewall, in short? Itâ€™s a barrier between a computer and the â€œoutside worldâ€.
Malicious actors can wreak havoc on your server if you leave your website unprotected and thatâ€™s why you should do everything you can to secure your WordPress site. Setting up a firewall should be one of your first orders of business.
But there are many different types of firewalls and you might not know where to begin.
Letâ€™s go over all the types of firewalls, when youâ€™ll need one, and how to get one set up on your server.
What Is a Firewall? What Does a Firewall Do?
Whenever you visit a website, youâ€™re basically connecting to another computer: the web server.Â But because a server is just a specialized kind of computer, itâ€™s susceptible to the same kind of attacks your own PC is.
Itâ€™s not safe to connect so directly to another device without any kind of protection in between. Once that connection is established, itâ€™s much easier to infect the other party with malware or launch a DDoS attack.
Thatâ€™s what a firewall is for. Itâ€™s the intermediary between you and any other devices trying to connect to you or, in a web serverâ€™s case, between it and the hundreds or thousands of connections it makes with others every day.
So how exactly does a firewall work?
Firewalls simply monitor incoming and outgoing traffic on a device, scanning for any signs of malicious activity. Should it detect something suspicious, it will instantly block it from reaching its destination.
Itâ€™s a big filtration system for your computer or server.
When they were first developed, firewalls were very simple packet analyzers that allowed or blocked incoming traffic based on a minimal set of predefined rules. They were very easy to bypass.
Nowadays theyâ€™ve evolved into complex pieces of programming that are much better at keeping out-attempted intrusions and are an essential piece of software for all devices.
When You Need a Firewall
You might be wondering: when is a firewall necessary? Do I really need one?
A firewall is required for any machine that connects to the internet. Not just your computer, but your web server, phone, IoT devices, or anything you can think of that has the ability to use the internet.
An unprotected device is easy pickings for intrusions and infections.
This could give hackers the ability to take over your computer, install whatever they want, monitor as you enter sensitive info like bank credentials, or even look through your webcam/camera, and listen through your microphone.
In the case of a web server, if a hacker manages to get through, they could deface your website, embed malware that infects your visitors, change your WordPress admin login credentials, or take down your site entirely.
Without a firewall, your website and even your personal devices are vulnerable to DDoS attacks, an attack vector that sends thousands or millions of fake packets to overload your server and brings your website or internet down.
Not convinced? Hereâ€™s what a firewall can protect you or your website against:
- Intrusions: Firewalls prevent unauthorized users from accessing your computer or server remotely and doing whatever they want.
- Malware: Attackers who manage to infiltrate can send malware to infect you or your server. Malware may steal personal information, spread itself to other users, or otherwise damage your computer.
- Brute force attacks: Attempts by hackers to try hundreds of username and password combinations to discover your admin (or other usersâ€™) login credentials.
- DDoS attacks: Firewalls (especially web application firewalls) can attempt to detect the influx of fake traffic that occurs during a DDoS attack.
Types of Firewalls
There are many different types of firewalls, each designed for a different situation. Some are better for single computers, while others are made for network-wide filtering.
They all work differently and are better at blocking certain kinds of traffic. If youâ€™re wondering which you should be looking for, weâ€™ll break down all the major types of firewalls.
Hereâ€™s a quick summary: unless youâ€™re running your own server stack (providing a website with your own internet), the type of firewall you mainly need to worry about are personal firewalls, software firewalls, and web application firewalls.
These three are the most important. However, read more about the rest if you want to better understand how a firewall works and how theyâ€™ve evolved over the years.
Firewalls work very differently depending on whether theyâ€™re used by single computers, entire networks (such as within a business office), or web servers. A personal firewall is intended for use on just one computer. This is the firewall that comes pre-installed on Windows and Mac machines or with your antivirus software.
While it works similarly to a server firewall â€” allowing or rejecting connections from other devices, applications, and IPs based on a set of predefined rules â€” in function it acts a little differently.
Personal firewalls can protect the ports you use to connect to websites and online applications (stealthing them so attackers canâ€™t see that theyâ€™re open), defend against attacks that slip through the network, prevent people from accessing and taking over your computer, and analyze all incoming and outgoing traffic.
They also act as application firewalls, monitoring the activity of apps on your device and refusing to allow a connection to be established with unsafe or unknown software.
These days, obtaining a personal firewall is fairly easy. If you use any modern version of Windows, there should already be one running by default.
Mac computers also come with one, though you need to turn it on yourself. To do so, navigate to System Preferences, click Security & Privacy, then click Firewall:
Antivirus software often comes with its own too. An example is Avast antivirus: its software firewall is compatible with Windows and serves as a second layer of defense.
Paid third-party personal firewalls also exist, but these can conflict with your default setup.
Hardware vs Software Firewall
Firewalls come in two distinct shapes: hardware and software firewalls. Software firewalls are downloadable programs for your computer, monitoring it all from a central control panel. Hardware firewalls provide similar functionality, but theyâ€™re physically installed in the building.
You might not know it, but you probably have a form of hardware firewall in your house: your router, the device that allows you to connect to the internet. While it isnâ€™t exactly the same as a dedicated hardware firewall device, it provides similar functions of monitoring and allowing or denying connections.
Both software and hardware firewalls sit between your computer and the outside world, carefully analyzing any connections that try to slip through. You can have either or both of them running on your network.
There are a few downsides to hardware firewalls, however. Theyâ€™re hard to set up and require ongoing maintenance, so theyâ€™re not generally suitable for single computers or very small businesses without an IT department. They can cause performance issues, especially when stacked with a software firewall. And theyâ€™re not suitable for blocking applications on a device, or user-based restrictions.
On the other hand, a hardware firewall will protect your entire network of computers easily, while setting up software for that is a more difficult task. And while an attacker can disable software if they manage to get in, they canâ€™t tamper with a physical device.
Software firewalls are, as their name implies, better at working with programs on a computer. Blocking applications, managing users, generating logs, and monitoring users on your network are their specialty. Theyâ€™re not as easy to configure network-wide, but when installed on multiple devices, they allow finer control.
Packet Filtering Firewall
The simplest type of firewall, and among the first ever developed, is the packet filtering firewalls. A packet is the data exchanged between your computer and a server. When you click a link, upload a file, or send an email, you send a packet to the server. And when you load a webpage, it sends packets to you.
A packet-filtering firewall analyzes these packets and blocks them based on a set of predefined rules. For instance, you could block packets originating from a certain server or IP address, or those trying to reach a certain destination on your server.
The downside: These types of firewalls are simple and easy to trick. Thereâ€™s no way to apply advanced rules. If you allow traffic to flow through a certain port, the packet filtering firewall will let anything through, even traffic that to modern firewalls is obviously not legitimate.
The only upside to these is that theyâ€™re so simple that they have almost no impact on performance. They donâ€™t inspect traffic, save logs, or execute any advanced functions. These days, packet filtering firewalls should be avoided or at least used alongside something more advanced, as there are much better solutions.
After the â€œstatelessâ€, simple packet filters came stateful firewall technology. This was revolutionary because instead of just analyzing packets as they come through and rejecting based on simple parameters, stateful firewalls handle dynamic information and continue monitoring packets as they pass through the network.
A simple packet filtering firewall can only block-based on static info like IP address or port. Stateful firewalls are better at detecting and blocking illegitimate traffic because they recognize patterns and other advanced concepts.
Compared to stateless firewalls, the downsides are that theyâ€™re more intensive due to storing packet data in memory and analyzing them more rigorously, plus keeping logs of what gets blocked and what passes through. But theyâ€™re a much better solution.
Web Application Firewall
While stateful technology is still used today, it alone is no longer enough to effectively keep a network safe. Application and Web Application Firewalls were the next big step.
Need a blazing-fast, reliable, and fully secure hosting for your website? Kinsta provides all of this and 24/7 world-class support from WordPress experts. Check out our plans
Traditional firewalls only monitor general traffic on a network. They struggle or completely fail to detect traffic coming or going from an app, service, or other software. Application firewalls were designed to work with these programs, catching intrusion attempts that take advantage of software vulnerabilities to slip past older firewalls.
They could also function as a parental control system for a business, blocking access to certain apps and websites entirely.
Web application firewalls work similarly, but they monitor web apps instead of programs on a computer. Examples of web apps are third-party form or shopping cart plugins, which can sometimes be hijacked to send malware to your server. Without a WAF, youâ€™re vulnerable to these attacks.
Many WAFs are cloud-based, which means you donâ€™t need to make any radical changes to your server to set them up. But they can also exist on hardware or server software.
If you need a firewall service to protect your website, look for a cloud-based WAF like Cloudflare or Sucuri. These can be installed without having to fiddle with sensitive web host settings or set up expensive hardware.
Last is the Next-Generation Firewall (NGFW), one of the most recent inventions to come out of this generation of security technology. These enterprise-grade tools are like all of the above combined into one. Deep packet filtering, intrusion prevention, and application monitoring are just a few of their huge range of networking features.
Next-generation cloud firewalls do exist as a service online, but WAFs are far more common and provide similar functionality. But if you want the absolute most advanced firewall technology available, with a full suite of security protection in one program, look for a NGFW.
How to Get a Firewall
To protect yourself and your website, you need a high-quality firewall that will keep intruders out.
As far as personal firewalls go, itâ€™s not usually necessary to go out of your way to get one. Windowsâ€™ built-in firewall works very well with no configuration at all. And between the application firewall that often comes with your antivirus software, and the packet filter on your router, your computer is usually more than protected.
Just make sure your firewall is activated, you have a good antivirus installed, and your router is configured properly. The same thing can be said for macOS users.
But what if you have a website that needs protection?
Itâ€™s a lot different then. Thereâ€™s not as many built-in tools to protect you, and often itâ€™s up to you to secure your website. For instance, if youâ€™re running WordPress, thereâ€™s no firewall or anything to protect your server and security plugins are one of the most common options.
WordPress developers do their best to keep the code optimized, but when vulnerabilities do arise, you have nothing to prevent intrusions.
In addition to installing a firewall yourself, you should choose a web host that takes care of their servers properly. Too many cheap hosts donâ€™t bother with securityÂ and it can cause huge problems if your site comes under fire.
Kinsta and the Google Cloud Platform Firewall
Kinsta adds an extra layer of security to all Kinsta plans thanks to the GCP firewall. If you donâ€™t know, our infrastructure is built on the Google Cloud Platform, which means each website hosted on our servers gets its own isolated container.
This is already much more secure than most forms of hosting, especially since your site is living on Googleâ€™s top-notch technology. But with the release of the Google Cloud Platform firewall, it just got better.
Every site on one of our plans is now protected by Googleâ€™s firewalls.
This also works well alongside a third-party WAF. There are no conflicts, just even more protection for your website. With a service like Sucuri or Cloudflare in place, your server will be all but impenetrable.
On a modern personal computer, you donâ€™t usually have to do much since a firewall comes pre-installed with most operating systems. As for your website, too many hosts just donâ€™t care about securing their servers, so it becomes your job to protect yourself.
If youâ€™re looking for a web host with reliable security infrastructure that can support a site of any size, consider Kinsta. With our security guarantee, you know that you wonâ€™t fall victim to hacking. And on the rare chance they breakthrough, weâ€™ll take steps to get rid of the malware for free.
Even if you do choose a reliable host that puts a lot of stock in security, itâ€™s a good idea to install a web application firewall as a second line of defense. Find a good service like Sucuri, or download a WordPress security plugin, and youâ€™ll be good to go.