# Cloud Firewall and Floating IP

> How a cloud firewall blocks traffic before it reaches your VPS. How a floating IP lets you swap servers and keep the same address.

**Course:** [VPS Hosting](https://learn.benibix.com/learn/infrastructure-vps)  
**Time:** 12 min

**After this lesson you can:**

- Set cloud firewall rules for a web server's ports
- Use a cloud firewall and UFW together
- Move a floating IP to a new server

## What lives in the panel, outside the server

Some network settings for a VPS live in the host's panel, not on the server. A cloud firewall is a firewall the host runs in front of your server. Traffic it blocks never reaches the server at all. A floating IP is a public address that belongs to your account, so you can move it from one server to another.

A firewall decides which traffic may reach a machine. It works by port, the number that says which program a message is for. A website needs ports 80 and 443. Logins over SSH use port 22. Everything else can be closed.

A cloud firewall has one big plus. Its rules sit outside the server, so a mistake on the server cannot switch them off. One set of rules can cover ten servers at once. Many hosts offer it for free.

UFW is the firewall on the server itself. Many people use both. The cloud firewall stops the crowd at the gate, and UFW checks again at the door. If the server is ever moved or rebuilt, the cloud rules are still in place.

A floating IP solves a different problem. A normal public address is tied to one server. If you replace that server, the new one gets a new address, and your domain points at the old one until you change it.

With a floating IP, your domain points at the floating address instead. You build the new server, test it, then move the address to it in the panel. Visitors keep using the same address and never notice the swap. Some hosts call it a reserved or a static IP.

A common mistake is to block port 22 in the cloud firewall from everywhere but your home. That is safe, until you need to log in from a train. Keep a second way in, such as the web console, before you lock the gate that tightly.

![Three settings in the provider's panel, outside the server. A cloud firewall in front of a server lets only ports 22 and 443 pass, and stops the others. A floating IP, 203.0.113.50, points at server A and can be moved to server B, and visitors never notice. A reverse DNS record turns the address 203.0.113.10 back into the name mail.jack.example.](https://learn.benibix.com/diagrams/inf3-vps-network.svg)

### Example: Emma swaps servers with no downtime

Emma's shop runs on server A, behind the floating IP 203.0.113.50. She needs a bigger server with a newer system.

She builds server B, tests it for a day, then moves the floating IP to it in the panel. The switch takes about 5 seconds, and not one order is lost.

**Words in this lesson:** [Firewall](https://learn.benibix.com/term/infrastructure/firewall), [Network Port](https://learn.benibix.com/term/infrastructure/port), [Cloud Firewall](https://learn.benibix.com/term/infrastructure/cloud-firewall), [Uncomplicated Firewall (UFW)](https://learn.benibix.com/term/infrastructure/ufw), [Floating IP](https://learn.benibix.com/term/infrastructure/floating-ip)

**Question:** Why point your domain at a floating IP instead of the server's own address?

**Answer:** You can move it to a new server, and visitors keep the same address. A floating IP belongs to your account, not to one server. Move it to the new server, and the domain never has to change.

---

Source: https://learn.benibix.com/learn/infrastructure-vps/cloud-firewall-and-floating-ip
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
