Skip to content

Examples

edge-firewall

An edge firewall that belongs to the environment: fw routes the DMZ and the LAN, and its own rules (build/fw/rules.nft) decide what crosses. Isoloom adds no router of its own; reach describes what the firewall should allow, and the derived checks verify it.

The example's folder, with the files its spec names: examples/edge-firewall.

version: 1
name: edge-firewall

networks:
  outside: { cidr: 10.70.0.0/24 }
  dmz:     { cidr: 10.70.10.0/24, gateway: fw }
  lan:     { cidr: 10.70.20.0/24, gateway: fw, internet: false }

reach:
  - { from: outside, to: dmz, ports: [80] }
  - { from: dmz, to: lan, ports: [6379] }

machines:
  fw:
    os: debian@12
    networks: { outside: 5, dmz: 1, lan: 1 }
    ports: { status: { port: 8080, protocol: http } }
    app:
      build: build/fw                        # the container form: its own Dockerfile
      steps: [{ run: provision/fw.sh }]      # the VM form: its script

  web:
    os: debian@12
    networks: { dmz: 10 }
    aliases: [www.edge.test]
    ports: { web: { port: 80, protocol: http } }
    app:
      build: build/web
      steps: [{ run: provision/web.sh }]

  # A published image on containers, a Debian VM its step sets up (Redis has no catalogue entry:
  # the lab gives both forms itself).
  cache:
    os: debian@12
    networks: { lan: 20 }
    ports: { redis: 6379 }
    app:
      image: "redis:7-alpine"
      steps: [{ run: provision/cache.sh }]

  user:
    os: debian@12
    access: true
    networks: { outside: 10 }

checks:
  - name: the web page answers through the firewall
    from: user
    script: checks/web-through-firewall.sh
    wait: 60   # its service may still be starting
  - name: the web server answers by its other name
    from: user
    http: http://www.edge.test/

Targets

docker, hosted, docker-vm, cloud-docker, vagrant, cloud-vm. See targets for what each means.

Checks

The spec's own:

  • the web page answers through the firewall (script)
  • the web server answers by its other name (http)

Plus the checks Isoloom derives from the machines' ports and the reach rules. See checks.