I have found many answers to this question, none of which satisfy me due to lack of detail. Can someone please explain in detail what is a firewall and what is its purpose, and what is an ACL and what is its purpose, and why are these two not the same? What are the differences in terms of functionality, goal, deployment, administration and anything else?
ACLs are packet filters. They pass or block packets based on packet data, such as addresses, ports, or other data. They are also stateless. That means the decision to pass or block a packet is based solely on the values in the packet, without regard to any previous packets.
Firewalls* are stateful devices. They also pass or block packets based on data, but they "understand" the semantics of the data and can enforce protocol semantics based on data that was in previous packets. For example, a firewall can inspect a TCP exchange, ensuring that acknowledgements match the data sent, or that flags are set correctly.
Many firewalls can look deeper into the packet and enforce higher level semantics, such as HTTP or other application-level protocols.
*Generally speaking. Specific features vary by manufacturer.
Stateful inspection is the easy answer to what is the difference between a firewall and access control list.
Access lists (ACLs) define interesting traffic. An ACL specifies network addresses and optionally port numbers, or destinations. The interesting traffic is then acted on by processes such as QoS, routing, interface filtering, etc.
The term firewall is not really a technical term as much as it is a marketing or conceptual term. A firewall assumes an unprotected outside network and protected inside network. Early firewalls recorded transport protocol messages in temporary tables (in memory) enabling them to monitor the state of connections. Later firewalls performed deep packet inspection meaning the firewall was aware of the expected behavior of various applications traffic. Then
next generation firewalls added application awareness and control, integrated intrusion prevention, and cloud-delivered threat intelligence¹.
These are different levels of abstraction.
A firewall is a device or software component whose purpose is to protect a network or computer from unwanted traffic. There are many different types of firewalls, such as: simple packet filters, stateful packet inspection, transparent proxies, bastion hosts. Some firewalls support multiple technologies like these.
An Access Control List (in this context) is a component of a firewall configuration that's used to specify what type of traffic is allowed.