Fill the Server: 80% off your first 4 monthly invoices, monthly billing. Ends Nov 30, 2026. 25 spots in this batch.FILL25
Fill the Server, annual: about 29.63% off your first annual invoice. Ends Nov 30, 2026.FILL25Y
Fill the Server, 2 year term: about 15.69% off your first biennial invoice. Ends Nov 30, 2026.FILL25B
Fill the Server, 3 year term: about 11.11% off your first triennial invoice. Ends Nov 30, 2026.FILL25T
80% off your first 3 months, monthly billing. Ends Dec 25, 2027.3MONTHS80
50% off your first annual Shared term. Ends Dec 31, 2027.50SHARED
Shared Starter, 3 year term: C$105.84 total.MOOSE294
20% off your first 3 monthly VPS invoices. Ends Dec 31, 2027.20VPS3
25% off your first annual base VPS term.25VPS

← All guides

Security

Linux firewall setup: open only what the server needs

Published August 2026 · 8 min read

A host firewall reduces the network services reachable from untrusted networks. The safest starting point is an inventory of required inbound traffic rather than a copied rule set that may block administration or expose services your server does not use.

List the services that should be public

A conventional web server may need HTTP and HTTPS. Administrative SSH may be restricted to known networks or another management path. Databases, caches, metrics, and internal dashboards usually do not need broad public exposure.

Understand both host and provider firewalls

Cloud or hosting providers may offer a network firewall in addition to the guest operating-system firewall. Document both layers so troubleshooting a blocked port does not become guesswork.

Do not forget IPv6

If the server has public IPv6, a policy applied only to IPv4 can leave an unintended path open. Either configure equivalent controls or deliberately disable/address IPv6 according to the architecture.

Protect your management session while changing rules

Add and verify required management access before applying a default-deny policy. Keep console or rescue access available and test from a second session so a mistake is recoverable.

Next step

Plan Linux firewall rules around required services, management access, established traffic, IPv4/IPv6, provider firewalls, logging, and a safe rollback path.

Read server security guides

Keep reading

Related guides.

Content Security Policy rollout: build CSP from the resources a site really uses

Inventory scripts, styles, frames and connections, start with reporting, reduce unsafe allowances and enforce CSP only after normal user paths still work.

Read the guide

HSTS rollout planning: enable strict HTTPS without locking in a mistake

Stabilize HTTPS first, choose max-age carefully, cover subdomains deliberately and understand preload consequences before making HSTS hard to reverse.

Read the guide

HTTPS redirect mistakes: loops, chains and host changes that hurt a site

Find conflicting HTTP-to-HTTPS and hostname redirects across proxies, servers and applications, then reduce the path to one intentional canonical destination.

Read the guide

More security guides

We will handle the move. You check it first.

Your current site stays online until your new one is ready. You approve the copy first, and if anything is not right we switch you back right away. The price you pick is the price you renew at.

Start my free moveSee plans and prices
See pricesFree move