Cloud Firewall and Floating IP
Level 4 · The network around the server
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 contentsLesson 6 of 7
Level 1 · Choosing the hosting
Level 2 · Plans and the shared machine
Level 3 · First boot and the way back in
Level 4 · The network around the server
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
12 mincovers 5 glossary entries
Worth reading first: Web Console and Rescue Mode
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.
Worked 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.
The words for this lesson5
Check yourself
Why point your domain at a floating IP instead of the server's own address?
Finished this lesson?
Marking it complete also marks its 5 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.