zNetLaB › Guided labs › Security
FortiGate edge: policy, NAT, OSPF and BGP with IOS
Security Advanced 4 devices 4 checked tasks 100 points Plan lab
A FortiGate-VM sits between a user LAN and an IOS router that knows nothing about that LAN. Let the users out with a NATed policy, then run OSPF and BGP with the router. You build it in a browser, type real commands at each device, and every task below is
checked against the running configuration — so you find out it is wrong before anybody else does.
Open this lab in the simulator
The simulator runs in your browser with nothing to install. This lab is part of the full simulator: open it free for 7 days with a new account, then with a plan. It needs an account, which keeps your progress.
The scenario
A FortiGate-VM sits between a user LAN and an IOS router that knows nothing about that LAN. Let the users out with a NATed policy, then run OSPF and BGP with the router.
Your role: a security engineer. Level: Advanced Done when: all 4 goals show as passed (100 points).
Network status
Devices: 1 router, 1 firewall, 2 PCs, cabled as drawn. No Layer 1 or Layer 2 faults: every link is connected and up. H1 is a host with 192.168.1.10/24, gateway 192.168.1.1. H2 is a host with 10.2.0.10/24, gateway 10.2.0.1. R1, FG start with an empty configuration.
Known problems
None: nothing is misconfigured. The network is simply not finished: what the goals list is what you have to build or secure.
Goals
H1 reaches H2 through the FortiGate (30 pts) The session is source-NATed to port1 (20 pts) OSPF is Full between the FortiGate and R1 (25 pts) The FortiGate learns R1 loopback over BGP (25 pts)
The activity, in order
H1 reaches H2 through the FortiGate Address port1 (10.0.12.2/30) and port2 (192.168.1.1/24), a default static route to 10.0.12.1 on port1, and a policy from port2 to port1 with action accept and nat enable.Why: Each goal is a state the lab can check on the running device. Verify with: diagnose sys session list The session is source-NATed to port1 With nat enable the users leave as the port1 address; the router needs no route to 192.168.1.0/24.Why: Each goal is a state the lab can check on the running device. Verify with: diagnose sys session list OSPF is Full between the FortiGate and R1 R1: router ospf 1 with router-id 1.1.1.1 and the 10.0.0.0/8 networks in area 0. FortiGate: config router ospf with router-id 2.2.2.2, area 0.0.0.0 and a network for 10.0.12.0/30.Why: Each goal is a state the lab can check on the running device. Verify with: get router info ospf neighbor The FortiGate learns R1 loopback over BGP R1: Loopback0 192.0.2.1/32, router bgp 65001 with neighbour 10.0.12.2 remote-as 65002 and the loopback as a network. FortiGate: config router bgp, as 65002 and the neighbour 10.0.12.1 remote-as 65001.Why: Each goal is a state the lab can check on the running device. Verify with: get router info bgp summary
Tips
Work in the order given: later goals depend on the earlier ones. After every change, run the verify command before moving on; do not guess. Stuck? Read the verify output first. It names the interface, neighbour or route that is wrong.
Why this matters
A FortiGate-VM sits between a user LAN and an IOS router that knows nothing about that LAN. Let the users out with a NATed policy, then run OSPF and BGP with the router.
What you will be able to do
H1 reaches H2 through the FortiGate
The session is source-NATed to port1
OSPF is Full between the FortiGate and R1
The FortiGate learns R1 loopback over BGP
The network
ISR 2911, FortiGate-VM, PC — 4 devices in all, already cabled.
Gi0/1 port1 port2 Fa0 Gi0/0 Fa0 R1 FG H1 192.168.1.10/24 · gw 192.168.1.1 H2 10.2.0.10/24 · gw 10.2.0.1 Drawn from this lab: devices, cables, ports and the addresses already set.
Device Model Address already set
R1 ISR 2911 configure it
FG FortiGate-VM configure it
H1 PC 192.168.1.10 / 255.255.255.0 gw 192.168.1.1
H2 PC 10.2.0.10 / 255.255.255.0 gw 10.2.0.1
Cabling
R1 Gi0/1 ↔ FG port1
FG port2 ↔ H1 Fa0
R1 Gi0/0 ↔ H2 Fa0
What is configured at the start
Nothing is configured to start with beyond the addresses above: you build the configuration from a clean start.
Tasks, and how each one is checked
Every task is decided by reading the live network — a neighbour in FULL, a ping that succeeds, a line in the running configuration — not by looking for a keyword you typed. The same command shows you what the lab sees.
# Task Pts How to verify it yourself
1 H1 reaches H2 through the FortiGate 30 On H1: ping 10.2.0.10 must succeed.
2 The session is source-NATed to port1 20 On FG: diagnose sys session list output matches act=snat 192\.168\.1\.10:.*\(10\.0\.12\.2:.
3 OSPF is Full between the FortiGate and R1 25 On FG: get router info ospf neighbor output matches 1\.1\.1\.1\s+1\s+Full/.
4 The FortiGate learns R1 loopback over BGP 25 On FG: show ip route lists 192.0.2.1/32.
Stuck? Ask the coach
Tell the coach what you see or what you tried. It gives you a hint, not the answer, the way a senior engineer would. Included with a free trial or any plan.
Ask the coach
Reference solution
Try it yourself first — the lab checks your work either way. This is one configuration that makes every task pass, device by device:
R1 interface GigabitEthernet0/0
ip address 10.2.0.1 255.255.255.0
no shutdown
exit
interface GigabitEthernet0/1
ip address 10.0.12.1 255.255.255.252
no shutdown
exit
router ospf 1
router-id 1.1.1.1
network 10.0.0.0 0.255.255.255 area 0
exit
interface loopback0
ip address 192.0.2.1 255.255.255.255
exit
router bgp 65001
neighbor 10.0.12.2 remote-as 65002
network 192.0.2.1 mask 255.255.255.255
exit
FG config system interface
edit port1
set ip 10.0.12.2 255.255.255.252
set allowaccess ping
next
edit port2
set ip 192.168.1.1/24
next
config router static
edit 0
set gateway 10.0.12.1
set device port1
next
config firewall policy
edit 1
set name "lan-out"
set srcintf port2
set dstintf port1
set srcaddr all
set dstaddr all
set action accept
set schedule always
set service ALL
set nat enable
next
config router ospf
set router-id 2.2.2.2
config area
edit 0.0.0.0
next
config network
edit 1
set prefix 10.0.12.0 255.255.255.252
set area 0.0.0.0
next
config router bgp
set as 65002
set router-id 2.2.2.2
config neighbor
edit 10.0.12.1
set remote-as 65001
next
Related labs
Where to start
The lessons are open to everyone, all guided labs are listed by track, and
plans explains what is free and what is not.
CCNA®, CCNP® and Cisco® are trademarks of Cisco Systems, Inc. zNetLaB is not affiliated with or endorsed by Cisco.
Try the simulator in your browser, no sign-up