strom/nft-simple-fw
Archived
1
0
Fork 0
Not so simple nftables firewal based solely on nft
This repository has been archived on 2024-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2020-11-28 19:51:34 +01:00
.github/workflows Forward outgoing container/local packets 2020-11-24 17:47:13 +01:00
custom Add allow-/blocklist fast-track 2020-11-27 21:40:58 +01:00
nft-blackhole Forward outgoing container/local packets 2020-11-24 17:47:13 +01:00
services Add allow-/blocklist fast-track 2020-11-27 21:40:58 +01:00
systemd Count total dropped and rejected packets 2020-11-19 21:41:52 +01:00
zones More granular static allow-/blocklist handling 2020-11-28 19:51:34 +01:00
.gitignore Add allow-/blocklist fast-track 2020-11-27 21:40:58 +01:00
conf.def More granular static allow-/blocklist handling 2020-11-28 19:51:34 +01:00
fw.nft More granular static allow-/blocklist handling 2020-11-28 19:51:34 +01:00
LICENSE Create README.md 2020-11-14 00:27:59 +01:00
log.nft Forward outgoing container/local packets 2020-11-24 17:47:13 +01:00
README.md Forward outgoing container/local packets 2020-11-24 17:47:13 +01:00
scanner.def Add allow-/blocklist fast-track 2020-11-27 21:40:58 +01:00

nft-simple-fw

nftables framework ruleset comparting traffic into different zones.
Supports private subnets and vpn interfaces and provides a custom template for nft-blackhole.

Uses performant interface group matching for distinguishing interfaces.

default zone policies

filter zones

  • public, private, forward: reject
  • default: reject
  • vpn, output: accept

Usage

  • Customize conf.def and the filter zones in zones to your liking if you don't agree with the sane defaults.
  • Assign interface groups via systemd-networkd (see conf.def), create/edit services.d/{forward,private,public,vpn}/*.nft files for the services you wish to use and load via nft -f fw.nft, or use the supplied systemd service file systemd/nft-fw.service, which expects the files to reside in /etc/nftables.
  • If you are using nft-blackhole, symlink nft-blackhole/template.nft to /usr/share/nft-blackhole/nft-blackhole.template.