Foundation project

Project: connect a branch office

Lesson 11 of 20 · 20 min · Module 3: Real networks

Build a complete tunnel from the parameter sheet the two administrators agreed, the way a new site is brought online.

Start this lesson →

Free. No installation: you write and run the code in your browser, and it is checked automatically.

By the end, you’ll be able to…

  • Turn a parameter sheet into a working configuration
  • Configure identities, proposals and several selectors together
  • Verify every pair of networks

The idea

This project uses the first three modules together: the peer, authentication with identities, strong proposals for both SAs, and one selector per pair of networks. Every value you need is in the panel or in the brief. Work from the top of the negotiation down.

# 1. reach the peer:    peer, ike version, ike proposal
# 2. authenticate:      auth psk, id local, id remote
# 3. protect the data:   ipsec proposal, selector

01Start with what makes IKE answer

The peer address, the IKE version and the IKE proposal decide whether IKE_SA_INIT succeeds. Get that stage to "ok" before you write anything else.

02Then authentication

Add the key and both identities. IKE_AUTH succeeds only when all three are right.

03Then the data

Add the IPsec proposal and one selector for each pair of networks. Run the lab and read the line for every test packet.

Your project brief

Configure the tunnel to the branch. 1. Peer 198.51.100.2, IKEv2. 2. IKE proposal and IPsec proposal as the branch has them (see the panel). 3. Shared key Vt4-9mQe-Xb72-hKs6-Pd1w. 4. This gateway is hq.example.com, the branch is branch.example.com. 5. Both head-office networks, 10.0.1.0/24 and 10.0.3.0/24, reach the branch network 10.1.0.0/24. Do not summarise, and do not offer anything weak.

What the checks look for

  • IKE_SA_INIT succeeds with the agreed proposal
  • Authentication succeeds with the agreed key and identities
  • The child SA uses the agreed proposal
  • Both head-office networks reach the branch, in both directions
  • Two selectors are installed exactly as configured
  • Nothing weak is offered, and internet traffic stays outside
Try it in the editor →

Take this with you

A tunnel is brought up from the top: reach the peer, agree the IKE proposal, authenticate, then agree the data protection and the selectors.

Go a little further

Write down the nine lines the branch administrator has on the other side. Only three of them are different from yours.

Learn VPN & IPsec Foundations for free

20 short lessons with real code and instant checks.

See the whole course →