You are not logged in.

#1 2021-01-01 19:02:37

xtian
Member
Registered: 2013-08-25
Posts: 179

Clarify point of instruction on `nftables` from Wiki

Hello--Happy New Year peeps

I'm work'n on the `nftables` installation and setup from the Wiki. Just to be clear. To save the instructions you add/create/edit with the nft command, you need to replace nftables.conf?

It's logical from the instructions, but not explicit:

Simple firewall

nftables comes with simple and secure firewall configuration stored in /etc/nftables.conf file.

The nftables.service will load rules from that file when started or enabled.
[...]

nftables user-space utility nft performs most of the rule-set evaluation before handing rule-sets to the kernel. Rules are stored in chains, which in turn are stored in tables. The following sections indicate how to create and modify these constructs.

To read input from a file use the -f/--file option:

# nft --file filename

Offline

#2 2021-01-01 20:25:07

loqs
Member
Registered: 2014-03-06
Posts: 19,027

Re: Clarify point of instruction on `nftables` from Wiki

The service nftables.service supplied by the nftables packages loads its rules from /etc/nftables.conf.  If you want to use the service then you would need to adjust  /etc/nftables.conf to meet your requirements.
If you do not want to use the service you can load/save nftables rules from/to any file.

Offline

Board footer

Powered by FluxBB