---
title: "Virtual routers and separate networks: how to limit the impact of an incident"
description: "Virtual routers, VLANs, and firewalls: how we separate applications, data, administration, and agents in a network with controlled access."
canonical: https://i8.ro/en/blog/virtual-routers-and-separate-networks-limiting-incident-impact
---

# Virtual routers and separate networks: how to limit the impact of an incident

> Virtual routers, VLANs, and firewalls: how we separate applications, data, administration, and agents in a network with controlled access.

Source: https://i8.ro/en/blog/virtual-routers-and-separate-networks-limiting-incident-impact

**Series II: From infrastructure to agentic commerce projects in production. Episode 03 of 20.**

In [the previous episode](https://i8.ro/en/blog/virtual-machines-containers-or-kubernetes-how-much-infrastructure-do-we-need), we chose where the components of a fictional B2B portal for requests and documents might run. Now we’re deciding who can talk to whom. The main decision isn’t how many networks we draw, but which connections are needed for each function and where to block the others. Useful segmentation reduces the paths an incident could spread through, but its effectiveness depends on configuration and testing.

## What the virtual router, VLAN, and firewall do

A **virtual router** is software that typically runs on a virtual machine and routes traffic between networks. It may include a **firewall**, meaning rules that allow or block connections based on source, destination, protocol, and port. pfSense is an example of a product that can run virtualized; its use here is illustrative, not a universal recommendation.

A **A VLAN** logically separates traffic on a shared switch infrastructure. It helps organize zones, but just having a VLAN tag doesn't determine which connections are allowed between them. That requires rules set along the real traffic path. Moreover, two processes in the same network or on the same host can communicate without passing through the router between VLANs. In those cases, you may need rules on the host or on the container platform. Netgate documentation also highlights port configuration mistakes and untagged traffic issues.

By **segmentation** we mean both the separation of zones and enforcing policy at their boundaries. NIST treats segmentation, traffic control, path redundancy, and monitoring as parts of the secure configuration of a virtual network. An academic study on local network protection shows why only monitoring the internet link might miss internal traffic movement. This motivates internal controls, not the belief that any specific topology blocks all attacks.

## Portal zones in our scenario

**Hypothetical scenario:** a company receives requests via the portal’s public interface, processes them in the API, and stores documents in a separate service. The team uses AI development agents for code and tests; later, the portal might use an integrated agent to suggest request classifications. The two agents have different roles and shouldn’t automatically be placed in the same zone or treated as having equal rights.

We propose five work zones: public entry for the interface, application for API and its processes, data for the database and documents, admin for operators, and development & test for team tools. If the integrated agent runs separately, we list its own connections to the API and to any external model provider. We don’t give it direct access to the entire data zone just because it’s part of the portal.

Zones can be implemented using VLANs, virtual networks, dedicated interfaces, or controls provided by a cloud provider. The exact setup depends on the environment chosen in the first two episodes. The rule stays the same: only open justified flows and check the actual packet paths. A private database isn’t secure just because its address isn’t public.

In a hybrid architecture, the link between the office and cloud is also a boundary to monitor. Passing through a protected tunnel doesn’t justify any system on one side accessing everything on the other. We list both connection endpoints, rules in both environments, and who can change routing. If the link goes down, the portal must behave predictably for users.

## Minimal traffic matrix

Before implementation, the team documents the flows in a matrix. The ports below are indicative; actual ones are confirmed by the application’s configuration, including for auxiliary services. “Allowed” means a rule limited to the specified destination and purpose, not general access to the zone.

| Source → destination | Protocol and port | Purpose | Responsible |
| --- | --- | --- | --- |
| User → public entry | HTTPS, 443 | Submitting requests | Application team |
| Public entry → API | HTTPS, configured port | Passing the request | Application team |
| API → database | Database protocol, configured port | Reading and saving data | Application team |
| Operator via VPN → admin | Approved protocol and port | Authorized maintenance | The IT administrator |
| Test environment → approved services | HTTPS, 443 | Testing and development tools | Development lead |
| Portal agent → approved model service | HTTPS, 443, if required | Classification proposal | Application owner |

**VPN** means a protected private connection for operator access. The table is not an exhaustive list of rules: DNS, time sync, updates, monitoring, and backups may require their own flows. Each is added with destination, port, purpose, and owner. Outbound traffic to the internet deserves the same scrutiny as inbound: a development agent may need a code repository and a model service, but not unlimited production network access. The agent integrated into the portal may have a different list of destinations. Network restrictions don’t replace identities and permissions, which we’ll discuss in the next episode.

## What we check before declaring isolation

We start with a **default deny** policy: only documented traffic is allowed, everything else is blocked. However, we don’t assume that installing a product automatically sets this policy everywhere. For example, Netgate’s documentation describes configurations where outbound LAN traffic is allowed by default. Actual rules must be checked on every interface, including automatic exceptions and IPv6 traffic.

The test has two parts. We confirm legitimate flows work, then attempt connections from each zone that should be rejected: public interface to administration, development environment to the production database, and the portal agent to unapproved services. Logs are checked and tests are repeated after changes. A connection failure could have many causes; logs and the network path help prove the intended rule acted. On the same host, we also check the hypervisor's virtual network, network bridges, and any policies at process or container level.

The virtual router also introduces operational dependency. If it runs on the same host as the portal, shutting down that host can interrupt both the app and routing. We keep a protected backup of the configuration, controlled recovery access, and a rollback plan for incorrect rules. Redundancy should be designed and tested if availability requirements justify it; two interfaces in a diagram don’t automatically create a resilient system.

The practical outcome is a map of real zones and routes, along with a matrix of source, destination, port, purpose, and owner. For each exception, note who approves it, when it’s reviewed, and how its removal is tested. This gives the team a verifiable basis for implementation and incident analysis, without promising perfect isolation. In the next episode, we’ll define the identities and secrets that authorize these connections.

## Sources

- [NIST SP 800-125B, *Secure Virtual Network Configuration for VM Protection* (March 2016)](https://csrc.nist.gov/pubs/sp/800/125/b/final), about segmentation, firewalls, redundancy, and monitoring.
- [Netgate, *Virtualization*](https://docs.netgate.com/pfsense/en/latest/virtualization/index.html) and [*VLANs and Security*](https://docs.netgate.com/pfsense/en/latest/vlan/security.html), documentation consulted on October 5, 2026.
- [Netgate, *Firewall Rule Best Practices*](https://docs.netgate.com/pfsense/en/latest/firewall/best-practices.html), on default deny and LAN configuration.
- [Rietz et al., *An SDN-Based Approach to Ward Off LAN Attacks*, Journal of Computer Networks and Communications (2018)](https://doi.org/10.1155/2018/4127487), academic context on internal traffic and the limits of perimeter monitoring.
