Difference between revisions of "Main Page"

From nftables wiki
Jump to navigation Jump to search
(→‎External links: add nftables & python external link)
(→‎Basic operation: link to VM code analysis page added)
 
(36 intermediate revisions by 3 users not shown)
Line 2: Line 2:


If you have any suggestion to improve it, please send your comments to Netfilter users mailing list <netfilter@vger.kernel.org>.
If you have any suggestion to improve it, please send your comments to Netfilter users mailing list <netfilter@vger.kernel.org>.
= [[News]] =


= Introduction =
= Introduction =
* [[What is nftables?]]
* [[What is nftables?]]
* [[Why nftables?]]
* [[Main differences with iptables]]
* [[Netfilter hooks]] and integration with existing Netfilter components.
* [[Adoption]]
* [[Legacy xtables tools]]
* [[How to obtain help/support]]
* [[How to obtain help/support]]


= Getting started =


* [[Building and installing nftables from sources]]
= Reference =
* Using [[nftables from distributions]]
* [https://www.netfilter.org/projects/nftables/manpage.html man nft - netfilter website]
* [[Troubleshooting|Troubleshooting and FAQ]]
* [https://www.mankier.com/8/nft man nft - mankier.com]
* [[Quick reference-nftables in 10 minutes|Quick reference, nftables in 10 minutes]]
* [[Quick reference-nftables in 10 minutes|Quick reference, nftables in 10 minutes]]
* [[Netfilter hooks]] and nftables integration with existing Netfilter components
* [[nftables families|Understanding nftables families]]
* [[nftables families|Understanding nftables families]]
* [[Data_types|Data types]]
* [[Connection_Tracking_System|Connection tracking system (conntrack)]], used for stateful firewalling and NAT
* [[Troubleshooting|Troubleshooting and FAQ]]
* [[Further_documentation|Additional documentation]]
= Installing nftables =
* [[nftables from distributions|Using nftables from distributions]]
* [[Building and installing nftables from sources]]
= Upgrading from xtables to nftables =
* [[Legacy xtables tools]]
* [[Moving from iptables to nftables]]
* [[Moving from ipset to nftables]]


= Basic operation =
= Basic operation =
* [[Configuring tables]]
* [[Configuring tables]]
* [[Configuring chains]]
* [[Configuring chains]]
Line 33: Line 46:
* [[Scripting]]
* [[Scripting]]
* [[Ruleset debug/tracing]]
* [[Ruleset debug/tracing]]
* [[Moving from iptables to nftables]]
* [[Ruleset debug/VM code analysis]]
* [[Moving from ipset to nftables]]
* [[Output text modifiers]]
* [[Output text modifiers]]


= Supported selectors for packet matching =
= Expressions: Matching packets =
 
* [[Matching packet header fields]]
* [[Matching packet metainformation]]
* [[Matching packet metainformation]]
* [[Matching packet headers]]
* [[Matching connection tracking stateful metainformation]]
* [[Matching connection tracking stateful metainformation]]
* [[Matching routing information]]
* [[Rate limiting matchings]]
* [[Rate limiting matchings]]
* [[Routing information]]


= Possible actions on packets =


= Statements: Acting on packet matches =
* [[Accepting and dropping packets]]
* [[Accepting and dropping packets]]
* [[Rejecting traffic]]
* [[Jumping to chain]]
* [[Jumping to chain]]
* [[Rejecting traffic]]
* [[Counters]]
* [[Logging traffic]]
* [[Logging traffic]]
* [[Performing Network Address Translation (NAT)]]
* [[Performing Network Address Translation (NAT)]]
* [[Setting packet metainformation]]
* [[Setting packet metainformation]]
* [[Queueing to userspace]]
* [[Setting packet connection tracking metainformation]]
* [[Mangling packet headers]] (including stateless NAT)
* [[Duplicating packets]]
* [[Duplicating packets]]
* [[Mangle packet header fields]]
* [[Mangle TCP options]]
* [[Counters]]
* [[Load balancing]]
* [[Load balancing]]
* [[Setting packet connection tracking metainformation]]
* [[Queueing to userspace]]


Note that, unlike ''iptables'', you can perform several actions in one single rule.


= Advanced data structures for performance packet classification =
= Advanced data structures for performance packet classification =
You will have to redesign your rule-set to benefit from these new nice features:
* [[Sets]]
* [[Dictionaries]]
* [[Intervals]]
* [[Intervals]]
* [[Maps]]
* [[Concatenations]]
* [[Concatenations]]
* [[Meters|Metering]] (formerly known as flow tables before nftables 0.8.1 release)
* [[Updating sets from the packet path]]
* [[Element timeouts]]
* [[Math operations]]
* [[Math operations]]
* [[Stateful objects]]
* [[Stateful objects]]
* [[Flowtable]] (the fastpath network stack bypass)
** [[Counters]]
** [[Quotas]]
** [[Limits]]
** [[Connlimits]] (''ct count'')
* Other objects
** [[Conntrack helpers]] (''ct helper'', Layer 7 ALG)
** [[Ct_timeout|Conntrack timeout policies]] (''ct timeout'')
** [[Ct_expectation|Conntrack expectations]] (''ct expectation'')
** [[Synproxy]]
** [[Secmark|Secmarks]]
* Generic set infrastructure
** [[Sets]]
** [[Element timeouts]]
** [[Updating sets from the packet path]]
** [[Maps]]
** [[Verdict_Maps_(vmaps) | Verdict maps]]
** [[Meters|Metering]] (formerly known as flow tables before nftables 0.8.1)
* [[Flowtables]] (the fastpath network stack bypass)


If you are already using [[ipset]] in your ''iptables'' rule-set, that transition may be a bit more simple to you.


= Examples =
= Examples =
* [[Simple ruleset for a workstation]]
* [[Simple ruleset for a workstation]]
* [[Simple ruleset for a server]]
* [[Simple ruleset for a server]]
* [[Simple ruleset for a home router]]
* [[Bridge filtering]]
* [[Bridge filtering]]
* [[Multiple NATs using nftables maps]]
* [[Multiple NATs using nftables maps]]
Line 103: Line 119:
* [[Supported features compared to xtables|Supported features compared to {ip,ip6,eb,arp}tables]]
* [[Supported features compared to xtables|Supported features compared to {ip,ip6,eb,arp}tables]]
* [[List of available translations via iptables-translate tool]]
* [[List of available translations via iptables-translate tool]]


= External links =
= External links =
Line 126: Line 143:
* Article [http://ral-arturo.org/2017/05/05/debian-stretch-stable-nftables.html New in Debian stable Stretch: nftables]
* Article [http://ral-arturo.org/2017/05/05/debian-stretch-stable-nftables.html New in Debian stable Stretch: nftables]
* Article [https://ral-arturo.org/2020/11/22/python-nftables-tutorial.html How to use nftables from python] and git repository [https://github.com/aborrero/python-nftables-tutorial python-nftables-tutorial.git]
* Article [https://ral-arturo.org/2020/11/22/python-nftables-tutorial.html How to use nftables from python] and git repository [https://github.com/aborrero/python-nftables-tutorial python-nftables-tutorial.git]


= Thanks =
= Thanks =

Latest revision as of 13:53, 23 June 2023

Welcome to the nftables HOWTO documentation page. Here you will find documentation on how to build, install, configure and use nftables.

If you have any suggestion to improve it, please send your comments to Netfilter users mailing list <netfilter@vger.kernel.org>.


News

Introduction


Reference


Installing nftables


Upgrading from xtables to nftables


Basic operation

Expressions: Matching packets


Statements: Acting on packet matches


Advanced data structures for performance packet classification


Examples

Development

Check Portal:DeveloperDocs - documentation for netfilter developers.

Some hints on the general development progress:


External links

Watch some videos:

Watch videos to track updates:

Additional documentations and articles:


Thanks

To the NLnet foundation for initial sponsorship of this HOWTO:

logo.gif

To Eric Leblond, for boostrapping the Nftables quick howto in 2013.