On izCloud the firewall includes more than 20,000 IPS signatures. Servers run in a private VLAN dedicated to you, and DNAT and SNAT rules are defined from the panel.
What is a server firewall?
A firewall is software or hardware that inspects network packets and decides by rules whether to let them through. It works like a doorman in front of your server: the rules decide who can come in through which port.
A web server only needs ports 80 and 443. Without a firewall, all other services on the server stay reachable from the internet. A firewall closes this unneeded access and shrinks the attack surface.
In a cloud environment a firewall can sit in two places. One is the firewall that runs at the gateway and protects several servers. The other is the software firewall in the server's operating system (iptables, nftables, Windows Firewall). Using both gives layered protection.
A firewall alone is not an antivirus or a vulnerability scanner. It checks traffic at the level of address, port and protocol. Advanced products also include an intrusion prevention system (IPS) that looks at attack signatures. An IPS inspects packet content with signatures that hold known attack patterns.
How does a firewall rule work?
Each rule has a condition and an action. The condition describes the traffic, and the action says what to do with it.
| Rule field | Description | Example |
|---|---|---|
| Source | The address or network the traffic comes from | Office IP address |
| Destination | The server the traffic goes to | Web server |
| Protocol and port | The service in use | TCP 443 |
| Action | Allow or block | Allow |
| Direction | Incoming or outgoing traffic | Incoming |
What is default deny?
Default deny is the principle of blocking all traffic that is not explicitly allowed. When you set up a firewall, you first close everything and then open only what is needed.
This approach prevents a port you forgot about from staying open by mistake. In the opposite model (default allow) you would have to write a separate block rule for every new threat, which is not sustainable.
At the end of a firewall there should always be a hidden or explicit "block everything else" rule. When you review rules, check that this last rule is in place.
The same principle applies to outgoing traffic. If a server can reach the internet freely, an attacker who takes it over can send data out more easily. If possible, limit outgoing traffic to only the destinations you need.
Why does rule order matter?
Firewalls usually evaluate rules from top to bottom and apply the first matching rule. So the order of rules decides the result.
A broad allow rule at the top overrides a narrow block rule below it. For example, a rule that opens port 22 to all addresses makes a rule below it that says "allow only the office address" meaningless.
The general principle is: more specific rules go on top and more general rules go below. When you add a new rule, check whether it should sit above or below the existing ones.
- Write specific rules above general rules.
- Clean up unused and old rules regularly.
- Write a note on why each rule was added.
- Before applying a change, make sure access will not be cut.
What is the difference between a stateful and a stateless firewall?
A stateful firewall tracks the state of a connection, while a stateless firewall evaluates each packet on its own. This difference directly affects how you write rules.
In a stateful setup, when a connection is established by an allowed rule, the return traffic of that connection passes automatically. For example, you do not write a separate rule for the reply to a request that arrives from outside on port 443. The firewall keeps the connection in its connection table.
In a stateless setup, return traffic needs a separate rule. Reply packets usually come back from high-numbered ephemeral ports, which makes rule writing harder and more error-prone.
That is why a stateful setup is mostly preferred for server protection. Stateless filtering is used where very high speed and simple rules are needed, for example to block known bad addresses at the edge of a network.
| Feature | Stateful | Stateless |
|---|---|---|
| Connection tracking | Yes, keeps a connection table | No, each packet is evaluated separately |
| Return traffic | Passes automatically | Needs a separate rule |
| Writing rules | Simpler | More detailed and error-prone |
| Resource use | Uses memory for the connection table | Uses less memory |
| Typical use | Server and gateway protection | Very high-speed simple filtering, list-based blocking |
How are a firewall and NAT related?
NAT translates addresses, and a firewall allows or blocks. Many products do both on the same device, but they are separate functions.
When you expose a service with DNAT, the address is translated, but the firewall also needs a matching allow rule for the traffic to pass. When servers go out to the internet with SNAT, there must also be a rule that allows the outgoing traffic. We explain the concept in detail in what are DNAT and SNAT.
Pay attention to this point when writing rules: some products match the translated internal address in the allow rule, others match the untranslated external address. Check the product documentation to see which applies, otherwise a rule that looks correct may not let the traffic through. On izCloud the rule matches the translated internal port; the steps are in how to set up port forwarding (DNAT).
How do you configure a firewall for a server?
Identify the ports the server really needs and close the rest. The steps below suit most cloud servers.
- List which services the server runs and which ports it listens on.
- Apply the default deny principle. Block all incoming traffic first.
- Open the ports that must be public one by one. For a web server these are usually ports 80 and 443.
- Do not leave management ports (SSH and remote desktop) open to the internet. Restrict the source address or connect through a VPN.
- Open database ports only to the address of the application server.
- Review the rules periodically and remove the ones you do not use.
How does the firewall work on izCloud?
On izCloud the firewall includes more than 20,000 IPS signatures. DDoS protection is also part of the service. Your servers run in a private VLAN dedicated to you, and DNAT and SNAT rules are defined from the panel.
For remote access you can use an SSL VPN client and IPsec site-to-site VPN. For two-step verification at VPN login, a 6-digit code is sent by email and the code is valid for 60 seconds.
The firewall provides protection at the network level. Operating system updates, application security and password policies remain your responsibility. Support is available 24/7 and requests are opened from the panel.
Before changing rules, take a record of the current configuration and apply the change to a restricted address first. That way a faulty rule is noticed before it cuts your access completely.
Frequently asked questions
What does a server firewall do?
It controls traffic coming to and going from the server with rules. It closes unneeded ports, lets through only the allowed access and shrinks the attack surface.
What is a stateful firewall?
It is a firewall that tracks the state of a connection. The return traffic of an allowed connection passes automatically, so you do not need to write another rule.
What does default deny mean?
It means blocking all traffic that is not explicitly allowed. You close everything first and then open only the ports you need.
Does the order of firewall rules matter?
Yes. Firewalls usually evaluate rules from top to bottom and apply the first match. Specific rules should be on top and general rules below.
Should I use both a server firewall and a network firewall?
Yes, you can use both for layered protection. The network firewall filters traffic before it reaches the server, and the operating system firewall adds a second layer.
Is a firewall enough on its own?
No. A firewall protects at the network level. You also need operating system updates, strong passwords, backups and application security.