A firewall filters traffic by rules, NAT lets many private hosts share public addresses, and a VPN builds an encrypted tunnel across the Internet.