Reference

nftables feature

What it does

nftables, loading the firewall rules other features send into one inet table that drops everything else.

Use it

Import it from (vessel system features firewall). This part of a system configuration uses it:

Example: feature-nftables-example

(import (vessel system)
        (vessel system features firewall))

;; nftables drops what no rule accepts. Here it accepts WireGuard.
(system-configuration
  features:
    (append
      (list (nftables-feature)
            (simple-feature 'wireguard firewall-feature
              (list (firewall-rule protocol: 'udp ports: '(51820)))))
      %base-features))

Verified

A real system.sgl also sets the fields this example leaves out: the host name, kernel, boot loader and file systems. Every time the manual is built, it composes this configuration with Vessel's code and checks what the feature receives.

Options

None. This feature type takes no configuration.

What it adds

Its declared extensions target these feature types:

What it receives

It implements these receiving contracts:

Used in

Created with Sigil