Course menu

Module 1: Introduction to Network SecurityLesson 1.3 (3 of 3 in this module)3 of 10 in the Fortinet Fundamentals course

Firewall placement, segmentation and zero trust

Deployment modes, north–south and east–west traffic, zones, DMZs, segmentation and zero-trust ideas.

Beginner · 18 min read

Written for FortiOS 7.6 · FortiOS 7.4: concepts unchanged

Exam domain: NSE 4 (FortiOS 7.6) · Deployment and system configurationFundamentals

Before this: Network segmentation, Stateless, stateful and next-generation firewalls

What you will learn

After this lesson, you can choose where a firewall belongs (edge, internal segmentation, data centre or branch), pick NAT or transparent mode for a FortiGate, and design zones, a DMZ and an internal segmentation policy table that follows least privilege.

  • NAT vs transparent
  • North–south / east–west
  • Zones and DMZ
  • Zero trust

Firewall placement is the decision about which network boundaries a firewall enforces: between the organisation and the Internet (north–south traffic), and between internal segments such as users, servers and a DMZ (east–west traffic). Placement decides which traffic the firewall can see, and a firewall can only control traffic that passes through it.

In simple terms: A firewall protects only the doors it stands in. Placement is choosing which doors.

A real-life situation

Harbourline Foods, a fictional company, has one FortiGate at its head office. Staff browse the Internet, and customers reach a web shop in the DMZ. The company now moves its database off the web server onto a new server, DB1. Where should DB1 go? On the staff LAN it would be one compromised laptop away from every customer record. In the DMZ it would share a segment with the Internet-facing web server. The right answer is a new segment for servers, with the FortiGate between it and everything else, and a short list of allowed connections. That is firewall placement and segmentation, and this lesson ends with that exact design.

The examples use the course lab:

port1203.0.113.0/30port210.0.1.0/24port310.0.2.0/24InternetISP gateway 203.0.113.1FGT1FortiGateSW1LAN switchSW2DMZ switchPC1LAN · 10.0.1.10WEB1DMZ · 10.0.2.10
  1. 1. North–south: PC1 (10.0.1.10) browses the Internet through port1.
  2. 2. East–west: PC1 reaches WEB1 (10.0.2.10) in the DMZ, through FGT1.

Why placement matters

A firewall decides only for traffic that passes through it. Two hosts in the same subnet talk to each other directly through the switch, so a firewall in another part of the network doesn't see that traffic. Placement therefore answers two questions: which boundaries need enforcement, and how traffic is forced through the firewall at each of them. In practice the answer is routing: the firewall is made the default gateway of each segment it protects, or sits in the only path between two parts of the network.

Learn more: Stateless, Stateful and Next-Generation Firewalls

North–south and east–west traffic

North–southEast–west
BetweenInside and outside (Internet, partners, cloud)Internal segments: users, servers, OT, guests
Lab examplePC1 → Internet via port1PC1 → WEB1, or WEB1 → DB1
VolumeLimited by the Internet linksOften much higher: file shares, backups, databases
Main riskAttacks from outside, data leavingLateral movement after one host is compromised
Classic controlEdge firewallInternal segmentation firewall, VLANs and policies

Older designs protected only north–south traffic and trusted everything inside. Modern attacks rarely stop at the first host: ransomware spreads from one laptop to file servers and backups over east–west paths. Controlling east–west traffic is what limits how far one compromise can spread.

Where firewalls are placed

PlacementWhat it protectsTypical concerns
Edge (perimeter)The boundary to the Internet: outbound access, published servers, VPN terminationSource NAT, virtual IPs, VPNs, SD-WAN, threat inspection
Internal segmentation (ISFW)Boundaries between internal segments, for example users and serversHigh throughput, low latency, many internal policies, identity
Data centreServer farms and application tiers (web, application, database)Very high session counts, HA, tight server-to-server rules
BranchA small site: local Internet access and the tunnel to head officeOne device doing everything: routing, VPN, SD-WAN, Wi-Fi and switch control
CloudWorkloads in a public cloud (a FortiGate VM)Cloud routing tables steering traffic through the firewall

These roles can be separate devices or one FortiGate doing several. In the course lab, FGT1 is both the edge firewall (port1 to the Internet) and an internal firewall (LAN to DMZ). That is normal in small and medium sites. Large networks usually separate the roles so each firewall can be sized and changed independently.

Deployment modes: NAT mode and transparent mode

Placement also decides how the FortiGate joins the network. FortiOS offers two operation modes, set per VDOM:

NAT mode (route mode)Transparent mode
Behaves likeA router with a firewall built inA bridge (Layer 2) with a firewall built in
Interface addressesEach interface has its own IP subnetTraffic interfaces have no IP; one management IP for the VDOM
ForwardingRouting tableMAC address table, within a forwarding domain
Readdressing neededYes: hosts use the FortiGate as their gatewayNo: it is inserted into an existing link
Policies and profilesYesYes
Typical useEdge, branch, most ISFW designs (the default)Adding inspection to an existing network without changing IP addressing

In NAT mode, "NAT" names the mode, not a requirement: each policy decides whether source NAT is applied. An ISFW policy between two internal segments normally has NAT off, so servers see the real client addresses. Transparent mode keeps the existing addressing, but the FortiGate is no longer a Layer 3 hop, so features that depend on routing, such as SD-WAN and dynamic routing, don't apply. A third option sits in between: a virtual wire pair joins two ports of a NAT-mode FortiGate as a bump in the wire, without changing the whole VDOM's mode.

Checking and changing the mode

get system settings | grep opmode

Shows the current mode of the VDOM you are in: nat or transparent. Read-only and safe to run.

Example output · based on Fortinet documentation; exact format varies by model and FortiOS version
FGT1 # get system settings | grep opmode
opmode              : nat
Illustrative output. nat is the default on a new FortiGate.

Switching a VDOM to transparent mode is done under config system settings, together with the management IP address and its default gateway (the FortiGate needs them to reach FortiGuard and to be managed, because the traffic interfaces no longer have addresses):

⚠ Changing the operation mode is disruptive

FortiOS refuses the change while the VDOM still has objects that depend on interface addresses or routing, such as firewall policies, static routes, virtual IPs, DHCP servers and VPNs: you must delete them first, so the change effectively starts from a near-empty configuration. Your management connection drops when the mode changes, because the interface addresses are removed. Do it only from the console or a separate management path, with a configuration backup, in a maintenance window, and check the exact procedure in the administration guide for your release.

config system settings set opmode transparent set manageip 10.0.1.99 255.255.255.0 set gateway 10.0.1.1 end

manageip is the address used to manage the FortiGate in transparent mode; gateway is the router it uses to reach other networks (here the existing LAN router). Field formats can differ slightly between releases; check the CLI reference.

FortiOS 7.6 and 7.4

NAT and transparent modes, per-VDOM operation modes and virtual wire pairs work the same way in FortiOS 7.4 and 7.6. Some features available in transparent mode vary by release; check the feature notes for your build before relying on one.

Zones and DMZ design

A DMZ (demilitarised zone) is a segment for servers that the Internet must reach, such as WEB1. It exists so that a compromised public server doesn't sit next to staff PCs. The rules that make a DMZ work:

  • Internet → DMZ: only the published services (for WEB1, HTTPS through a virtual IP).
  • DMZ → LAN: nothing by default. A web server rarely needs to open connections to staff PCs.
  • LAN → DMZ: only what staff and administrators need, for example HTTPS and SSH from an admin group.
  • DMZ → Internet: only what the servers need, such as operating system updates, not general browsing.

On a FortiGate, policies are written between interfaces. A zone groups several interfaces so one policy covers them all, which keeps the policy table short when segments get the same treatment. Traffic between interfaces of the same zone is controlled by the zone's intrazone setting:

config system zone edit "DMZ-ZONE" set interface "port3" set intrazone deny next end

intrazone deny (the default) blocks traffic between the zone's own interfaces unless a policy allows it; allow passes it without a policy. Add more DMZ interfaces later, for example a second DMZ VLAN, and every DMZ-ZONE policy covers them.

An interface that is already referenced directly by a policy or route can't join a zone until those references are removed. Plan zones before writing policies, and keep intrazone deny where the members should be isolated from each other, such as two DMZ servers belonging to different customers.

Learn more: Interfaces, VLANs and Zones

Segmentation by VLAN and policy

A VLAN separates a switch into separate Layer 2 networks. On its own, that only splits broadcast domains; the security comes from what connects the VLANs. If FGT1 is the default gateway of every VLAN, all traffic between them crosses FGT1, and each pair of segments needs an explicit policy.

1. Separate segments
Each group (users, servers, guests) gets its own VLAN and subnet.
2. Firewall as gateway
The FortiGate holds the gateway address of each segment, as a VLAN interface.
3. No default trust
With no policy between two segments, the implicit deny drops their traffic.
4. Explicit policies
Allow only the needed sources, destinations and services between segments.
5. Inspect and log
Apply security profiles and logging to the allowed traffic.
How VLANs and policies combine into segmentation. Each step needs the one before it.

Micro-segmentation takes the idea further: policies per workload or per application rather than per subnet, so even two servers in the same segment can only talk on the ports they need. It is usually enforced close to the workload, by host firewalls, the hypervisor or the cloud platform, because a firewall between subnets doesn't see traffic inside one subnet. A FortiGate supports the idea at the subnet level with narrow address objects and per-application policies; true per-workload enforcement is beyond this course.

Zero trust principles

Zero trust (described in NIST SP 800-207) replaces "trusted inside, untrusted outside" with three ideas:

  • Don't trust by location. Being on the office LAN or on the VPN grants nothing by itself.
  • Verify identity and device. Each access decision checks who the user is and whether the device is known and healthy.
  • Least privilege. Grant access to specific applications, not whole networks, and only for as long as it is needed.

How a FortiGate relates to these ideas, at a concept level:

PrincipleFortiGate feature
Verify identityIdentity-based policies: a policy matches users and groups (local, LDAP, RADIUS, FSSO) as well as addresses
Verify the deviceDevice information and endpoint posture from FortiClient EMS used as policy criteria
Least privilegeNarrow destinations and services in each policy; segments with no policy between them
Per-application accessZTNA access proxy: the FortiGate publishes individual applications and checks user and device on every session

A ZTNA access proxy differs from a traditional VPN: instead of placing a remote device onto the internal network, it gives the user access to one application at a time, after checking identity and device posture. Configuring ZTNA and identity-based policies is beyond Fortinet Fundamentals; this lesson only places them in the design.

Learn more: Users and Firewall Authentication

A worked design: adding a server segment

Back to Harbourline Foods. The new database server DB1 (10.0.30.20) goes into a SERVERS segment, VLAN 30, carried on port2 alongside the staff LAN. FGT1 becomes its gateway, so every connection to DB1 crosses a policy.

port1203.0.113.0/30port2port310.0.2.0/24InternetISP gateway 203.0.113.1FGT1edge + ISFWSW1trunk: LAN + VLAN 30SW2DMZ switchPC1LAN · 10.0.1.10DB1VLAN 30 · 10.0.30.20WEB1DMZ · 10.0.2.10
  1. 1. Allowed: WEB1 queries DB1 on TCP 5432 only.
  2. 2. Denied: PC1 has no policy to DB1; the implicit deny drops it.
config system interface edit "servers" set vdom root set interface port2 set vlanid 30 set ip 10.0.30.1 255.255.255.0 set role lan set allowaccess ping next end

The switch port facing FGT1 must carry VLAN 30 tagged. Only ping is allowed to the FortiGate from this segment: servers don't need its management interface.

Then the policy table, written from the services each system actually needs:

#From → ToSourceDestinationServiceActionNAT
1port3 → serversWEB1DB1TCP 5432 (database)Accept, logOff
2port2 → serversDBA group (identity)DB1SSH, TCP 5432Accept, logOff
3servers → port1DB1Update servers (FQDN objects)HTTPSAccept, logOn
4port2 → port3LANWEB1HTTPSAcceptOff
–Anything else between segmentsanyanyanyImplicit deny–

Policy 1 is the ISFW rule that matters most: if WEB1 is compromised, the attacker can reach DB1 only on the database port, not with SSH or file sharing. Policy 2 uses identity rather than a whole subnet, the zero-trust habit applied to an internal policy. NAT is off on internal policies so DB1's logs show real client addresses. Here is policy 1 in the CLI, with address objects named WEB1 and DB1:

config firewall service custom edit "DB-5432" set tcp-portrange 5432 next end config firewall policy edit 0 set name "DMZ-web-to-DB1" set srcintf "port3" set dstintf "servers" set srcaddr "WEB1" set dstaddr "DB1" set action accept set schedule "always" set service "DB-5432" set logtraffic all set nat disable next end

edit 0 creates the policy with the next free ID. logtraffic all logs every session, which suits a low-volume, high-value policy like this one. Add an IPS profile once the policy works.

Simplified illustration of the FortiOS 7.4 GUI · not a screenshot
FGT1Policy & Objects › Firewall Policy

Firewall Policy list (interface pair view)

IDNameFromToSourceDestinationServiceActionNAT
5DMZ-web-to-DB1port3serversWEB1DB1DB-5432ACCEPTDisabled
6DBA-to-DB1port2serversLAN, DBADB1SSH, DB-5432ACCEPTDisabled
7DB1-updatesserversport1DB1Update-FQDNsHTTPSACCEPTEnabled
0Implicit DenyanyanyallallALLDENY
The new policies as they could appear in the GUI. Drawn illustration, not a screenshot.
  • The ISFW policy: one source, one destination, one service. Policy IDs on a real unit depend on what already exists.

Verifying the design

Test both what should work and what shouldn't. From WEB1, connect to DB1 on TCP 5432 (it should work) and on TCP 22 (it should fail). Then confirm what FGT1 decided:

diagnose sys session filter clear diagnose sys session filter dst 10.0.30.20 diagnose sys session list

Shows the sessions to DB1. Clear old filters first; a forgotten filter is a common reason for seeing nothing.

Example output · based on Fortinet documentation; exact format varies by model and FortiOS version
FGT1 # diagnose sys session list
session info: proto=6 proto_state=01 duration=12 expire=3593 timeout=3600 ...
...
hook=pre dir=org act=noop 10.0.2.10:40112->10.0.30.20:5432(0.0.0.0:0)
...
misc=0 policy_id=5 ...
total session 1
Illustrative output, trimmed. Look for the source and destination you expect, act=noop (no address translation, as intended for an internal policy) and policy_id naming the ISFW policy. There should be no session for the failed SSH attempt; the traffic log for the implicit deny shows it, if logging of denied traffic is enabled.

The GUI's Policy Lookup (Policy & Objects › Firewall Policy) answers "which policy would match this connection?" without generating traffic, which is useful before a change goes live.

What can go wrong

Servers in the new VLAN can't reach anything

DB1 has an address in 10.0.30.0/24 but can't even ping its gateway, 10.0.30.1.

Show the fix

Check the Layer 2 path first: the switch port to FGT1 must carry VLAN 30 tagged, and DB1's access port must be in VLAN 30. Then check that ping is in the VLAN interface's allowaccess. A missing VLAN on the trunk is the most common cause.

Two hosts "in different segments" talk without a policy

The firewall logs show nothing, yet a guest device reaches a server.

Show the fix

The traffic isn't crossing the firewall: both hosts are in the same VLAN, or another device (a Layer 3 switch, a second router) routes between the segments. Make the FortiGate the only gateway between them, and remove the other routed path. A firewall can only enforce what passes through it.

An interface can't be added to a zone

The GUI or CLI rejects adding port3 to DMZ-ZONE.

Show the fix

port3 is still referenced directly by a policy, route or other object. Find the references (the GUI shows a reference count on the interface), replace them or delete them, then add the interface to the zone and use the zone in its place.

The application breaks after segmentation

The web shop shows database errors after the server move, although policy 1 exists.

Show the fix

The application needs more than one port (for example a second service or DNS), or connects from a different source address than expected. Find the denied connections in the forward traffic log for WEB1 and add only the specific missing service. Avoid widening the policy to "all" to make the error go away.

Design guidance for enterprises

  • Separate roles as the network grows. An edge FortiGate for Internet, VPN and SD-WAN; an ISFW pair in the core or data centre sized for internal volumes.
  • Size an ISFW for east–west volume. Internal traffic such as backups can far exceed Internet traffic; size by the inspection you will turn on.
  • Plan segments by trust and function. Users, servers, management, guests, OT and IoT devices, and the DMZ each get their own segment.
  • Deploy in HA. A firewall in the only path between segments is a single point of failure.
  • Introduce zero trust in steps. Identity-based policies for sensitive servers first, then device posture, then per-application access for remote users.

Learn more: High Availability (FGCP)

Best practices

  • Make the firewall the default gateway of every segment it must protect, and remove other routed paths.
  • Start from deny between segments; add policies per service, with named address objects.
  • Turn source NAT off on internal policies so logs keep real addresses.
  • Put Internet-facing servers in a DMZ and give the DMZ no access to the LAN by default.
  • Use zones only where segments really share the same policy; otherwise keep interfaces separate.
  • Log internal policies, especially to servers; east–west logs are where lateral movement shows up.

🛠 Practical exercise: design segments for a small company

On paper, design the network for a fictional clinic with staff PCs, a patient records server, a guest Wi-Fi, network printers and a public appointment website, behind one FortiGate. Give each segment a VLAN ID and a subnet from 10.0.0.0/16, decide which segment the website belongs in, and write the policy table (from, to, source, destination, service, NAT) using least privilege. Then list every connection that the implicit deny will block, and check that none of them is needed. If you have a FortiGate VM, build two of the segments as VLAN interfaces and test one allowed and one denied connection with the session list.

Key takeaways

✅ Key takeaways
  • A firewall controls only traffic that crosses it; routing decides what crosses it.
  • North–south is in and out of the organisation; east–west is between internal segments.
  • NAT mode routes between subnets; transparent mode bridges and keeps existing addressing.
  • A DMZ isolates public servers; zones group interfaces that share policies.
  • Zero trust means access per request, by verified identity and device, with least privilege.

Check yourself

Predict · scenario 1

A company must add firewall inspection between its core router and the Internet router, without changing any IP addresses. Which FortiGate mode fits?

Predict · scenario 2

A laptop on the staff LAN is infected and starts scanning the file server in the server segment. Which traffic direction is this, and which control limits it?

Predict · scenario 3

A zone contains port3 and port5 with intrazone deny, and there is no policy from the zone to itself. A server on port3 tries to reach a server on port5. What happens?

Predict · scenario 4

After WEB1 moved its database to DB1 in a new server VLAN, the session list shows WEB1 → DB1 sessions with act=snat to 10.0.30.1. What is wrong with the design?

Predict · scenario 5

Which statement best describes zero trust?

Next: The Fortinet product family and the Security Fabric. To build these policies on a FortiGate, see How firewall policies work.

Official documentation

Links open the named page in Fortinet's documentation (checked 12 October 2026). RouteLearn is an independent educational resource, not affiliated with or endorsed by Fortinet. Fortinet, FortiGate, FortiOS, FortiManager and FortiGuard are trademarks of Fortinet, Inc. Example output on this page is illustrative.

FAQ

Do I need a second firewall for internal segmentation?
Not necessarily. If the edge FortiGate is the default gateway of every internal segment, it already sees east–west traffic between those segments and can apply policies to it. Larger networks often add a dedicated ISFW in the core or data centre, because internal traffic volumes are much higher than Internet traffic and the edge firewall may not be sized for both.
Is transparent mode less secure than NAT mode?
No. Policies, security profiles and logging still apply in transparent mode. The difference is in what the FortiGate can do at Layer 3: it doesn't route, so features that depend on the FortiGate being a router hop are not available. Choose the mode by how the firewall must fit into the network, not by security level.
Is zero trust a product I can buy?
No. Zero trust is a set of principles: verify every request, grant the least privilege needed, and don't trust a connection because of where it comes from. Products such as an identity-aware firewall or a ZTNA access proxy help apply those principles, but the design and the policies are what make a network follow them.