Writeups/Lab Notes/Networking

Networking • Security • Infrastructure

Network Segmentation Basics

You do not segment a network because VLANs look impressive on a diagram. You segment it because every unnecessary pathway is another pathway a mistake, compromised device, or attacker may be able to use.

I can understand why a flat network seems reasonable, especially at home or in a small lab. Everything can find everything else, setup is easy & when you add a new device you normally do not have to think very hard about where it belongs.

The problem is that convenience is being created by trust. You are effectively saying that because two devices happen to be connected to the same network, they are allowed to have a pathway to each other. Most of the time nothing bad happens, so that decision becomes invisible.

Security gets interesting when one of those devices stops being trustworthy.

Shimori Principle

A network path is a form of permission. If a system does not need that path, there should probably be a reason before you give it one.

1. What segmentation actually means

Network segmentation is simply separating systems into groups & controlling communication between those groups. A VLAN, or Virtual Local Area Network, is one common way of creating that separation. A firewall can then decide what traffic is allowed to cross from one segment to another.

Think of a completely flat network like a building where every room opens directly into every other room. Segmentation adds hallways, doors & access rules. You can still move where you need to go, but being allowed into one room does not automatically mean you can walk into every other room in the building.

The analogy matters because segmentation is not supposed to make communication impossible. It is supposed to make communication intentional.

2. Why should I care if everything is already behind my router?

This is probably the most important question. People often think of the router or firewall at the edge of the network as the security boundary. Anything outside is untrusted & anything inside is trusted.

That model breaks down the moment something untrusted gets inside. Maybe a vulnerable IoT device is compromised. Maybe someone installs malicious software. Maybe credentials are stolen. Maybe a development service is exposed in a way you did not realize. The initial compromise does not automatically mean the attacker owns the entire environment, but a flat network can give them far more places to look.

From the attacker's point of view the logic is simple: I have one machine. What else can this machine reach?

That is lateral movement. The attacker is moving from the original foothold toward other systems, credentials, services or information that may be more valuable.

3. Separate by purpose, not because you can

It is easy to overdo this. Once you learn about VLANs, there is a temptation to create fifteen of them because fifteen feels more secure than five. I don't think that is automatically true.

I would rather have a few boundaries I can explain than a complicated network full of rules nobody remembers. A small environment might have trusted workstations, servers, lab systems, IoT devices, guests & a management network. Your environment may need fewer or more.

The useful question is always: what is different about the trust or purpose of these systems?

  • A guest phone probably needs Internet access but not access to your servers.
  • A smart television may need the Internet but has very little reason to initiate connections to your development workstation.
  • A workstation may need to reach a web application on a server without needing administrative access to every port on that server.
  • A management system may legitimately require access that ordinary devices should never receive.

4. Write the human rule before the firewall rule

One thing I really dislike is a firewall configuration full of addresses, ports & exceptions where nobody can explain what the policy is supposed to accomplish.

Before I touch the technical rule, I want to be able to write the intention in normal language.

Guests -> Internet
Guests -X-> Internal systems
IoT -> Internet only where required
Workstations -> Selected internal services
Management -> Administrative interfaces
Servers -> Required service-to-service traffic

Now the firewall syntax has a job. It is implementing a decision we already understand.

This also makes troubleshooting much easier. If something fails, I can compare what happened with what was supposed to happen instead of staring at a pile of rules & guessing.

5. Explain the attacker's logic

Being a small target does not mean much if you are also an easy target. An attacker does not necessarily need to know who you are or care about you personally. Automated scanning, commodity malware & opportunistic attacks can make the cost of checking another target extremely low.

Once access exists, information itself can be useful. A hostname can reveal what a machine does. An open port can reveal a service. A file share can reveal names, projects or credentials. A failed login can still tell someone that an account probably exists.

In the cyber world knowledge is power & sometimes knowing what something isn't can be just as valuable as knowing what it is.

Segmentation does not magically stop an attacker, but it can remove information & pathways they would otherwise receive for free.

6. DNS & naming become more important

DNS stands for Domain Name System. In simple terms, it lets us use understandable names instead of memorizing IP addresses. Once a network becomes segmented, good naming becomes even more useful because systems are no longer just an anonymous pile of devices.

I want a name to help me understand what I am connecting to. I also want services to be able to move without forcing me to hunt through every client configuration because an IP address changed.

Good naming is not glamorous security work, but understandable systems are easier to defend.

7. Do not tighten blindly

You can absolutely make segmentation so strict that you break everything. Then people get frustrated, create broad allow rules & the security design slowly disappears.

I prefer to understand normal traffic first. What does the application actually need? Which side initiates the connection? Which port is involved? Is DNS working? Is the firewall denying the connection or is the service itself failing?

Logging matters here. A denied connection that leaves evidence is a problem you can investigate. A connection that simply disappears into the void encourages people to disable controls just to see if that fixes it.

Practical Rule

A security control only matters if people can operate & troubleshoot the system with that control still enabled.

8. A simple example

Imagine I have a development workstation, a server, a smart television & a guest phone. On a flat network all four may be able to directly discover or contact each other.

What do I actually need?

The workstation needs a few services on the server. The television needs Internet access. The guest phone needs Internet access. The server may need updates & perhaps a few outbound services.

Nothing in that requirement says the television needs a pathway to the server. Nothing says the guest phone should be able to probe the workstation. Those connections exist only because the flat network gave them away by default.

Segmentation is the process of removing those assumptions.

9. Small networks still benefit

You do not need an enterprise rack, a security operations center or a giant company to use this idea. In fact, a home lab is a great place to learn it because you can see the entire environment & intentionally break things without taking down a business.

The objective is not to cosplay an enterprise network at home. It is to learn how trust works.

Make trust visible

The thing I want from a network is not maximum complexity. I want to understand why systems can communicate.

If two devices can reach each other, there should ideally be a reason. If they cannot, I should be able to find the control responsible. If something is compromised, I want the surrounding architecture to limit how much free access that compromise provides.

That is what segmentation gives me: fewer assumptions, clearer pathways & a network where trust is something I intentionally design instead of something I accidentally inherit.

← All WriteupsRelated Project