Firewalls serve to filter network traffic and keep destructive forces from entering a network, similar to how fire barriers contain fires. The first firewalls were created in the 1980s and gained popularity later in the decade. Modern firewalls can be packet filters, circuit-level gateways, application-level gateways, or stateful multilayer inspection firewalls, with each generation building on the previous ones to provide stronger security but at increased complexity and cost.