DevOps & Networking Cheat Sheet

The lookups you make every week — cron fields, CIDR masks, common ports, HTTP status codes and DNS record types — on one page.

Bookmark this page for the quick answer; every section links to the interactive tool when you need to compute a real value.

Cron syntax

minute hour day-of-month month day-of-week — five fields, read left to right.

  • */5 * * * * — every 5 minutes
  • 0 * * * * — hourly, on the hour
  • 0 3 * * * — daily at 03:00
  • 0 3 * * 1 — Mondays at 03:00
  • 0 0 1 * * — first of the month at midnight
  • */15 9-17 * * 1-5 — every 15 minutes, 09:00–17:59, weekdays

Build and sanity-check your own schedule in the Cron Expression Builder.


Subnet masks (IPv4 CIDR)

  • /8 — 255.0.0.0 — 16,777,214 usable hosts
  • /16 — 255.255.0.0 — 65,534 hosts
  • /24 — 255.255.255.0 — 254 hosts
  • /25 — 255.255.255.128 — 126 hosts
  • /26 — 255.255.255.192 — 62 hosts
  • /27 — 255.255.255.224 — 30 hosts
  • /28 — 255.255.255.240 — 14 hosts
  • /30 — 255.255.255.252 — 2 hosts (point-to-point)
  • /31 — 255.255.255.254 — 2 hosts (RFC 3021 point-to-point)
  • /32 — 255.255.255.255 — a single host

Usable hosts = 2^(32 − prefix) − 2 for the network and broadcast addresses. Work any block interactively in the Subnet / CIDR Calculator.


Common TCP/UDP ports

  • 20/21 FTP — 22 SSH & SFTP — 23 Telnet — 25 SMTP
  • 53 DNS — 67/68 DHCP — 80 HTTP — 110 POP3
  • 123 NTP — 143 IMAP — 443 HTTPS — 465/587 SMTP over TLS / submission
  • 993 IMAPS — 995 POP3S — 1433 SQL Server — 3306 MySQL
  • 3389 RDP — 5432 PostgreSQL — 6379 Redis — 8080 HTTP alternate
  • 9090 Prometheus — 9200 Elasticsearch — 27017 MongoDB

HTTP status codes

  • 200 OK — 201 Created — 204 No Content
  • 301 Moved Permanently — 302 Found — 304 Not Modified — 307/308 Temporary/Permanent Redirect
  • 400 Bad Request — 401 Unauthorized — 403 Forbidden — 404 Not Found
  • 405 Method Not Allowed — 409 Conflict — 422 Unprocessable Content — 429 Too Many Requests
  • 500 Internal Server Error — 502 Bad Gateway — 503 Service Unavailable — 504 Gateway Timeout

Mnemonic: 401 means not authenticated; 403 means authenticated but not allowed.


DNS record types

  • A / AAAA — hostname to IPv4 / IPv6 address
  • CNAME — alias pointing at another hostname
  • MX — mail exchanger that accepts the domain's email
  • TXT — free-form text: SPF, DKIM, domain verification
  • NS — the zone's authoritative nameservers
  • SOA — zone serial number and refresh timers
  • SRV — service locator carrying a host and port
  • CAA — which certificate authorities may issue for the domain

Query any of them live in the DNS Lookup.


How do I read a cron expression?

Left to right the five fields are minute, hour, day of month, month and day of week. `*` matches every value, `*/N` means "every N", `A-B` is a range and `A,B` a list. When both day-of-month and day-of-week are set, most crons fire when either matches.

How many usable hosts does a subnet have?

Two to the power of (32 minus the prefix length), minus 2 for the network and broadcast addresses — so a /24 has 254 usable hosts and a /26 has 62. The exceptions are /31 (2 hosts, RFC 3021 point-to-point) and /32 (a single host route).

What is the difference between a 502 and a 504?

Both come from a proxy or load balancer in front of your app. A 502 Bad Gateway means the upstream answered with something invalid (often a crash or connection reset); a 504 Gateway Timeout means the upstream never answered in time.

Related tools

🔐 Private by design: every tool runs in your browser. DNS lookups go straight to Cloudflare's DoH resolver (1.1.1.1); nothing else is sent to any server, and nothing is logged.