Nftables: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 11: Zeile 11:
=A rule to check that all is fine (IPv4)=
=A rule to check that all is fine (IPv4)=
*nft add rule inet filter input counter accept
*nft add rule inet filter input counter accept
=List that table=
*nft list table inet filter
<pre>
table inet filter {
chain input {
type filter hook input priority 0; policy accept;
counter packets 47 bytes 3100 accept
}
}
</pre>

Version vom 12. November 2019, 13:24 Uhr

Install

  • apt-get install nftables

Create a basic IPv4 table

  • nft add table inet filter

List that table

  • nft list table inet filter
table inet filter {
}

Create a chain for input traffic IPv4

  • nft add chain inet filter input { type filter hook input priority 0\; }

A rule to check that all is fine (IPv4)

  • nft add rule inet filter input counter accept

List that table

  • nft list table inet filter
table inet filter {
	chain input {
		type filter hook input priority 0; policy accept;
		counter packets 47 bytes 3100 accept
	}
}