# nftables sets with timeouts

> Dynamic nftables sets with a timeout keep short-lived state in the firewall without a userspace daemon.

Date: 2026-09-30  
Author: Nik  
Tags: linux, networking  
Source: https://devscratch.com/en/posts/nft-sets

Dynamic sets with a timeout are a neat way to keep short-lived state in the firewall without a userspace daemon.

```bash
set seen { type ipv4_addr; flags dynamic, timeout; timeout 1h; }
```

Elements expire on their own; `nft list set` shows the remaining time.
