什麼是防火牆?

防火牆是一種網路安全裝置,它根據組織先前建立的安全策略來監視和過濾傳入和傳出的網路流量。從最基本的角度來看,防火牆本質上是位於專用內部網路和公共互聯網之間的屏障。防火牆的主要目的是允許非威脅性流量進入並阻止危險流量進入。

Get a Personal Firewall Demo Miercom 2025 Firewall report

什麼是防火牆?不同類型的防火牆

History of Firewalls

防火牆自 20 世紀 80 年代末以來就已存在,最初是作為資料包過濾器而建立的,它是為檢查電腦之間傳輸的資料包或位元組而設置的網路。儘管資料包過濾防火牆至今仍在使用,但隨著幾十年來技術的發展,防火牆已經取得了長足的進步。

  • 第一代病毒
    • 第一代 1980 年代末,獨立電腦的病毒攻擊影響了所有企業,並推動了防毒產品。
  • 第二代網路
    • 第二代,即 20 世紀 90 年代中期,來自網路的攻擊影響了所有業務並推動了防火牆的創建。
  • 第 3 代應用程式
    • 第三代,2000 年初,在影響大多數企業並推動入侵防禦系統產品 (IPS) 的應用程式中利用脆弱性。
  • 第 4 代有效負載
    • 第四代,約 2010 年,有針對性、未知、逃避的多形式攻擊的增加,影響大多數企業,並推動了反機器人和沙盒產品。
  • 第 5 代超級
    • 第五代,約 2017年,使用先進攻擊工具的大規模、多向量、特大攻擊正在推動先進的威脅防護解決方案。

早在 1993 年,Check Point 執行長 Gil Shwed 就推出了第一個狀態檢查防火牆 FireWall-1。快轉二十七年,防火牆仍然是組織抵禦網路攻擊的第一道防線。現今的防火牆,包括次世代防火牆和網路防火牆,透過內建功能支援多種功能和功能,包括:

The Firewalls Evolution

Just like the networks they protect, firewalls have undergone a significant amount of change over the last decade. Even the earliest firewall tooling was essential to network security, as their 1980s counterparts first came into existence as packet filtering tools.

Early Development: Packet-Filtering Firewalls

The first generation of firewalls, introduced in the late 1980s, employed simple packet filtering. These tools examined data packets at the network layer (OSI Layer 3), and filtered the packets that a network responds to through parameters such as IP addresses, ports, and protocols. However, their lack of contextual awareness and overwhelming focus on individual packets made them vulnerable to complex attacks like IP fragmentation.

The Emergence of Stateful Inspection

The 1990s saw the advent of stateful inspection firewalls, pioneered by Check Point. These second-generation firewalls continuously monitored the state of connections, ensuring that packets were part of an established session. This enhancement significantly bolstered security.

Application Layer and Proxy Firewalls

Application layer firewalls and proxy firewalls emerged around the same time. The former operated at Layer 7, able to analyze and apply application-specific data and rulesets. They were also highly secure – boasting the ability to completely separate traffic requests from the underlying network architecture – but early models suffered from limited processing power and bad latency.

Unified Threat Management (UTM) and Next-Generation Firewalls (NGFW)

The 2010s saw the advent of UTM systems, which sought to combine a firewall’s reactivity with the extra data points from antivirus, intrusion detection, and other enterprise security systems. NGFWs were able to push these integration capabilities by adding deep packet inspection, advanced threat protection, and application-level filtering.

Modern Adaptations: Cloud and AI

Today, firewalls have adapted to cloud environments and containerized applications, giving rise to Firewall-as-a-Service (FWaaS). Building upon the foundation of cross-environment data, AI and machine learning are increasingly being deployed for their superior anomaly detection, predictive threat analysis, and adaptive policy enforcement.

From static filters to intelligent, context-aware systems, firewalls have continuously evolved to meet the demands of an ever-changing threat landscape. Let’s delve into all the features that make today’s firewalls so critical.

不同類型的防火牆

封包篩選

Packet filtering is a network security technique used in firewalls to control data flow between networks. It evaluates the headers of incoming and outgoing traffic against a set of predefined rules, and then decides whether to allow or block them.

Firewall rules are precise directives that form a critical part of firewall configurations. They define the conditions under which traffic is permitted or blocked based on parameters such as source and destination IP addresses, ports, and communication protocols. In enterprise environments, these individual rules are nested together to form Access Control Lists (ACLs). When processing traffic, the firewall evaluates each packet against the ACL rules in sequential order. Once a packet matches a rule, the firewall enforces the corresponding action—such as allowing, denying, or rejecting the traffic—without further evaluation of subsequent rules. This structured and methodical approach ensures that network access is tightly controlled and consistent.

代理服務

Since firewalls are happy to sit at the edge of a network, a proxy firewall is naturally well-suited to acting as a single point of entry: in doing so, they’re able to assess the validity of each connection. Proxy-service firewalls completely separate the internal and external, by terminating the client connection at the firewall, analyzing the request, and then establishing a new connection with the internal server.

Stateful Inspection

Stateful packet inspection analyzes the contents of a data packet and compares them to information about packets that have already traversed the firewall.

Stateless inspection analyzes each packet in isolation: stateful inspection, on the other hand, pulls in previous device and connection data to further understand network traffic requests. This is more akin to viewing network data as a continuous stream. By maintaining a list of active connections, and evaluating each from a more macroscopic perspective, stateful firewalls are able to assign network behavior to long-term user and device profiles.

網路應用程式防火牆

A Web Application Firewall (WAF) wraps around a specific application and examines the HTTP requests being sent to it. Similar to other types of firewall, it then applies predefined rules to detect and block malicious traffic. The components being scrutinized include headers, query strings, and the body of HTTP requests  – all of which contribute to signs of malicious activity. When a threat is identified, the WAF blocks the suspicious request and notifies the security team.

AI-Powered Firewall

Firewalls are essentially powerful analytical engines: they’re perfectly suited for the implementation of machine learning algorithms. Because ML algorithms are able to ingest and analyze far greater amounts of data far faster than their manual counterparts, AI-powered firewalls have consistently been able to outperform their older counterparts when handling novel (zero day) threats.

One of the more common implementations of AI within firewalls, for instance, is User and Endpoint Behavioural Analysis (UEBA). This ingests the historical data from entire networks, and establishes how every user and endpoint typically interacts with it – what resources they use, when they access them, etc.

High Availability Firewalls and Hyperscale, Resilient Load-Sharing Clusters

A high availability (HA) firewall is designed to maintain network protection even in the event of firewall failure. This is achieved via redundancy, in the form of HA clustering: multiple firewall peers working together to deliver uninterrupted protection. In the event of device failure, the system automatically transitions to a peer device, therefore maintaining seamless network security. Above and beyond traditional ‘high availability’ designs,  many organizations now need hyper scalable and telco-class resilient firewall systems to assure 99.99999%+ uptime and up to 1,000 Gbps of network throughput with full threat prevention.  An intelligent load-sharing firewall design distributes network traffic across a firewall cluster. It can also automatically reallocate additional firewall resources to critical applications during unexpected peak traffic conditions or other predefined triggers, and then reassign those firewall resources back to their original group after conditions are back to normal. This optimizes performance and prevents any single device from becoming overwhelmed, and assures maximum network performance under all conditions.

Virtual Firewall

Firewalls were traditionally hardware-exclusive, as they needed the heavy CPU power to manually flick through every rule in the ACL. Now, however, that processing power can essentially be outsourced thanks to firewall virtualization. Virtual systems support internal segmentation: where one tool can be used to set up and monitor multiple segmented firewalls, allowing sub-firewalls to have their own security policies and configurations.

Virtual firewalls offer many advantages: multi-tenancy environments, for instance, benefit from this segmentation. It also allows for larger organizations to implement network segmentation in a more streamlined way, through one central tool. Other than that, virtual firewalls can offer all the same capabilities as their hardware-based counterparts.

雲端防火牆

It’s common to see people conflate virtualized firewalls with cloud firewalls, but there is a distinction: whereas virtual describes the underlying architecture, cloud firewalls refer to the enterprise assets they are protecting. Cloud firewalls are those used to protect organizations’  public and private cloud-based networks.

防火牆即服務 (FWaaS)

Since cloud virtualization now allows for processing power to be purchased and used remotely, virtual firewalls are now possible. This opens up new possibilities for firewall architecture – one of which is Firewall as a Service (FWaaS).

FWaaS, like any SaaS, is a pre-built firewall solution that is deployed through the cloud. Instead of all enterprise traffic being routed and analyzed via an in-house server room, FWaaS’ unique offering is often its global Points of Presence, which allows for more local (and latency-free) firewall deployment.

託管防火牆

Finally, it’s all well and good having a firewall – but as we’ll cover shortly, this tool needs continuous refinement and tweaking. Some enterprises find that the human demands of this can quickly overwhelm a lean cybersecurity team. So, many choose to route their traffic via a managed firewall – which is continuously monitored for threats, anomalies, or unusual traffic patterns. These outsourced firewalls can also benefit from the provider’s advanced tooling and threat intelligence.

The Importance of Firewall Protocols

Even basic firewalls are able to dig into the source, destination, and protocols that every packet is conforming to. But visibility alone doesn’t prevent attacks; firewall rules govern how the firewall tool reacts to each packet – ultimately either allowing it through to the enterprise network, or denying it.

These rules are fundamental to maintaining network security by controlling access to and from systems, ensuring that only authorized traffic passes through while malicious or unwanted data is blocked. To save time, most off-the-shelf firewalls offer preconfigured rulesets. After all, many threats are universal, regardless of the specifics of your industry or employees – especially when attackers are able to scan any public-facing networks for common vulnerabilities. By shipping with preconfigured rulesets, modern firewalls allow for an immediate reduction in potential threats that could hit your enterprise; a boon to deployment, allowing administrators to cut a lot of manual setup that a new tool typically demands. This reduces errors and ensures adherence to industry best practices.

為什麼我們需要防火牆?

Firewalls, especially Next Generation Firewalls, focus on blocking malware and application-layer attacks. Along with an integrated intrusion prevention system (IPS), these Next Generation Firewalls are able to react quickly and seamlessly to detect and combat attacks across the whole network. Firewalls can act on previously set policies to better protect your network and can carry out quick assessments to detect invasive or suspicious activity, such as malware, and shut it down. By leveraging a firewall for your security infrastructure, you’re setting up your network with specific policies to allow or block incoming and outgoing traffic.

Firewall Security Best Practices

Firewalls aren’t a set-it-and-forget-it solution. The attacks facing your organization are in constant flux, and firewalls that rely solely on manual rule updates demand just as much time and attention.

Set Up Rules According to Least Privilege Principles

Foundational to effective firewall rule management is the principle of least privilege. It functionally means only traffic that serves a specific, necessary business function is allowed. By adhering to this principle, it’s all but guaranteed that future rule changes minimize risk, maintain greater control over network traffic, and limit unnecessary cross-network communication. Applying this to rules demands that details such as source and destination IP addresses (or ranges) and destination ports are always defined. This is why overly permissive rules like “Any/Any,” need to be replaced with an explicit deny/allow strategy for all inbound and outbound activity.

Maintain Up To Date Documentation

As pre-configured rules are changed and updated, clear and comprehensive documentation is essential. Anyone on the network security team should easily understand the purpose of each rule from the documentation. At a minimum, you should record details such as the purpose of the rule, the services it affects, the users and devices involved, the date it was implemented, the rule’s expiration date if temporary, and the name of the analyst who created it.

Protect the Firewall Itself

The firewall isn’t just a critical piece of enterprise safety: it’s the most public-facing piece of any network infrastructure, making unmanaged firewalls themselves a threat. To secure the firewall, a few key best practices are mandatory: insecure protocols like telnet and SNMP should be disabled entirely; configurations and log databases should be backed up; and a stealth rule should be implemented to protect the firewall from network scans. Finally, keep a regular eye on the updates available for the firewall solution.

Group Rules – and Networks – into Corresponding Categories

Segmenting enterprise networks into corresponding security levels is another foundational best practice for network security, and firewall rules are perfectly well-suited for enforcing these segments. To streamline management, organize rules into categories or sections based on their function or related characteristics. This approach allows you to structure the rules in the most effective order and ensures better oversight.

AI-powered firewalls are increasingly able to automate the rules and documentation they’re based on: these massive strides in efficiency are the main reason why NGFWs are replacing their older models.

網路層與應用程式層檢查

網路層或封包過濾器在 TCP/IP 協定堆疊的相對較低層級檢查封包,不允許封包通過防火牆,除非它們與已建立的規則集匹配,其中規則集的來源和目標基於 Internet 協定 ( IP)位址和連接埠。執行網路層檢查的防火牆比執行應用程式層檢查的類似裝置效能更好。缺點是不需要的應用程式或惡意軟體可以通過允許的端口,例如通過網絡通訊協定 HTTP 和 HTTPS,連接埠 80 和 443 分別通訊埠進行輸出網際網路流量。

NAT 和 VPN 的重要性

防火牆也執行基本的網路層級功能,例如網路位址轉換 (NAT)和虛擬私人網路 (VPN)。網路位址轉換將可能位於 RFC 1918 中定義的「私人位址範圍」內的內部用戶端或伺服器 IP 位址隱藏或轉換為公用 IP 位址。隱藏受保護裝置的位址可以保留有限數量的 IPv4 位址,並且可以防禦網路偵察,因為 IP 位址對 Internet 是隱藏的。

類似地,虛擬私人網路 (VPN)將專用網路延伸到隧道內的公共網路上,該隧道通常經過加密,封包的內容在穿越網路時受到保護。這使用戶能夠透過共享或公共網路安全地發送和接收資料。

次世代防火牆及以後

第三代防火牆在 TCP/IP 堆疊的應用程式層級檢查封包,能夠識別 Skype 或 Facebook 等應用程序,並根據應用程式類型強制執行安全性策略。

如今,UTM(統一威脅管理)裝置和次世代防火牆還包括威脅防護技術,例如入侵防禦系統(IPS)防毒軟體,以偵測和防止惡意軟體和威脅。這些裝置還可能包括沙箱技術來偵測文件中的威脅。

As the cyber security landscape continues to evolve and attacks become more sophisticated, Next Generation Firewalls will continue to be an essential component of any organization’s security solution, whether you’re in the data center, network, or cloud.

Protect your network using Check Point’s Quantum NGFW –  the most effective AI-powered firewalls, featuring the highest rated threat prevention, seamless scalability, and unified policy management.

Combining cutting-edge threat prevention, unparalleled performance, and streamlined efficiency, Check Point Quantum’s advanced capabilities include intelligent traffic inspection, seamless integration with cloud services, and in-depth incident automation. See for yourself how Quantum boasts effortless scalability and centralized policy management with a demo.

To learn more about the essential capabilities your Next Generation Firewall needs to have, download the Next Generation Firewall (NGFW) Buyer’s Guide today.