Linux for network engineers lab 14 of 14
Capstone: a Linux edge with firewall, services and VPN
You build a whole site edge on Linux from a list of requirements: routing, DHCP and DNS, a default-deny firewall, NAT with a VPN exemption, a published server, and an IPsec tunnel to a branch written by hand with ip xfrm.
Run this lab
It needs Lite: its 6 nodes are set to 6 vCPU and 3,584 MB in total. That fits the free demo too.
In your workspace: Shared, then Linux for network engineers guided labs, then 14 - Capstone - a Linux edge with firewall services and VPN
- Level
- Advanced
- Time
- About 120 minutes
- Nodes need
- 6 vCPU, 3,584 MB
- Smallest plan
- Lite
The scenario
Kestrel has bought a small rival and is moving its Lincoln site to Linux. You've done every part of this in earlier labs, and now it all goes on one box, EDGE, with a tunnel to the new branch router BR. The requirements below are all you get. The addresses are fixed, and the design is yours, though the solution shows one way that works.
Requirements
- LAN PCs get addresses and DNS from EDGE. H1 always gets
10.14.10.99. portal.kestrel.labis SRV,branch.kestrel.labis WS.- LAN PCs reach the Internet on TCP 80 and 443 and can ping, all through the one public address.
- LAN PCs reach SRV on TCP 80.
- Anyone on the Internet reaches SRV on TCP 80 at
203.0.113.2. - The LAN and the branch LAN talk freely over an encrypted tunnel.
- The branch uses EDGE's DNS over the tunnel.
- EDGE answers nothing from the Internet except ESP from BR.
- Everything else is dropped, and drops through EDGE are logged.
| Device | Interface | Address | Role |
|---|---|---|---|
| EDGE | eth0 | 10.14.10.1/24 | head office LAN |
| EDGE | eth1 | 10.14.20.1/24 | DMZ |
| EDGE | eth2 | 203.0.113.2/30 | public side, gateway .1 |
| H1 | eth0 | DHCP, reserved 10.14.10.99 | LAN PC |
| SRV | eth0 | 10.14.20.10/24 | web server, gateway .1 |
| ISP | Gi0/0, Gi0/1, Lo0 | 203.0.113.1/30, 198.51.100.1/30, 192.0.2.1/32 | the provider; 192.0.2.1 stands for the Internet |
| BR | eth0 | 198.51.100.2/30 | public side, gateway .1 |
| BR | eth1 | 10.14.30.1/24 | branch LAN |
| WS | eth0 | 10.14.30.50/24 | branch workstation |
| Device | Runs | How to log in |
|---|---|---|
| WS | Ubuntu 22.04 desktop container | Its console is a remote desktop: root / eve. Open a terminal there. |
| H1, SRV | Alpine Linux 3.20 | root, no password. |
| ISP | Cisco IOSv 15.9 | The console opens at >; enable has no password. |
| EDGE, BR | Alpine Linux 3.16 with iptables and iproute2 | Opens on a menu: press 5, then Enter, for a root shell. |
What you’ll practise
- Plan and build a Linux edge from a requirements list
- Serve DHCP and DNS from the edge and protect them
- Write a default-deny policy for the box and for traffic through it
- Combine masquerade, DNAT and a NAT exemption
- Build ESP tunnel mode with ip xfrm and read its state
- Test what should fail as well as what should work
The tasks
- Start the Linux nodes
- Build the routers
- Run the head-office services
- Write the firewall policy
- Add NAT, with one exception
- Build the VPN
- Prove it and save it
The Lab Tasks pane has the scenario, these tasks, the checks to run, hints and the full solution.
Topology and devices
The network as it opens in EVE-NG, drawn from the lab’s own canvas, and the image each node runs.
Every link, as text
- EDGE
eth0to H1eth0 - EDGE
eth1to SRVeth0 - EDGE
eth2to ISPGi0/0 - ISP
Gi0/1to BReth0 - BR
eth1to WSeth0
| Node | Device | Image in Add Node | Set to |
|---|---|---|---|
| WS | EVE-NG GUI server (Docker) | eve-gui-server:latest | 1 vCPU, 1,024 MB |
| H1 | Alpine Linux | clbalpinebase-alpine-base-3-20-3 | 1 vCPU, 512 MB |
| SRV | Alpine Linux | clbalpinebase-alpine-base-3-20-3 | 1 vCPU, 512 MB |
| ISP | Cisco IOSv | vios-adventerprisek9-m.spa.159-3.m9 | 1 vCPU, 512 MB |
| EDGE | Alpine WAN emulator | clbalpinewanem-alpine-3-16-2-wanem | 1 vCPU, 512 MB |
| BR | Alpine WAN emulator | clbalpinewanem-alpine-3-16-2-wanem | 1 vCPU, 512 MB |
How to open this lab
Sign in to your workspace at
lab.cloudlabbox.com.In File Manager, open Shared, then the folder
Linux for network engineers guided labs.Open
14 - Capstone - a Linux edge with firewall services and VPNand start its nodes, then open Lab Tasks for the scenario and the steps.
The lab is read-only. You can start the nodes and configure the devices, but changes to the topology can’t be saved. To change it, rebuild it in your own folder.
More Linux for network engineers labs
All Linux for network engineers labs
Related labs in other courses
CloudLabBox is independent of Cisco, CompTIA, the Linux Foundation and the Linux Professional Institute. The lab follows exam topics and isn’t vendor training material; vendor names identify the exams and the images in the workspace.