iTranslated by AI
A core concept behind perimeter security
TL;DR
- I want to write about the basic concepts of perimeter security as a precursor to discussing Zero Trust.
- The key point is NAT (NAPT), and a certain level of network security is achieved through its asymmetry.
- While enterprise networks may not be this simple, most home networks can be considered reasonably secure thanks to this asymmetry.
Introduction
As concepts like Zero Trust Networking have become more prevalent, I personally feel that traditional approaches involving keywords such as firewalls, IPS/IDS, and WAN/DMZ/LAN have conversely come to be known as "perimeter security."
So, I've decided to write down the basic concepts of that perimeter security.
Basic Functions of a Firewall
Firewalls are components present in almost all networks, providing the functionality to allow or deny communication based on protocols such as UDP/TCP, port numbers, and IP addresses.
As the name "firewall" implies a kind of "wall," it distinguishes between the "inside" and "outside," allowing for control over what communication is permitted between them.
The area inside this wall is treated as the LAN, "Trust" (based on the idea that the inside of the wall is reliable), or the internal corporate network.
Conversely, the outside is the WAN, "Untrust" (the opposite of Trust), the internet, or the side where malicious actors might reside.
Based on this concept, it is, I believe, referred to as "perimeter security."
DMZ
I'll set this aside for a moment.
It stands for DeMilitarized Zone, a term derived from military parlance, and refers to a segment established between the outside and the inside of a firewall.
Placing a firewall between these multiple types of networks is the fundamental concept of perimeter security.
Inside the Firewall
The area inside the firewall is considered a trusted network and serves as the internal corporate network.
When you go to the office, connect to the company Wi-Fi, and perform various tasks, the network you are connecting to is, in most cases, the internal network.
However, since most modern work involves connecting to the internet, it is necessary to establish allow rules from the inside → outside of the firewall to communicate with the internet.
Outside the Firewall
The area outside the firewall is the network known as the internet, where a diverse array of users and organizations exist.
Among them are malicious actors, often referred to as hackers or crackers. The deny rules from the outside → inside of the firewall serve the function of protecting against attacks from such individuals.
Private IP Addresses and Public IP Addresses
Although there are many exceptions, the inside of the firewall typically uses private IP addresses like 192.168.1.4/24, while the outside has public IP addresses like 203.0.113.4/24.
Private IP addresses are used within closed (= private) networks such as internal corporate networks and cannot connect directly to the internet as they are.
Communication on the internet side is conducted using public IP addresses, and it is managed which organization owns or uses which public IP address.
Therefore, in order for you to use the internet for work, it is necessary to convert from a private IP address to a public IP address when moving from the inside → outside of the firewall.
NAT, SNAT, NAPT
This mechanism of IP address translation from the inside to the outside of the firewall is called Network Address Translation (NAT).
It is sometimes referred to as Source NAT (SNAT) or Network Address Port Translation (NAPT), but they are essentially the same thing.
While NAT by definition is 1-to-1 NAT—converting one private IP address to one public IP address—in practice, multiple private IP addresses are often converted to a single public IP address.
For more details, please refer to resources such as What is NAPT (IP Masquerade / PAT).
The important point here is that NAT when exiting the internal corporate network to the internet is 1-to-many (from private to public IP addresses), and the direction is limited from the inside → outside.
In other words, while communication from a PC connected to the internal network can be translated from a private IP address to a public IP address to reach the internet, conversely, if malicious actors on the internet attempt to communicate with that public IP address used for NAT, the reverse translation is not performed.
Even though there are malicious actors on the internet, it can be said to be reasonably secure as long as the firewall does not permit communication from the outside.
This is not limited to corporate internal networks; the same can be said for home Wi-Fi.
When you connect your smartphone to your home Wi-Fi, you are able to connect to the internet because the Wi-Fi router implements this NAT mechanism.
On the other hand, since Wi-Fi routers generally do not have settings to allow communication from the outside → inside, your smartphones can also be considered secure in that regard.
VPN
The configuration of using a VPN to access the corporate network from home or a cafe has been widely used for a long time.
However, by its nature, the VPN router used for this (though a firewall often performs this function) must have a public IP address.
Having a public IP address means there is a possibility of receiving attacks from malicious actors.
Does a VPN router really need a public IP address?
Well, yes, it could be placed behind a firewall with NAT, but here we are assuming an extremely simple—or rather, straightforward—architecture...
Describing it as "Relatively Safe because There Is Only Inside-to-Outside Communication"
To give some concrete examples, the comparison between an Azure VM with a Public IP address (which is similar to a global IP address) and Azure Virtual Desktop (AVD), as well as the comparison between VPN Gateway and Microsoft Entra Private Access (MEPA, the ZTNA solution provided by Microsoft), can be explained from the same perspective.
-
Azure VMs with Public IP Addresses vs. Azure Virtual Desktop (AVD)
For an Azure VM with a Public IP address, you need to allow communication from the internet side to that Public IP address to access it. Even if you restrict the source IP addresses, the risk level is considered to be somewhat high.
On the other hand, in AVD, an agent called RDAgent only communicates from within the VNet to the AVD control plane—that is, communication only goes from inside → outside. Therefore, its risk level can be said to be relatively low.
Of course, NAT is performed internally for this inside → outside communication. -
VPN Gateway vs. Microsoft Entra Private Access
Similarly, because VPN Gateway utilizes a VPN, it has a Public IP address, and communication to it must be allowed from the internet side.
On the other hand, MEPA only involves communication from the VNet or on-premises network to the Secure Service Edge (SSE)—again, inside → outside communication. Thus, its risk level is also relatively low.
I often describe this as "relatively safe because there is only inside-to-outside communication."
Conversely, when outside → inside communication is required, it necessitates tasks or procedures often called "opening ports" (port forwarding), which involves allowing some communication from the internet, thereby increasing security risks.
Summary
I often skip all the background knowledge and just explain, "VPNs are risky because they require outside-to-inside communication, but MEPA is more secure because it only needs inside-to-outside HTTPS," but I wrote this article because the "why" might have been missing. This is a preliminary discussion before moving onto the topic of why ZTNA might be better than VPN, based on the difference in security risks rooted in the asymmetry of communication permitted by NAT. While I suspect there are few network configurations left where such a simple explanation is applicable, I wanted to provide some textbook-style fundamental content.
References
- What is NAPT (IP Masquerade / PAT)
-
Should we compare perimeter security and zero trust networks?
This is the article I was planning to write, and I created the one you are currently reading as a separate piece because it seemed like the introduction would get too long if I included it there.
Discussion