Network: segmentation, links and external access
A zone plan and flow matrix with default deny, health checks for two internet links with a plan for services tied to the address, and a session-recording gateway with time-limited accounts for external vendors.
A flat network in which a guest, a workstation and a server receive addresses from one pool lets malware on any device connect over SMB, RDP and WinRM to servers and virtualisation hosts, with no blocking and no record. This document covers three related elements of the network edge and interior: a split into zones with a matrix of allowed flows, two internet links with a health check and a plan for services tied to the public address, and remote access for vendors through a session-recording gateway.
Network segmentation
VLAN plan
A VLAN only splits a broadcast domain. Segmentation means zones of different trust levels, traffic between them passing through a device that can filter and log it, and rules with default deny.
An example plan in the 10.10.0.0/16 range: the VLAN number equals the third octet of the subnet start, and the /23 workstation subnet also spans octet 31. The address 10.10.50.23 immediately identifies a printer or an IoT device.
| VLAN | Zone | Subnet | Gateway | Contents |
|---|---|---|---|---|
| 10 | Management | 10.10.10.0/24 | 10.10.10.1 | switch and access point interfaces, remote consoles, Hyper-V host management network, UPS, administrators’ jump host |
| 20 | Servers | 10.10.20.0/24 | 10.10.20.1 | domain controllers, file and application servers, databases |
| 30 | Workstations | 10.10.30.0/23 | 10.10.30.1 | employees’ computers and laptops, up to 510 addresses |
| 40 | VoIP | 10.10.40.0/24 | 10.10.40.1 | IP phones |
| 50 | Printers and IoT | 10.10.50.0/24 | 10.10.50.1 | printers, cameras, card readers, room displays |
| 60 | Guests | 10.10.60.0/24 | 10.10.60.1 | guest devices and personal phones, internet only |
| 70 | DMZ | 10.10.70.0/24 | 10.10.70.1 | services exposed to the internet: reverse proxy, mail gateway |
| 80 | Cluster (optional) | 10.10.80.0/24 | 10.10.80.1 | Kubernetes nodes, traffic to services through entry points |
Conditions without which the plan does not work:
- The gateway of every subnet is on the firewall. Routing through a layer 3 switch requires ACLs between VLANs or redirection of inter-zone traffic to the firewall.
- VLAN 1 carries no user traffic, the native VLAN on trunks is an unused number, and unused ports are disabled or placed in an empty VLAN.
- DHCP runs in the server zone and the firewall relays requests from the other zones to it (DHCP relay). The guest network can have its own DHCP on the firewall and external DNS servers.
- Client isolation is enabled on the guest wireless network.
Flow matrix
In the matrix a row is the source and a column the destination. Anything not in it is blocked and logged. The cluster zone (VLAN 80) is added as another row and column, and its rules follow from the cluster’s network policies.
| Source → destination | Management | Servers | Workstations | VoIP | Printers/IoT | DMZ | Internet |
|---|---|---|---|---|---|---|---|
| Management | — | admin | admin | admin | admin | admin | updates |
| Servers | selected | — | selected | SIP, RTP | no | selected | |
| Workstations | no | services | — | no | 443 | via filter | |
| VoIP | no | SIP, RTP | no | — | no | no | SIP provider |
| Printers/IoT | no | scan (SMB) | no | no | — | no | no |
| Guests | no | no | no | no | no | no | yes |
| DMZ | no | selected | no | no | no | — | selected |
| Internet | no | no | no | no | no | 443, 25 | — |
“Admin” means SSH, RDP, WinRM and HTTPS to management interfaces, only from the jump host. “Selected” means specific hosts and ports with a rule owner, for example the backup server to the Hyper-V hosts. “Services” for workstations is the set of ports required by the domain and application servers; the values follow the Microsoft documentation on Windows Server service ports.
| Rule destination (workstations, 10.10.30.0/23) | Protocol and port | Purpose |
|---|---|---|
| domain controllers, 10.10.20.10-11 | UDP/TCP 53 | DNS |
| domain controllers | UDP/TCP 88, 464 | Kerberos, password change |
| domain controllers | UDP/TCP 389 | LDAP |
| domain controllers | TCP 636, 3268-3269 | LDAPS, global catalogue |
| domain controllers | TCP 445 | SYSVOL and NETLOGON, that is Group Policy |
| domain controllers | TCP 135, 49152-65535 | RPC |
| domain controllers | UDP 123 | time |
| file server, 10.10.20.20 | TCP 445 | file shares |
| application server, 10.10.20.30 | TCP 443 | web application |
| entire internal network, 10.10.0.0/16 | any | block with logging, as the last rule |
This is an excerpt: the printer and DMZ rules from the matrix are added before the final block. Traffic within a zone (the diagonal of the matrix) does not pass through the firewall. Between workstations it is limited by Windows Firewall, with inbound SMB, RDP and WinRM allowed only from the management zone. In the cluster the equivalent is a default-deny NetworkPolicy: by default pods accept all traffic, and the block only comes from such a policy, provided the cluster’s network plugin enforces NetworkPolicy.
Two internet links
Link independence and operating mode
Redundancy exists when the links share no single point of failure. Two links from the same provider often enter the building through the same cable, and two fibres from different providers may run through the same duct, so each provider has to be asked about the route of its connection when ordering.
A reasonable minimum is a wired primary link and a backup link of a different type, cellular or radio, from another provider. The backup can have lower bandwidth because it only has to sustain critical services. The router, the LTE modem and the fibre terminal must be powered from a UPS, because a short power cut would otherwise disable both links at once.
With an LTE backup link that has a data cap, failover is the right choice: the link is used only during an outage, and services tied to an address run from a single address otherwise. Load balancing makes sense with two wired links of similar bandwidth, provided that traffic to services tied to an address always leaves through one designated link.
Link health check
Monitoring a link by polling the provider’s gateway is a common mistake: the gateway also answers when the fault is further inside the provider’s network, so no failover occurs and the internet does not work. The health check probes targets beyond the provider’s network, and each probe leaves through the link it evaluates.
The following excerpt applies to FortiGate with SD-WAN. The latency threshold is an example value: voice recommendations refer to one-way delay, while a probe measures round-trip time.
config system sdwan
config health-check
edit "internet"
set server "192.0.2.1" "198.51.100.1" # 2–3 public addresses of different organisations
set protocol ping
set interval 1000 # ms; fast detection without excessive traffic
set failtime 5 # 5 consecutive failed probes = outage (at 1 s: 5 s)
set recoverytime 120 # 120 successful probes = 2 min of stable operation before failback
set members 1 2
config sla
edit 1
set latency-threshold 150 # ms; above this voice calls become troublesome
set jitter-threshold 30 # ms
set packetloss-threshold 5 # %; the link is “alive” but unfit for work
next
end
next
end
end
The thresholds in the sla section (latency, jitter, packet loss) affect link selection only in an SD-WAN rule in SLA mode that references this health check. Without such a rule, failover happens only once the link is considered dead, so a link that works but is unfit for use keeps carrying traffic. Failback to the primary link is deliberately slower than failover so that an unstable link does not cause alternating switching.
Services tied to the public address
After failover, traffic leaves from a different public address, which affects every service that knows that address in a different way.
| Service | Behaviour on failover | Preparation |
|---|---|---|
| Name resolution (DNS forwarders) | forwarders at the primary link’s provider may not respond from the backup address | forwarders from two providers |
| Microsoft 365 with location-based Conditional Access | sign-in from an unknown address requires MFA or is blocked | backup address in named locations |
| Site-to-site VPN (IPsec) | the tunnel to the primary address stops working | second tunnel from the backup address, dead peer detection (DPD) |
| Remote worker VPN | clients connect to a name pointing to the primary address | name with a short TTL or a second server in the client profile; requires a public address on the backup link |
| Telephony (SIP trunk) | calls in progress are dropped, registration from the new address may be rejected | the telephony provider knows both addresses |
| Inbound mail, portals | unavailable at the primary address | second MX record, short TTL or an external intermediary; requires a public address on the backup link |
| Mail sent directly from the office | recipients check SPF for the new address | backup address in the SPF record |
| Partners with an address allow list (SFTP, API, bank) | connections rejected | both addresses reported to partners and documented |
For inbound services DNS gives the simplest protection. Senders retry delivery, according to RFC 5321 usually for at least 4–5 days, so mail without a second MX is delayed rather than lost. A second MX record at the backup link’s address shortens that delay to minutes, provided the mail server accepts connections through both links.
| Record in the example.com zone | Type | TTL | Value | Purpose |
|---|---|---|---|---|
example.com | MX | 3600 | 10 mx1.example.com. | inbound mail, primary link |
example.com | MX | 3600 | 20 mx2.example.com. | inbound mail, backup link |
mx1.example.com | A | 3600 | 192.0.2.10 | primary link address |
mx2.example.com | A | 3600 | 198.51.100.20 | backup link address |
vpn.example.com | A | 300 | 192.0.2.10 | remote worker VPN, short TTL, record switched during an outage |
example.com | TXT | 3600 | v=spf1 ip4:192.0.2.10 ip4:198.51.100.20 ~all | SPF: both addresses from which mail may be sent |
Priorities and alerting on the backup link
On the backup link, voice calls and VPN take priority, then cloud office services, and finally all other traffic. System updates and cloud backups are suspended while running on the backup link, because they can occupy the entire LTE bandwidth and exhaust the data cap within hours. This requires a QoS or SD-WAN rule that sends this traffic only to the primary link.
A link failover event must raise an alert for the team, because a company can run for a week on the backup link without knowing the primary has failed.
Remote access for vendors
Session-recording gateway
A vendor VPN account without restriction to specific machines gives access to the entire internal network, and after the session only the connection time remains. Such accounts are sometimes shared by all employees of the service company and stay active after the contract expires. The alternative is an access gateway and time-limited directory accounts, enabled for the duration of an engagement, which narrow access to specific machines, a specific person and a time window, with a recording of the session.
The gateway is a server in the demilitarised zone (DMZ) through which the vendor connects to selected machines. The vendor signs in to the gateway in a browser with a personal account and a second factor, and sees only the connections assigned to them: remote desktop or SSH to specific servers. The gateway establishes the connection on their behalf. The flow is as follows: the vendor from the internet, the gateway in the DMZ (MFA, recording, credential injection), the target server in the server zone, and recordings going to storage outside the gateway.
- Access to connections, not to the network. The firewall allows traffic to target servers only from the gateway address and only on the ports of the required protocols.
- Credentials injected by the gateway. The password of the account on the target server is stored in the gateway and supplied automatically, so the vendor does not know it.
- Session recording. Every session is recorded and the recordings go to storage outside the gateway.
- Personal accounts. Each vendor employee has their own account, even when connecting to the same server as others.
The gateway can be built on an open source solution, for example Apache Guacamole, which provides remote desktop, SSH and VNC in a browser together with recording, or a commercial privileged access management (PAM) system can be used. The design principles are the same. Selected parameters of an RDP connection in Guacamole:
| Parameter | Example value | Effect |
|---|---|---|
hostname | srv-app-01.corp.example.com | target server |
port | 3389 | RDP port |
username | svc-gw-erp | account on the server; only the gateway knows the password |
recording-path | /var/lib/guacamole/recordings | recordings directory |
create-recording-path | true | create the directory if missing |
disable-copy | true | no copying from the server to the vendor’s computer |
enable-drive | false | no drive mapping |
In Guacamole a graphical session recording is created in its own format, which the guacenc tool converts to a video file. For SSH the typescript-path parameter additionally saves a searchable text record of the terminal, compatible with the script command. The clipboard is enabled by default in Guacamole and is disabled with the disable-copy and disable-paste parameters; file transfer (drive mapping, SFTP) is disabled by default. The clipboard stays disabled and transfer is enabled for a specific connection when justified, because both allow data to be taken out.
On the target server, an inbound TCP 3389 rule created with New-NetFirewallRule and the -RemoteAddress parameter set to the gateway address allows remote desktop only from the gateway. The main protection is the firewall between zones, and the host rule is a second layer. Allow rules in Windows Firewall are cumulative, so a new rule restricts nothing as long as the default remote desktop rules allowing any source are enabled. They have to be disabled or narrowed to the gateway address; the name of the rule group depends on the system language.
Vendors have no connections to domain controllers or virtualisation hosts, and the gateway does not store credentials with domain privileges.
Time-limited accounts in Active Directory
If the gateway authenticates vendors in Active Directory, their accounts live in a separate organisational unit, OU=Vendors, and are disabled by default. The name has the form vnd-<vendor>-<person>, for example vnd-erp-jnowak, and the Manager field points to the employee responsible for the vendor contract. That employee approves engagements and is asked during a review whether the account is still needed. The end of a contract means deleting all of the vendor’s accounts, not only disabling them. The second factor is required on the gateway, for example through an external identity provider.
Approving an engagement means three actions: Enable-ADAccount enables the account, Set-ADAccountExpiration sets the expiry date and Set-ADUser -Description records the ticket number and the work deadline. When the work ends, the account is disabled with Disable-ADAccount, even if the expiry date has not yet passed. The expiry date is a safeguard in case someone forgets. Clear-ADAccountExpiration is not used for vendor accounts: an account without an expiry date is exactly the state the model is meant to eliminate.
The monthly review covers the list of enabled accounts in OU=Vendors with the AccountExpirationDate, LastLogonDate and Description properties. A correct result contains only accounts with an open engagement, each with an expiry date within the next few days. An account that is enabled without an expiry date, with a date in the past or with a LastLogonDate from months ago is to be disabled.
Decisions and alternatives
| Approach | When it makes sense | Limitation |
|---|---|---|
| VLANs without filtering between zones | not recommended | a VLAN only splits a broadcast domain; no filtering or record of inter-zone traffic |
| Zones with the firewall as gateway and default deny | all environments with servers, guests and IoT devices | requires maintaining the flow matrix and rules with an owner; traffic within a zone needs host firewalls |
| Routing through a layer 3 switch | with ACLs between VLANs or redirection of inter-zone traffic to the firewall | otherwise inter-zone traffic bypasses filtering |
| Failover with an LTE backup link | a link with a data cap, services tied to a single address | lower bandwidth; inbound services need a public address |
| Load balancing across two links | two wired links of similar bandwidth | traffic to services tied to an address must leave through the designated link |
| Health check with thresholds in an SD-WAN rule | a link may be “alive” but unfit for work | without a rule in SLA mode the thresholds do not influence link selection |
| Health check through the provider’s gateway | not recommended | the gateway answers despite a fault further inside the provider’s network |
| Recorded-session gateway, personal and time-limited accounts | vendor access to selected servers | the gateway is a high-value target and needs its own maintenance |
| Commercial PAM system | a larger number of vendors, audit requirements | licence and maintenance cost; same design principles |
| Vendor VPN account to the whole network | not recommended | no restriction to machines, no session record, shared accounts with no end of validity |
Implementation
-
Zone plan: assign VLAN numbers, subnets and gateways on the firewall, remove user traffic from VLAN 1, set an unused native VLAN on trunks, disable unused ports, configure DHCP relay and client isolation on the guest network.
-
Flow matrix: enter rules for specific services with an owner for each rule, a final block with logging, Windows Firewall on workstations and a default-deny NetworkPolicy in the cluster. Check: the block log after the first days reveals services omitted from the matrix.
-
Segmentation test from a computer connected in turn to the workstation zone and to the guest network, after confirming the address belongs to the correct zone (
Get-NetIPAddress -AddressFamily IPv4). A correct result isFalsein every row. From the guest network this applies to every internal address; from the workstation zone the only expected exception is port 445 on domain controllers and file servers, so they are not placed on the target list. A failed attempt takes about a dozen seconds, so a test of a dozen combinations takes a few minutes.$targets = '10.10.10.5', '10.10.10.21', '10.10.20.30' # switch, Hyper-V host, application server $ports = 22, 445, 3389, 5985 foreach ($target in $targets) { foreach ($port in $ports) { [pscustomobject]@{ Target = $target Port = $port Open = Test-NetConnection -ComputerName $target -Port $port -InformationLevel Quiet -WarningAction SilentlyContinue } } } -
Two links: order from different providers asking about the route of each connection, power the router, LTE modem and fibre terminal from a UPS, configure the health check with targets beyond the provider’s network and an SD-WAN rule in SLA mode, suspend updates and cloud backups on the backup link, set up an alert for failover.
-
Services tied to the address: walk through the services table and report the backup address to the telephony provider, to partners, in Microsoft 365 named locations and in the SPF record; add a second IPsec tunnel with DPD, a second MX and a short TTL for the VPN name.
-
Failover test once a quarter, during working hours, after warning the team, in two variants because they check different things. The first is disconnecting the primary link’s cable from the router port: the router detects the loss of carrier immediately and without the health check, so the test only confirms that the backup link takes over traffic and that the services in the table work from the new address. The second checks a fault beyond the provider’s gateway with the physical link up: it requires breaking the path behind the modem or fibre terminal, or a temporary rule rejecting traffic to the health check targets so that the router port stays active. Some provider devices shut down the Ethernet port when the signal is lost, so their behaviour has to be verified during the test. If the router does not switch traffic without manual intervention, the health check is probing the wrong target. After failover, the time from interruption to switching is measured and every item of the services table is checked; after the link is restored, the time for traffic to return and any repeated switching are checked. Discrepancies are corrected before the next test.
-
Vendor gateway: the firewall allows traffic to target servers only from the gateway address, the default remote desktop rules on servers are disabled or narrowed, MFA works for all gateway accounts, and recordings go to storage outside the gateway. Check: a connection attempt to a target server from an address other than the gateway is rejected.
-
Vendor accounts: the
OU=Vendorsunit, accounts disabled by default, a procedure for enabling them for the duration of an engagement with an expiry date, a monthly review of the list of enabled accounts and a spot review of one recording a month compared with the content of the ticket. Recordings that nobody watches have value only after an incident, and the review catches actions beyond the engagement before they become an incident.
Limitations and pitfalls
- Traffic within a zone bypasses the firewall. The flow matrix does not cover communication within one subnet, so a compromised workstation still sees the others. Windows Firewall on workstations and NetworkPolicy in the cluster limit this, and the latter works only with a network plugin that enforces it.
- CGNAT on an LTE link. The provider assigns an address from shared space (100.64.0.0/10), and inbound ports usually cannot be opened through CGNAT, so remote worker VPN and inbound mail do not work on the backup link. They require a public, non-shared address, for example a separate service or a separate APN, and replies must return through the same link the request arrived on, which requires source-address-based routing.
- A running session after account expiry. Expiry or disabling of an account blocks new sign-ins but does not end a session already in progress. When the time window closes, active sessions on the gateway are closed manually or a maximum session duration is set.
- The gateway as a high-value target. It has access to many servers and stores credentials. It requires updates, MFA for all accounts, including administrative ones, and a separate administrative account consistent with the tiering model.
- Recordings as personal data. A session recording processes the personal data of the vendor’s employee. It requires informing the vendor in the contract, a defined legal basis and a limited retention period, for example 90 days.