Skip to main content
Firewalls define which traffic can reach your resources. Use them to protect SSH, databases, private services, and public applications.

Firewall rules

A rule usually includes:
FieldMeaning
ProtocolTCP, UDP, or ICMP.
Port rangeThe destination port or ports.
SourceThe IP range allowed to connect.
DescriptionA label that explains why the rule exists.

Common rules

Use caseProtocolPortSource
SSHTCP22Your trusted IP
HTTPTCP800.0.0.0/0
HTTPSTCP4430.0.0.0/0
PostgreSQLTCP5432App subnet or trusted IP

Best practices

  • Avoid broad SSH access.
  • Remove temporary debug rules.
  • Keep database access narrow.
  • Use descriptions so future you understands why a rule exists.
A permissive firewall can expose services that were meant to stay private.