<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.nftables.org/wiki-nftables/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jose</id>
	<title>nftables wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.nftables.org/wiki-nftables/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jose"/>
	<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php/Special:Contributions/Jose"/>
	<updated>2026-04-11T10:37:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>http://wiki.nftables.org/wiki-nftables/index.php?title=GeoIP_matching&amp;diff=531</id>
		<title>GeoIP matching</title>
		<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php?title=GeoIP_matching&amp;diff=531"/>
		<updated>2020-08-03T10:31:33Z</updated>

		<summary type="html">&lt;p&gt;Jose: Update github clone link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
You can use a external script &#039;&#039;&#039;nft_geoip.py&#039;&#039;&#039;, at [https://github.com/JMGuisadoG/nftables-geoip nftables-geoip], to generate mappings between countries and marks that can be later included into your ruleset.&lt;br /&gt;
&lt;br /&gt;
== How to get the script ==&lt;br /&gt;
&lt;br /&gt;
Clone [https://github.com/pvxe/nftables-geoip nftables-geoip repo]&lt;br /&gt;
&lt;br /&gt;
== How to use the script ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You can use&#039;&#039; &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; ./nft_geoip --help &amp;lt;/code&amp;gt; &#039;&#039;to show the script help&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The script need two .csv files.&lt;br /&gt;
&lt;br /&gt;
* A country data csv (location.csv), its path can be specified with &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; --file-location &amp;lt;/code&amp;gt; option&lt;br /&gt;
* A geoip data csv (dbip.csv), its path can be specified with &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; --file-address &amp;lt;/code&amp;gt; option&lt;br /&gt;
&lt;br /&gt;
=== location.csv ===&lt;br /&gt;
&lt;br /&gt;
The script ships with this file. A modified .csv that contains country data needed to generate the maps.&lt;br /&gt;
&lt;br /&gt;
=== dbip.csv ===&lt;br /&gt;
&lt;br /&gt;
This .csv &#039;&#039;&#039;is not shipped&#039;&#039;&#039; and needed to be retrieved before using the script. There exist the option &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; --download &amp;lt;/code&amp;gt; to do so.&lt;br /&gt;
&lt;br /&gt;
== Generating the geoip maps ==&lt;br /&gt;
&lt;br /&gt;
To generate the mappings in the current directory (assuming you don&#039;t have the dbip.csv file)&lt;br /&gt;
&lt;br /&gt;
  ./nft_geoip.py --file-location location.csv --download&lt;br /&gt;
&lt;br /&gt;
You can specify a different (existing) output directory with &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; --output-dir &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Output files ==&lt;br /&gt;
&lt;br /&gt;
  rwxr-xr-x 2 foobar foobar 4,0K ene  4 19:38 .&lt;br /&gt;
  drwxr-xr-x 5 foobar foobar 4,0K ene  4 19:38 ..&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  22M ene  4 19:38 dbip.csv&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  956 ene  4 19:38 geoip-def-africa.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar 8,3K ene  4 19:38 geoip-def-all.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  902 ene  4 19:38 geoip-def-americas.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar   15 ene  4 19:38 geoip-def-antarctica.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  808 ene  4 19:38 geoip-def-asia.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  810 ene  4 19:38 geoip-def-europe.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  461 ene  4 19:38 geoip-def-oceania.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar 8,8M ene  4 19:38 geoip-ipv4.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  16M ene  4 19:38 geoip-ipv6.nft&lt;br /&gt;
&lt;br /&gt;
When everything is finished you will find the following files in your output directory&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;geoip-def-all.nft&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Containing all definitions. (eg. &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; define $CA = 124 &amp;lt;/code&amp;gt;) the variable name is its&lt;br /&gt;
It also contains a map between country marks and its corresponding continent mark.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;geoip-def-{continent}.nft&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Subset of definitions for countries of a given continent. To be used as marks.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;geoip-ipv4.nft&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Containing the map between ipv4 ranges and its geoip data. &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt;@geoip4&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;geoip-ipv6.nft&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Containing the map between ipv6 ranges and its geoip data. &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt;@geoip6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Marking packets with its country code ==&lt;br /&gt;
&lt;br /&gt;
  meta mark set ip saddr map @geoip4&lt;br /&gt;
&lt;br /&gt;
  meta mark set ip6 saddr map @geoip6&lt;br /&gt;
&lt;br /&gt;
== Matching packets by its country code ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You can only use the country definitions inside your ruleset file and not inside an interactive nft shell&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For example, to match packets marked with the Canada mark.&lt;br /&gt;
&lt;br /&gt;
  meta mark $CA&lt;br /&gt;
&lt;br /&gt;
See the relevant section in [https://wiki.nftables.org/wiki-nftables/index.php/Matching_packet_metainformation#Matching_packets_by_packet_mark Matching packet metainformation]&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Marking input ipv4 packets and counting Spanish traffic ===&lt;br /&gt;
&lt;br /&gt;
  table filter {&lt;br /&gt;
    include &amp;quot;./geoip-def-all.nft&amp;quot;&lt;br /&gt;
    include &amp;quot;./geoip-ipv4.nft&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
    chain input {&lt;br /&gt;
                  type filter hook input priority filter; policy accept;&lt;br /&gt;
                  meta mark set ip saddr map @geoip4&lt;br /&gt;
                  meta mark $ES counter&lt;br /&gt;
                }&lt;br /&gt;
  }&lt;/div&gt;</summary>
		<author><name>Jose</name></author>
	</entry>
	<entry>
		<id>http://wiki.nftables.org/wiki-nftables/index.php?title=Supported_features_compared_to_xtables&amp;diff=497</id>
		<title>Supported features compared to xtables</title>
		<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php?title=Supported_features_compared_to_xtables&amp;diff=497"/>
		<updated>2020-02-05T14:06:00Z</updated>

		<summary type="html">&lt;p&gt;Jose: Fix &amp;quot;recent&amp;quot; order position inside xt matches&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Last update: Aug/2018&lt;br /&gt;
                                                                                 &lt;br /&gt;
This page tracks the list of supported and unsupported extensions with comments and suggestions.&lt;br /&gt;
                                                                                 &lt;br /&gt;
== Unsupported extensions ==                                                     &lt;br /&gt;
                                                                                 &lt;br /&gt;
=== matches: xt ===                                                              &lt;br /&gt;
                                                                                 &lt;br /&gt;
==== bpf ====                                                                    &lt;br /&gt;
* consider native interface                                                      &lt;br /&gt;
==== cluster ====                                                                &lt;br /&gt;
* consider native interface                                                      &lt;br /&gt;
==== rateest ====                                                                &lt;br /&gt;
* consider native interface                                                      &lt;br /&gt;
==== string ====                                                                 &lt;br /&gt;
* consider native interface                                                      &lt;br /&gt;
==== u32 ====                                                                    &lt;br /&gt;
* raw expressions?                                                               &lt;br /&gt;
&lt;br /&gt;
=== targets: xt ===                                                              &lt;br /&gt;
                                                         &lt;br /&gt;
==== CHECKSUM ====                                                               &lt;br /&gt;
* add nft_payload.&lt;br /&gt;
* To the day, the only use case for this was DHCP clients not working with partial checksums. That should be fixed nowadays.&lt;br /&gt;
* See https://lwn.net/Articles/396466/ and https://www.spinics.net/lists/kvm/msg37660.html&lt;br /&gt;
* See https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/930962 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=832090&lt;br /&gt;
&lt;br /&gt;
==== CT ====                                                                     &lt;br /&gt;
* nft_ct_target. Refer to [[Matching_connection_tracking_stateful_metainformation]].                                              &lt;br /&gt;
==== IDLETIMER ====                                                              &lt;br /&gt;
* consider native interface&lt;br /&gt;
==== LED ====                                                                    &lt;br /&gt;
* consider native (need this?)                                                   &lt;br /&gt;
==== NETMAP ====                                                                 &lt;br /&gt;
* nft_nat.                                                                       &lt;br /&gt;
==== RATEEST ====                                                                &lt;br /&gt;
* consider native interface                                                      &lt;br /&gt;
==== TCPOPTSTRIP ====                                                            &lt;br /&gt;
* consider native interface, need to extend nft_exthdr.c&lt;br /&gt;
&lt;br /&gt;
=== targets: ipv4 ===                                                            &lt;br /&gt;
                                                                                 &lt;br /&gt;
==== TTL ====&lt;br /&gt;
                                                                                 &lt;br /&gt;
=== targets: ipv6 ===                                                            &lt;br /&gt;
                                                                                 &lt;br /&gt;
==== NPT ====                                                                    &lt;br /&gt;
* consider native interface&lt;br /&gt;
&lt;br /&gt;
=== targets: bridge ===&lt;br /&gt;
&lt;br /&gt;
==== arpreply ====&lt;br /&gt;
* consider native interface&lt;br /&gt;
&lt;br /&gt;
=== watchers: bridge ===&lt;br /&gt;
&lt;br /&gt;
==== log ====&lt;br /&gt;
* nft_log&lt;br /&gt;
&lt;br /&gt;
==== nflog ====&lt;br /&gt;
* nft_log&lt;br /&gt;
&lt;br /&gt;
=== targets: arp ===&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
== Supported extensions ==                                                       &lt;br /&gt;
                                                                                 &lt;br /&gt;
=== matches: xt ===                                                              &lt;br /&gt;
&lt;br /&gt;
==== addrtype ====&lt;br /&gt;
* nft_fib, starting with 4.10 kernel. Refer to [[Routing_information]].&lt;br /&gt;
==== cgroup ====&lt;br /&gt;
* nft_meta. Refer to [[Quick_reference-nftables_in_10_minutes#Meta]].&lt;br /&gt;
[Awaits support for cgroup2]                                                                             &lt;br /&gt;
==== comment ====&lt;br /&gt;
* Built-in support via NFTA_RULE_USERDATA, since 3.15 (Pablo Neira). Refer to [[Matching_packet_header_fields#Matching_UDP.2FTCP_headers_in_the_same_rule]].&lt;br /&gt;
==== connbytes ====                                                              &lt;br /&gt;
* nft_ct, 4.5 kernel. Refer to [[Meters]].&lt;br /&gt;
==== connlabel ====                                                              &lt;br /&gt;
* nft_meta, since 3.16.&lt;br /&gt;
==== connlimit ====&lt;br /&gt;
* consider native interface. Refer to [[Meters]].&lt;br /&gt;
==== connmark ====&lt;br /&gt;
* nft_meta.&lt;br /&gt;
==== conntrack ====&lt;br /&gt;
* nft_ct.&lt;br /&gt;
==== cpu ====&lt;br /&gt;
* nft_meta, since 3.18.&lt;br /&gt;
==== dccp ====                                                                   &lt;br /&gt;
* nft_payload.    &lt;br /&gt;
[Unsupported option : dccp-option]&lt;br /&gt;
==== devgroup ====                                                               &lt;br /&gt;
* nft_meta, since 3.18.  &lt;br /&gt;
==== dscp ====                                              &lt;br /&gt;
* nft_payload.&lt;br /&gt;
==== ecn ====                                                                    &lt;br /&gt;
* nft_payload.                                                                   &lt;br /&gt;
==== esp ====                                                                    &lt;br /&gt;
* nft_payload.                                                                   &lt;br /&gt;
==== hashlimit ====                                                              &lt;br /&gt;
* meter statement. Refer to [[Meters]].&lt;br /&gt;
==== helper ====                                                                 &lt;br /&gt;
* nft_ct.&lt;br /&gt;
==== ipcomp ====&lt;br /&gt;
* nft_payload.&lt;br /&gt;
[Unsupported option : compres]&lt;br /&gt;
==== iprange ====                                                                &lt;br /&gt;
* nft_payload, through native range support. To emulate iptables --ports you need two rules.                                                   &lt;br /&gt;
==== ipvs ====&lt;br /&gt;
* consider native interface. Refer to [[Load balancing]].&lt;br /&gt;
==== length ====                                                                 &lt;br /&gt;
* nft_meta.                                                                      &lt;br /&gt;
==== limit ====                                                                  &lt;br /&gt;
* nft_limit. Refer to [[Stateful objects]].&lt;br /&gt;
==== mac ====                                                                    &lt;br /&gt;
* nft_payload.                                                                   &lt;br /&gt;
==== mark ====                                                                   &lt;br /&gt;
* nft_meta.                                                                      &lt;br /&gt;
==== multiport ====                                                              &lt;br /&gt;
* nft_payload. &lt;br /&gt;
[Unsupported option : ports]                                                                                         &lt;br /&gt;
==== nfacct ====&lt;br /&gt;
* consider native interface. Refer to [[Stateful objects]].&lt;br /&gt;
==== osf ====&lt;br /&gt;
* consider native interface&lt;br /&gt;
==== owner ====                                                                  &lt;br /&gt;
* nft_meta. &lt;br /&gt;
[Unsupported option : socket-exists]                                                                     &lt;br /&gt;
==== pkttype ====                                                                &lt;br /&gt;
* nft_meta&lt;br /&gt;
==== policy ====&lt;br /&gt;
* nft_xfrm, since 5.0&lt;br /&gt;
==== recent ====                                                                 &lt;br /&gt;
* consider native interface. Refer to [[Sets]].&lt;br /&gt;
==== sctp ====                                                                   &lt;br /&gt;
* nft_payload.&lt;br /&gt;
[Unsupported option: --chunk-types]&lt;br /&gt;
==== socket ====&lt;br /&gt;
* consider native interface&lt;br /&gt;
==== statistic ====&lt;br /&gt;
* nft_numgen. Refer to [[Load balancing]].&lt;br /&gt;
==== set ====&lt;br /&gt;
* Use native nf_tables set infrastructure.                                       &lt;br /&gt;
==== state ====                                                                  &lt;br /&gt;
* nft_ct                                                                         &lt;br /&gt;
==== tcp ====&lt;br /&gt;
* nft_payload&lt;br /&gt;
==== tcpmss ====                                                                 &lt;br /&gt;
* nft_exthdr, since 4.14&lt;br /&gt;
&lt;br /&gt;
==== time ====&lt;br /&gt;
* nft_meta, upcoming 5.4&lt;br /&gt;
&lt;br /&gt;
==== udp ====                                                                 &lt;br /&gt;
* nft_payload&lt;br /&gt;
&lt;br /&gt;
=== targets: xt ===                                                              &lt;br /&gt;
&lt;br /&gt;
==== AUDIT ====                                                              &lt;br /&gt;
* nft_log, since 4.18.&lt;br /&gt;
==== CLASSIFY ====                                                               &lt;br /&gt;
* nft_meta, since 3.14.    &lt;br /&gt;
==== CONNMARK ====                                                                                                                    &lt;br /&gt;
* nft_ct&lt;br /&gt;
==== CONNSECMARK ====&lt;br /&gt;
* nft_ct, since 4.20&lt;br /&gt;
==== DSCP ====                                                                                                                    &lt;br /&gt;
==== HL ====&lt;br /&gt;
* nft_payload&lt;br /&gt;
==== HMARK ====&lt;br /&gt;
* nft_meta + nft_hash.&lt;br /&gt;
==== MARK ====                                                                   &lt;br /&gt;
* nft_meta, since 3.14.&lt;br /&gt;
==== NFLOG ====                                                                  &lt;br /&gt;
* nft_log, since 3.17.                                             &lt;br /&gt;
==== NFQUEUE ====                                                                &lt;br /&gt;
* nft_queue, since 3.14.&lt;br /&gt;
==== SECMARK ====&lt;br /&gt;
* nft_meta, since 4.20&lt;br /&gt;
&lt;br /&gt;
==== SYNPROXY ====&lt;br /&gt;
* nft_synproxy, since 5.3&lt;br /&gt;
&lt;br /&gt;
==== TEE ====&lt;br /&gt;
* nft_dup, since 4.3.&lt;br /&gt;
==== TPROXY ====&lt;br /&gt;
* nft_tproxy, since 4.19&lt;br /&gt;
&lt;br /&gt;
==== TRACE ====                                                                  &lt;br /&gt;
* nft_meta, since 3.14.&lt;br /&gt;
&lt;br /&gt;
==== TCPMSS ====                                                                 &lt;br /&gt;
* nft_exthdr, since 4.14&lt;br /&gt;
&lt;br /&gt;
=== matches: ipv4 ===                                                            &lt;br /&gt;
                                                                                 &lt;br /&gt;
==== ah ====                                                                     &lt;br /&gt;
* nft_payload + nft_cmp&lt;br /&gt;
==== icmp ====&lt;br /&gt;
* nft_payload + nft_cmp.&lt;br /&gt;
[Unsupported codes: network-unreachable, host-unreachable, protocol-unreachable, port-unreachable, fragmentation-needed, source-route-failed, network-unknown, host-unknown, network-prohibited, host-prohibited, TOS-network-unreachable, TOS-host-unreachable, communication-prohibited, host-precedence-violation, precedence-cutoff, network-redirect, host-redirect, TOS-network-redirect, TOS-host-redirect, ttl-zero-during-transit, ttl-zero-during-reassembly, ip-header-bad and required-option-missing ]&lt;br /&gt;
==== realm ====                                                                  &lt;br /&gt;
* nft_meta, through NFT_META_RTCLASSID. &lt;br /&gt;
==== rp_filter ====&lt;br /&gt;
* nft_fib, starting with 4.10 kernel&lt;br /&gt;
==== ttl ====&lt;br /&gt;
&lt;br /&gt;
=== matches: ipv6 ===                                                            &lt;br /&gt;
            &lt;br /&gt;
==== rp_filter ====&lt;br /&gt;
* nft_fib, starting with 4.10 kernel                                                                    &lt;br /&gt;
==== ah  ====                                                                    &lt;br /&gt;
* nft_payload + nft_cmp.&lt;br /&gt;
==== eui64 ====&lt;br /&gt;
* nft_payload + nft_cmp.&lt;br /&gt;
==== frag ====&lt;br /&gt;
* nft_exthdr + nft_cmp.&lt;br /&gt;
==== hbh ====&lt;br /&gt;
* nft_exthdr + nft_cmp.&lt;br /&gt;
HBH options are not supported yet.&lt;br /&gt;
[Unsupported option: --hbh-opts]&lt;br /&gt;
==== hl ==== &lt;br /&gt;
* nft_payload.    &lt;br /&gt;
==== icmp6 ====&lt;br /&gt;
* nft_payload + nft_cmp.&lt;br /&gt;
[Unsupported icmpv6 codes: no-route, communication-prohibited, beyond-scope, address-unreachable, port-unreachable, failed-policy, reject-route, ttl-zero-during-transit, ttl-zero-during-reassembly, bad-header, unknown-header-type and unknown-option]&lt;br /&gt;
==== ipv6header ====&lt;br /&gt;
* nft_exthdr + nft_cmp.&lt;br /&gt;
==== mh ====&lt;br /&gt;
* nft_exthdr + nft_cmp.&lt;br /&gt;
[Needs bug fixation for option mh-type with range]&lt;br /&gt;
==== rt ====&lt;br /&gt;
* nft_exthdr + nft_cmp&lt;br /&gt;
[Unsupported options: --rt-0-res, --rt-0-addrs, --rt-0-not-strict]&lt;br /&gt;
&lt;br /&gt;
=== targets: ipv4 ===&lt;br /&gt;
==== ECN ====                                                                    &lt;br /&gt;
* nft_payload&lt;br /&gt;
&lt;br /&gt;
==== DNAT ====    &lt;br /&gt;
* nft_nat, since 3.13.    &lt;br /&gt;
==== LOG ====                                                                    &lt;br /&gt;
* nft_log, since 3.17.  &lt;br /&gt;
[Unsupported options : log-tcp-sequence, log-tcp-options, log-ip-options, log-uid, log-macdecode]&lt;br /&gt;
==== MASQUERADE ====&lt;br /&gt;
* nft_masq, since 3.18.&lt;br /&gt;
==== REDIRECT ====&lt;br /&gt;
* nft_redirect, since 3.19.&lt;br /&gt;
&lt;br /&gt;
==== REJECT ====                                                                 &lt;br /&gt;
* nft_reject_ipv4, since 3.13.                                         &lt;br /&gt;
* nft_reject_inet, since 3.14.&lt;br /&gt;
* nft_reject_bridge, since 3.18.  &lt;br /&gt;
==== SNAT ====                                                            &lt;br /&gt;
* nft_nat, since 3.13.&lt;br /&gt;
&lt;br /&gt;
=== targets: ipv6 ===&lt;br /&gt;
==== DNAT ====&lt;br /&gt;
* nft_nat, since 3.13.    &lt;br /&gt;
==== LOG ====&lt;br /&gt;
* nft_log, since 3.17.  &lt;br /&gt;
[Unsupported options : log-tcp-sequence, log-tcp-options, log-ip-options, log-uid, log-macdecode]&lt;br /&gt;
==== MASQUERADE ====                                                             &lt;br /&gt;
* nft_masq, since 3.18.&lt;br /&gt;
==== REDIRECT ====                                                               &lt;br /&gt;
* nft_redirect, since 3.19.&lt;br /&gt;
&lt;br /&gt;
==== REJECT ====                                                                                   &lt;br /&gt;
* nft_reject_ipv6, since 3.14.                     &lt;br /&gt;
* nft_reject_inet, since 3.14.&lt;br /&gt;
* nft_reject_bridge, since 3.18.    &lt;br /&gt;
==== SNAT ====                                                                                                                          &lt;br /&gt;
* nft_nat, since 3.13.&lt;br /&gt;
&lt;br /&gt;
=== matches: bridge ===&lt;br /&gt;
&lt;br /&gt;
==== 802.3 ====&lt;br /&gt;
* nft_payload&lt;br /&gt;
&lt;br /&gt;
==== among ====&lt;br /&gt;
* sets&lt;br /&gt;
&lt;br /&gt;
==== arp ====&lt;br /&gt;
* nft_payload&lt;br /&gt;
&lt;br /&gt;
==== ip ====&lt;br /&gt;
* nft_payload&lt;br /&gt;
&lt;br /&gt;
==== ip6 ====&lt;br /&gt;
* nft_payload&lt;br /&gt;
&lt;br /&gt;
==== limit ====&lt;br /&gt;
* nft_limit&lt;br /&gt;
&lt;br /&gt;
==== mark ====&lt;br /&gt;
* nft_mark&lt;br /&gt;
&lt;br /&gt;
==== pkttype ====&lt;br /&gt;
* nft_meta&lt;br /&gt;
&lt;br /&gt;
==== stp ====&lt;br /&gt;
* nft_payload&lt;br /&gt;
&lt;br /&gt;
==== vlan ====&lt;br /&gt;
* nft_payload&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== targets: bridge ===&lt;br /&gt;
&lt;br /&gt;
==== dnat ====&lt;br /&gt;
* nft_payload&lt;br /&gt;
&lt;br /&gt;
==== snat ====&lt;br /&gt;
* nft_payload&lt;br /&gt;
&lt;br /&gt;
==== redirect ====&lt;br /&gt;
* nft_payload + nft_meta (pkttype set unicast)&lt;br /&gt;
&lt;br /&gt;
==== mark ====&lt;br /&gt;
* nft_mark&lt;br /&gt;
&lt;br /&gt;
== Deprecated extensions ==                                                      &lt;br /&gt;
                                                                                 &lt;br /&gt;
=== matches ===                                                                  &lt;br /&gt;
 &lt;br /&gt;
==== physdev ====                                                                &lt;br /&gt;
* br_netfilter aims to be deprecated by nftables.                                                                                &lt;br /&gt;
==== quota ====                                                                  &lt;br /&gt;
* nfacct already provides quota support.  &lt;br /&gt;
==== tos ====&lt;br /&gt;
* deprecated by dscp                                       &lt;br /&gt;
                                                                                 &lt;br /&gt;
=== targets ===                                                                  &lt;br /&gt;
                                                                                 &lt;br /&gt;
==== CLUSTERIP ====                                                              &lt;br /&gt;
* deprecated by cluster match.                                                   &lt;br /&gt;
==== TOS ====                                                                 &lt;br /&gt;
* deprecated by DSCP&lt;br /&gt;
&lt;br /&gt;
=== targets: ipv4 ===                                                            &lt;br /&gt;
                                                                                 &lt;br /&gt;
==== ULOG ====                                                                   &lt;br /&gt;
* Removed from tree since 3.17.&lt;/div&gt;</summary>
		<author><name>Jose</name></author>
	</entry>
	<entry>
		<id>http://wiki.nftables.org/wiki-nftables/index.php?title=List_of_available_translations_via_iptables-translate_tool&amp;diff=496</id>
		<title>List of available translations via iptables-translate tool</title>
		<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php?title=List_of_available_translations_via_iptables-translate_tool&amp;diff=496"/>
		<updated>2020-02-05T13:27:52Z</updated>

		<summary type="html">&lt;p&gt;Jose: Add owner to translatable extensions. See commit 3d7d1afe4 in iptables-extensions repo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following &#039;&#039;&#039;matches and targets&#039;&#039;&#039; (in alphabetic order) can be fully translated via iptables-translate tool:&lt;br /&gt;
== Translatable extensions ==&lt;br /&gt;
=== Matches === &lt;br /&gt;
====xt====&lt;br /&gt;
&lt;br /&gt;
* addrtype&lt;br /&gt;
* ipcomp&lt;br /&gt;
* comment&lt;br /&gt;
* connlabel&lt;br /&gt;
* connmark&lt;br /&gt;
* conntrack&lt;br /&gt;
* cpu&lt;br /&gt;
* dccp&lt;br /&gt;
* devgroup&lt;br /&gt;
* dscp&lt;br /&gt;
* ecn&lt;br /&gt;
* esp&lt;br /&gt;
* helper&lt;br /&gt;
* iprange&lt;br /&gt;
* length&lt;br /&gt;
* limit&lt;br /&gt;
* mac&lt;br /&gt;
* mark&lt;br /&gt;
* owner&lt;br /&gt;
* pkttype&lt;br /&gt;
* state&lt;br /&gt;
* tcp&lt;br /&gt;
* udp&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
&lt;br /&gt;
* ah&lt;br /&gt;
* realm&lt;br /&gt;
* ttl&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
&lt;br /&gt;
* ah&lt;br /&gt;
* frag&lt;br /&gt;
* hbh&lt;br /&gt;
* hl&lt;br /&gt;
* mh&lt;br /&gt;
&lt;br /&gt;
=== Targets ===&lt;br /&gt;
&lt;br /&gt;
====xt====&lt;br /&gt;
* CLASSIFY&lt;br /&gt;
* NFLOG&lt;br /&gt;
* NFQUEUE&lt;br /&gt;
* MARK&lt;br /&gt;
* TEE&lt;br /&gt;
* TRACE&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
&lt;br /&gt;
* DNAT&lt;br /&gt;
* MASQUERADE&lt;br /&gt;
* REDIRECT&lt;br /&gt;
* REJECT&lt;br /&gt;
* SNAT&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
&lt;br /&gt;
* DNAT&lt;br /&gt;
* MASQUERADE&lt;br /&gt;
* REDIRECT&lt;br /&gt;
* REJECT&lt;br /&gt;
* SNAT&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following &#039;&#039;&#039;matches&#039;&#039;&#039; and &#039;&#039;&#039;targets&#039;&#039;&#039; are yet to be translated:&lt;br /&gt;
&lt;br /&gt;
== Partially translatable extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Matches ===&lt;br /&gt;
====xt====&lt;br /&gt;
* multiport&lt;br /&gt;
[Waiting for support of --ports]&lt;br /&gt;
* owner&lt;br /&gt;
[Waiting for support of --socket-exists]&lt;br /&gt;
* sctp&lt;br /&gt;
[Waiting for support of --chunk-types]&lt;br /&gt;
* time&lt;br /&gt;
[Waiting for support of --monthdays]&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
*icmp&lt;br /&gt;
[Waiting for support of packet types]&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
*icmp6&lt;br /&gt;
[Waiting for support of packet types]&lt;br /&gt;
* rt&lt;br /&gt;
[Waiting for support of --rt-0-res, --rt-0-addrs, --rt-0-not-strict] (partial translations available)&lt;br /&gt;
&lt;br /&gt;
=== Targets ===&lt;br /&gt;
====xt====&lt;br /&gt;
&lt;br /&gt;
* CONNMARK&lt;br /&gt;
[Waiting for support of --save-mark, --restore-mark, --set-mark and --set-xmark] (partial translations available)&amp;lt;br/&amp;gt;&lt;br /&gt;
If --set-mark is used you must only specify the mark.&amp;lt;br/&amp;gt;&lt;br /&gt;
If --set-xmark is used you must specify the mark and the mask.&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
* LOG&lt;br /&gt;
[Waiting for support of log-tcp-sequence, log-tcp-options, log-ip-options, log-uid, log-macdecode] (partial translations available)&lt;br /&gt;
====ip6====&lt;br /&gt;
* LOG&lt;br /&gt;
[Waiting for support of log-tcp-sequence, log-tcp-options, log-ip-options, log-uid, log-macdecode] (partial translations available)&lt;br /&gt;
&lt;br /&gt;
== Untranslatable extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Matches ===&lt;br /&gt;
&lt;br /&gt;
====xt====&lt;br /&gt;
* cgroup&lt;br /&gt;
[Waiting for support of cgroup2 path-based in nft]&lt;br /&gt;
* set&lt;br /&gt;
[Waiting for support]&lt;br /&gt;
: Suggestions for adding support:&lt;br /&gt;
:* Add counters to each element of a set. A counter contains the number of packets that matched an element and the total number of bytes. There must be the option of enabling or disabling the update of counters&#039; values at will. Also counters&#039; values must be accesible in order to do comparisons.&lt;br /&gt;
:* Sets must include different types of elements. Sets must have support for the &amp;quot;nomatch&amp;quot; flag.&lt;br /&gt;
[[User:Robgc|Robgc]] ([[User talk:Robgc|talk]]) 21:48, 21 September 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
* ipv6header&lt;/div&gt;</summary>
		<author><name>Jose</name></author>
	</entry>
	<entry>
		<id>http://wiki.nftables.org/wiki-nftables/index.php?title=List_of_available_translations_via_iptables-translate_tool&amp;diff=495</id>
		<title>List of available translations via iptables-translate tool</title>
		<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php?title=List_of_available_translations_via_iptables-translate_tool&amp;diff=495"/>
		<updated>2020-02-05T09:29:39Z</updated>

		<summary type="html">&lt;p&gt;Jose: Add addrtype extension. See commit 9f972f45&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following &#039;&#039;&#039;matches and targets&#039;&#039;&#039; (in alphabetic order) can be fully translated via iptables-translate tool:&lt;br /&gt;
== Translatable extensions ==&lt;br /&gt;
=== Matches === &lt;br /&gt;
====xt====&lt;br /&gt;
&lt;br /&gt;
* addrtype&lt;br /&gt;
* ipcomp&lt;br /&gt;
* comment&lt;br /&gt;
* connlabel&lt;br /&gt;
* connmark&lt;br /&gt;
* conntrack&lt;br /&gt;
* cpu&lt;br /&gt;
* dccp&lt;br /&gt;
* devgroup&lt;br /&gt;
* dscp&lt;br /&gt;
* ecn&lt;br /&gt;
* esp&lt;br /&gt;
* helper&lt;br /&gt;
* iprange&lt;br /&gt;
* length&lt;br /&gt;
* limit&lt;br /&gt;
* mac&lt;br /&gt;
* mark&lt;br /&gt;
* pkttype&lt;br /&gt;
* state&lt;br /&gt;
* tcp&lt;br /&gt;
* udp&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
&lt;br /&gt;
* ah&lt;br /&gt;
* realm&lt;br /&gt;
* ttl&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
&lt;br /&gt;
* ah&lt;br /&gt;
* frag&lt;br /&gt;
* hbh&lt;br /&gt;
* hl&lt;br /&gt;
* mh&lt;br /&gt;
&lt;br /&gt;
=== Targets ===&lt;br /&gt;
&lt;br /&gt;
====xt====&lt;br /&gt;
* CLASSIFY&lt;br /&gt;
* NFLOG&lt;br /&gt;
* NFQUEUE&lt;br /&gt;
* MARK&lt;br /&gt;
* TEE&lt;br /&gt;
* TRACE&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
&lt;br /&gt;
* DNAT&lt;br /&gt;
* MASQUERADE&lt;br /&gt;
* REDIRECT&lt;br /&gt;
* REJECT&lt;br /&gt;
* SNAT&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
&lt;br /&gt;
* DNAT&lt;br /&gt;
* MASQUERADE&lt;br /&gt;
* REDIRECT&lt;br /&gt;
* REJECT&lt;br /&gt;
* SNAT&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following &#039;&#039;&#039;matches&#039;&#039;&#039; and &#039;&#039;&#039;targets&#039;&#039;&#039; are yet to be translated:&lt;br /&gt;
&lt;br /&gt;
== Partially translatable extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Matches ===&lt;br /&gt;
====xt====&lt;br /&gt;
* multiport&lt;br /&gt;
[Waiting for support of --ports]&lt;br /&gt;
* owner&lt;br /&gt;
[Waiting for support of --socket-exists]&lt;br /&gt;
* sctp&lt;br /&gt;
[Waiting for support of --chunk-types]&lt;br /&gt;
* time&lt;br /&gt;
[Waiting for support of --monthdays]&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
*icmp&lt;br /&gt;
[Waiting for support of packet types]&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
*icmp6&lt;br /&gt;
[Waiting for support of packet types]&lt;br /&gt;
* rt&lt;br /&gt;
[Waiting for support of --rt-0-res, --rt-0-addrs, --rt-0-not-strict] (partial translations available)&lt;br /&gt;
&lt;br /&gt;
=== Targets ===&lt;br /&gt;
====xt====&lt;br /&gt;
&lt;br /&gt;
* CONNMARK&lt;br /&gt;
[Waiting for support of --save-mark, --restore-mark, --set-mark and --set-xmark] (partial translations available)&amp;lt;br/&amp;gt;&lt;br /&gt;
If --set-mark is used you must only specify the mark.&amp;lt;br/&amp;gt;&lt;br /&gt;
If --set-xmark is used you must specify the mark and the mask.&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
* LOG&lt;br /&gt;
[Waiting for support of log-tcp-sequence, log-tcp-options, log-ip-options, log-uid, log-macdecode] (partial translations available)&lt;br /&gt;
====ip6====&lt;br /&gt;
* LOG&lt;br /&gt;
[Waiting for support of log-tcp-sequence, log-tcp-options, log-ip-options, log-uid, log-macdecode] (partial translations available)&lt;br /&gt;
&lt;br /&gt;
== Untranslatable extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Matches ===&lt;br /&gt;
&lt;br /&gt;
====xt====&lt;br /&gt;
* cgroup&lt;br /&gt;
[Waiting for support of cgroup2 path-based in nft]&lt;br /&gt;
* set&lt;br /&gt;
[Waiting for support]&lt;br /&gt;
: Suggestions for adding support:&lt;br /&gt;
:* Add counters to each element of a set. A counter contains the number of packets that matched an element and the total number of bytes. There must be the option of enabling or disabling the update of counters&#039; values at will. Also counters&#039; values must be accesible in order to do comparisons.&lt;br /&gt;
:* Sets must include different types of elements. Sets must have support for the &amp;quot;nomatch&amp;quot; flag.&lt;br /&gt;
[[User:Robgc|Robgc]] ([[User talk:Robgc|talk]]) 21:48, 21 September 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
* ipv6header&lt;/div&gt;</summary>
		<author><name>Jose</name></author>
	</entry>
	<entry>
		<id>http://wiki.nftables.org/wiki-nftables/index.php?title=List_of_available_translations_via_iptables-translate_tool&amp;diff=494</id>
		<title>List of available translations via iptables-translate tool</title>
		<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php?title=List_of_available_translations_via_iptables-translate_tool&amp;diff=494"/>
		<updated>2020-02-04T16:01:00Z</updated>

		<summary type="html">&lt;p&gt;Jose: Add time extension. See commit ac5794e3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following &#039;&#039;&#039;matches and targets&#039;&#039;&#039; (in alphabetic order) can be fully translated via iptables-translate tool:&lt;br /&gt;
== Translatable extensions ==&lt;br /&gt;
=== Matches === &lt;br /&gt;
====xt====&lt;br /&gt;
&lt;br /&gt;
* ipcomp&lt;br /&gt;
* comment&lt;br /&gt;
* connlabel&lt;br /&gt;
* connmark&lt;br /&gt;
* conntrack&lt;br /&gt;
* cpu&lt;br /&gt;
* dccp&lt;br /&gt;
* devgroup&lt;br /&gt;
* dscp&lt;br /&gt;
* ecn&lt;br /&gt;
* esp&lt;br /&gt;
* helper&lt;br /&gt;
* iprange&lt;br /&gt;
* length&lt;br /&gt;
* limit&lt;br /&gt;
* mac&lt;br /&gt;
* mark&lt;br /&gt;
* pkttype&lt;br /&gt;
* state&lt;br /&gt;
* tcp&lt;br /&gt;
* udp&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
&lt;br /&gt;
* ah&lt;br /&gt;
* realm&lt;br /&gt;
* ttl&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
&lt;br /&gt;
* ah&lt;br /&gt;
* frag&lt;br /&gt;
* hbh&lt;br /&gt;
* hl&lt;br /&gt;
* mh&lt;br /&gt;
&lt;br /&gt;
=== Targets ===&lt;br /&gt;
&lt;br /&gt;
====xt====&lt;br /&gt;
* CLASSIFY&lt;br /&gt;
* NFLOG&lt;br /&gt;
* NFQUEUE&lt;br /&gt;
* MARK&lt;br /&gt;
* TEE&lt;br /&gt;
* TRACE&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
&lt;br /&gt;
* DNAT&lt;br /&gt;
* MASQUERADE&lt;br /&gt;
* REDIRECT&lt;br /&gt;
* REJECT&lt;br /&gt;
* SNAT&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
&lt;br /&gt;
* DNAT&lt;br /&gt;
* MASQUERADE&lt;br /&gt;
* REDIRECT&lt;br /&gt;
* REJECT&lt;br /&gt;
* SNAT&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following &#039;&#039;&#039;matches&#039;&#039;&#039; and &#039;&#039;&#039;targets&#039;&#039;&#039; are yet to be translated:&lt;br /&gt;
&lt;br /&gt;
== Partially translatable extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Matches ===&lt;br /&gt;
====xt====&lt;br /&gt;
* multiport&lt;br /&gt;
[Waiting for support of --ports]&lt;br /&gt;
* owner&lt;br /&gt;
[Waiting for support of --socket-exists]&lt;br /&gt;
* sctp&lt;br /&gt;
[Waiting for support of --chunk-types]&lt;br /&gt;
* time&lt;br /&gt;
[Waiting for support of --monthdays]&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
*icmp&lt;br /&gt;
[Waiting for support of packet types]&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
*icmp6&lt;br /&gt;
[Waiting for support of packet types]&lt;br /&gt;
* rt&lt;br /&gt;
[Waiting for support of --rt-0-res, --rt-0-addrs, --rt-0-not-strict] (partial translations available)&lt;br /&gt;
&lt;br /&gt;
=== Targets ===&lt;br /&gt;
====xt====&lt;br /&gt;
&lt;br /&gt;
* CONNMARK&lt;br /&gt;
[Waiting for support of --save-mark, --restore-mark, --set-mark and --set-xmark] (partial translations available)&amp;lt;br/&amp;gt;&lt;br /&gt;
If --set-mark is used you must only specify the mark.&amp;lt;br/&amp;gt;&lt;br /&gt;
If --set-xmark is used you must specify the mark and the mask.&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
* LOG&lt;br /&gt;
[Waiting for support of log-tcp-sequence, log-tcp-options, log-ip-options, log-uid, log-macdecode] (partial translations available)&lt;br /&gt;
====ip6====&lt;br /&gt;
* LOG&lt;br /&gt;
[Waiting for support of log-tcp-sequence, log-tcp-options, log-ip-options, log-uid, log-macdecode] (partial translations available)&lt;br /&gt;
&lt;br /&gt;
== Untranslatable extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Matches ===&lt;br /&gt;
&lt;br /&gt;
====xt====&lt;br /&gt;
* cgroup&lt;br /&gt;
[Waiting for support of cgroup2 path-based in nft]&lt;br /&gt;
* set&lt;br /&gt;
[Waiting for support]&lt;br /&gt;
: Suggestions for adding support:&lt;br /&gt;
:* Add counters to each element of a set. A counter contains the number of packets that matched an element and the total number of bytes. There must be the option of enabling or disabling the update of counters&#039; values at will. Also counters&#039; values must be accesible in order to do comparisons.&lt;br /&gt;
:* Sets must include different types of elements. Sets must have support for the &amp;quot;nomatch&amp;quot; flag.&lt;br /&gt;
[[User:Robgc|Robgc]] ([[User talk:Robgc|talk]]) 21:48, 21 September 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
* ipv6header&lt;/div&gt;</summary>
		<author><name>Jose</name></author>
	</entry>
	<entry>
		<id>http://wiki.nftables.org/wiki-nftables/index.php?title=List_of_available_translations_via_iptables-translate_tool&amp;diff=493</id>
		<title>List of available translations via iptables-translate tool</title>
		<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php?title=List_of_available_translations_via_iptables-translate_tool&amp;diff=493"/>
		<updated>2020-01-28T14:27:11Z</updated>

		<summary type="html">&lt;p&gt;Jose: Move dccp to translatable extensions. iptables-translate already supports --dccp-option. See commit c94a998&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following &#039;&#039;&#039;matches and targets&#039;&#039;&#039; (in alphabetic order) can be fully translated via iptables-translate tool:&lt;br /&gt;
== Translatable extensions ==&lt;br /&gt;
=== Matches === &lt;br /&gt;
====xt====&lt;br /&gt;
&lt;br /&gt;
* ipcomp&lt;br /&gt;
* comment&lt;br /&gt;
* connlabel&lt;br /&gt;
* connmark&lt;br /&gt;
* conntrack&lt;br /&gt;
* cpu&lt;br /&gt;
* dccp&lt;br /&gt;
* devgroup&lt;br /&gt;
* dscp&lt;br /&gt;
* ecn&lt;br /&gt;
* esp&lt;br /&gt;
* helper&lt;br /&gt;
* iprange&lt;br /&gt;
* length&lt;br /&gt;
* limit&lt;br /&gt;
* mac&lt;br /&gt;
* mark&lt;br /&gt;
* pkttype&lt;br /&gt;
* state&lt;br /&gt;
* tcp&lt;br /&gt;
* udp&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
&lt;br /&gt;
* ah&lt;br /&gt;
* realm&lt;br /&gt;
* ttl&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
&lt;br /&gt;
* ah&lt;br /&gt;
* frag&lt;br /&gt;
* hbh&lt;br /&gt;
* hl&lt;br /&gt;
* mh&lt;br /&gt;
&lt;br /&gt;
=== Targets ===&lt;br /&gt;
&lt;br /&gt;
====xt====&lt;br /&gt;
* CLASSIFY&lt;br /&gt;
* NFLOG&lt;br /&gt;
* NFQUEUE&lt;br /&gt;
* MARK&lt;br /&gt;
* TEE&lt;br /&gt;
* TRACE&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
&lt;br /&gt;
* DNAT&lt;br /&gt;
* MASQUERADE&lt;br /&gt;
* REDIRECT&lt;br /&gt;
* REJECT&lt;br /&gt;
* SNAT&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
&lt;br /&gt;
* DNAT&lt;br /&gt;
* MASQUERADE&lt;br /&gt;
* REDIRECT&lt;br /&gt;
* REJECT&lt;br /&gt;
* SNAT&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following &#039;&#039;&#039;matches&#039;&#039;&#039; and &#039;&#039;&#039;targets&#039;&#039;&#039; are yet to be translated:&lt;br /&gt;
&lt;br /&gt;
== Partially translatable extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Matches ===&lt;br /&gt;
====xt====&lt;br /&gt;
* multiport&lt;br /&gt;
[Waiting for support of --ports]&lt;br /&gt;
* owner&lt;br /&gt;
[Waiting for support of --socket-exists]&lt;br /&gt;
* sctp&lt;br /&gt;
[Waiting for support of --chunk-types]&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
*icmp&lt;br /&gt;
[Waiting for support of packet types]&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
*icmp6&lt;br /&gt;
[Waiting for support of packet types]&lt;br /&gt;
* rt&lt;br /&gt;
[Waiting for support of --rt-0-res, --rt-0-addrs, --rt-0-not-strict] (partial translations available)&lt;br /&gt;
&lt;br /&gt;
=== Targets ===&lt;br /&gt;
====xt====&lt;br /&gt;
&lt;br /&gt;
* CONNMARK&lt;br /&gt;
[Waiting for support of --save-mark, --restore-mark, --set-mark and --set-xmark] (partial translations available)&amp;lt;br/&amp;gt;&lt;br /&gt;
If --set-mark is used you must only specify the mark.&amp;lt;br/&amp;gt;&lt;br /&gt;
If --set-xmark is used you must specify the mark and the mask.&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
* LOG&lt;br /&gt;
[Waiting for support of log-tcp-sequence, log-tcp-options, log-ip-options, log-uid, log-macdecode] (partial translations available)&lt;br /&gt;
====ip6====&lt;br /&gt;
* LOG&lt;br /&gt;
[Waiting for support of log-tcp-sequence, log-tcp-options, log-ip-options, log-uid, log-macdecode] (partial translations available)&lt;br /&gt;
&lt;br /&gt;
== Untranslatable extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Matches ===&lt;br /&gt;
&lt;br /&gt;
====xt====&lt;br /&gt;
* cgroup&lt;br /&gt;
[Waiting for support of cgroup2 path-based in nft]&lt;br /&gt;
* set&lt;br /&gt;
[Waiting for support]&lt;br /&gt;
: Suggestions for adding support:&lt;br /&gt;
:* Add counters to each element of a set. A counter contains the number of packets that matched an element and the total number of bytes. There must be the option of enabling or disabling the update of counters&#039; values at will. Also counters&#039; values must be accesible in order to do comparisons.&lt;br /&gt;
:* Sets must include different types of elements. Sets must have support for the &amp;quot;nomatch&amp;quot; flag.&lt;br /&gt;
[[User:Robgc|Robgc]] ([[User talk:Robgc|talk]]) 21:48, 21 September 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
* ipv6header&lt;/div&gt;</summary>
		<author><name>Jose</name></author>
	</entry>
	<entry>
		<id>http://wiki.nftables.org/wiki-nftables/index.php?title=List_of_available_translations_via_iptables-translate_tool&amp;diff=492</id>
		<title>List of available translations via iptables-translate tool</title>
		<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php?title=List_of_available_translations_via_iptables-translate_tool&amp;diff=492"/>
		<updated>2020-01-28T12:38:28Z</updated>

		<summary type="html">&lt;p&gt;Jose: move ecn to supported matches. ecn match translation support was added in commit 147a891f8&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following &#039;&#039;&#039;matches and targets&#039;&#039;&#039; (in alphabetic order) can be fully translated via iptables-translate tool:&lt;br /&gt;
== Translatable extensions ==&lt;br /&gt;
=== Matches === &lt;br /&gt;
====xt====&lt;br /&gt;
&lt;br /&gt;
* ipcomp&lt;br /&gt;
* comment&lt;br /&gt;
* connlabel&lt;br /&gt;
* connmark&lt;br /&gt;
* conntrack&lt;br /&gt;
* cpu&lt;br /&gt;
* devgroup&lt;br /&gt;
* dscp&lt;br /&gt;
* ecn&lt;br /&gt;
* esp&lt;br /&gt;
* helper&lt;br /&gt;
* iprange&lt;br /&gt;
* length&lt;br /&gt;
* limit&lt;br /&gt;
* mac&lt;br /&gt;
* mark&lt;br /&gt;
* pkttype&lt;br /&gt;
* state&lt;br /&gt;
* tcp&lt;br /&gt;
* udp&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
&lt;br /&gt;
* ah&lt;br /&gt;
* realm&lt;br /&gt;
* ttl&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
&lt;br /&gt;
* ah&lt;br /&gt;
* frag&lt;br /&gt;
* hbh&lt;br /&gt;
* hl&lt;br /&gt;
* mh&lt;br /&gt;
&lt;br /&gt;
=== Targets ===&lt;br /&gt;
&lt;br /&gt;
====xt====&lt;br /&gt;
* CLASSIFY&lt;br /&gt;
* NFLOG&lt;br /&gt;
* NFQUEUE&lt;br /&gt;
* MARK&lt;br /&gt;
* TEE&lt;br /&gt;
* TRACE&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
&lt;br /&gt;
* DNAT&lt;br /&gt;
* MASQUERADE&lt;br /&gt;
* REDIRECT&lt;br /&gt;
* REJECT&lt;br /&gt;
* SNAT&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
&lt;br /&gt;
* DNAT&lt;br /&gt;
* MASQUERADE&lt;br /&gt;
* REDIRECT&lt;br /&gt;
* REJECT&lt;br /&gt;
* SNAT&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following &#039;&#039;&#039;matches&#039;&#039;&#039; and &#039;&#039;&#039;targets&#039;&#039;&#039; are yet to be translated:&lt;br /&gt;
&lt;br /&gt;
== Partially translatable extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Matches ===&lt;br /&gt;
====xt====&lt;br /&gt;
* dccp&lt;br /&gt;
[Waiting for support of --dccp-option]&lt;br /&gt;
* multiport&lt;br /&gt;
[Waiting for support of --ports]&lt;br /&gt;
* owner&lt;br /&gt;
[Waiting for support of --socket-exists]&lt;br /&gt;
* sctp&lt;br /&gt;
[Waiting for support of --chunk-types]&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
*icmp&lt;br /&gt;
[Waiting for support of packet types]&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
*icmp6&lt;br /&gt;
[Waiting for support of packet types]&lt;br /&gt;
* rt&lt;br /&gt;
[Waiting for support of --rt-0-res, --rt-0-addrs, --rt-0-not-strict] (partial translations available)&lt;br /&gt;
&lt;br /&gt;
=== Targets ===&lt;br /&gt;
====xt====&lt;br /&gt;
&lt;br /&gt;
* CONNMARK&lt;br /&gt;
[Waiting for support of --save-mark, --restore-mark, --set-mark and --set-xmark] (partial translations available)&amp;lt;br/&amp;gt;&lt;br /&gt;
If --set-mark is used you must only specify the mark.&amp;lt;br/&amp;gt;&lt;br /&gt;
If --set-xmark is used you must specify the mark and the mask.&lt;br /&gt;
&lt;br /&gt;
====ip====&lt;br /&gt;
* LOG&lt;br /&gt;
[Waiting for support of log-tcp-sequence, log-tcp-options, log-ip-options, log-uid, log-macdecode] (partial translations available)&lt;br /&gt;
====ip6====&lt;br /&gt;
* LOG&lt;br /&gt;
[Waiting for support of log-tcp-sequence, log-tcp-options, log-ip-options, log-uid, log-macdecode] (partial translations available)&lt;br /&gt;
&lt;br /&gt;
== Untranslatable extensions ==&lt;br /&gt;
&lt;br /&gt;
=== Matches ===&lt;br /&gt;
&lt;br /&gt;
====xt====&lt;br /&gt;
* cgroup&lt;br /&gt;
[Waiting for support of cgroup2 path-based in nft]&lt;br /&gt;
* set&lt;br /&gt;
[Waiting for support]&lt;br /&gt;
: Suggestions for adding support:&lt;br /&gt;
:* Add counters to each element of a set. A counter contains the number of packets that matched an element and the total number of bytes. There must be the option of enabling or disabling the update of counters&#039; values at will. Also counters&#039; values must be accesible in order to do comparisons.&lt;br /&gt;
:* Sets must include different types of elements. Sets must have support for the &amp;quot;nomatch&amp;quot; flag.&lt;br /&gt;
[[User:Robgc|Robgc]] ([[User talk:Robgc|talk]]) 21:48, 21 September 2016 (CEST)&lt;br /&gt;
&lt;br /&gt;
====ip6====&lt;br /&gt;
* ipv6header&lt;/div&gt;</summary>
		<author><name>Jose</name></author>
	</entry>
	<entry>
		<id>http://wiki.nftables.org/wiki-nftables/index.php?title=Main_Page&amp;diff=491</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php?title=Main_Page&amp;diff=491"/>
		<updated>2020-01-19T13:10:02Z</updated>

		<summary type="html">&lt;p&gt;Jose: Add GeoIP matching example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the &#039;&#039;nftables&#039;&#039; HOWTO documentation page. Here you will find documentation on how to build, install, configure and use nftables.&lt;br /&gt;
&lt;br /&gt;
If you have any suggestion to improve it, please send your comments to Netfilter users mailing list &amp;lt;netfilter@vger.kernel.org&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
* [[What is nftables?]]&lt;br /&gt;
* [[Why nftables?]]&lt;br /&gt;
* [[Main differences with iptables]]&lt;br /&gt;
* [[Netfilter hooks]] and integration with existing Netfilter components.&lt;br /&gt;
* [[Adoption]]&lt;br /&gt;
* [[Legacy xtables tools]]&lt;br /&gt;
* [[How to obtain help/support]]&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
* [[Building and installing nftables from sources]]&lt;br /&gt;
* Using [[nftables from distributions]]&lt;br /&gt;
* [[Troubleshooting|Troubleshooting and FAQ]]&lt;br /&gt;
* [[Quick reference-nftables in 10 minutes|Quick reference, nftables in 10 minutes]]&lt;br /&gt;
* [[nftables families|Understanding nftables families]]&lt;br /&gt;
&lt;br /&gt;
= Basic operation =&lt;br /&gt;
&lt;br /&gt;
* [[Configuring tables]]&lt;br /&gt;
* [[Configuring chains]]&lt;br /&gt;
* [[Simple rule management]]&lt;br /&gt;
* [[Atomic rule replacement]]&lt;br /&gt;
* [[Error reporting from the command line]]&lt;br /&gt;
* [[Building rules through expressions]]&lt;br /&gt;
* [[Operations at ruleset level]]&lt;br /&gt;
* [[Monitoring ruleset updates]]&lt;br /&gt;
* [[Scripting]]&lt;br /&gt;
* [[Ruleset debug/tracing]]&lt;br /&gt;
* [[Moving from iptables to nftables]]&lt;br /&gt;
* [[Moving from ipset to nftables]]&lt;br /&gt;
&lt;br /&gt;
= Supported selectors for packet matching =&lt;br /&gt;
&lt;br /&gt;
* [[Matching packet header fields]]&lt;br /&gt;
* [[Matching packet metainformation]]&lt;br /&gt;
* [[Matching connection tracking stateful metainformation]]&lt;br /&gt;
* [[Rate limiting matchings]]&lt;br /&gt;
* [[Routing information]]&lt;br /&gt;
&lt;br /&gt;
= Possible actions on packets =&lt;br /&gt;
&lt;br /&gt;
* [[Accepting and dropping packets]]&lt;br /&gt;
* [[Jumping to chain]]&lt;br /&gt;
* [[Rejecting traffic]]&lt;br /&gt;
* [[Logging traffic]]&lt;br /&gt;
* [[Performing Network Address Translation (NAT)]]&lt;br /&gt;
* [[Setting packet metainformation]]&lt;br /&gt;
* [[Queueing to userspace]]&lt;br /&gt;
* [[Duplicating packets]]&lt;br /&gt;
* [[Mangle packet header fields]]&lt;br /&gt;
* [[Mangle TCP options]]&lt;br /&gt;
* [[Counters]]&lt;br /&gt;
* [[Load balancing]]&lt;br /&gt;
* [[Setting packet connection tracking metainformation]]&lt;br /&gt;
&lt;br /&gt;
Note that, unlike &#039;&#039;iptables&#039;&#039;, you can perform several actions in one single rule.&lt;br /&gt;
&lt;br /&gt;
= Advanced data structures for performance packet classification =&lt;br /&gt;
&lt;br /&gt;
You will have to redesign your rule-set to benefit from these new nice features:&lt;br /&gt;
&lt;br /&gt;
* [[Sets]]&lt;br /&gt;
* [[Dictionaries]]&lt;br /&gt;
* [[Intervals]]&lt;br /&gt;
* [[Maps]]&lt;br /&gt;
* [[Concatenations]]&lt;br /&gt;
* [[Meters|Metering]] (formerly known as flow tables before nftables 0.8.1 release)&lt;br /&gt;
* [[Updating sets from the packet path]]&lt;br /&gt;
* [[Element timeouts]]&lt;br /&gt;
* [[Math operations]]&lt;br /&gt;
* [[Stateful objects]]&lt;br /&gt;
* [[Flowtable]] (the fastpath network stack bypass)&lt;br /&gt;
&lt;br /&gt;
If you are already using [[ipset]] in your &#039;&#039;iptables&#039;&#039; rule-set, that transition may be a bit more simple to you.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
* [[Simple ruleset for a workstation]]&lt;br /&gt;
* [[Bridge filtering]]&lt;br /&gt;
* [[Multiple NATs using nftables maps]]&lt;br /&gt;
* [[Classic perimetral firewall example]]&lt;br /&gt;
* [[Port knocking example]]&lt;br /&gt;
* [[Classification to tc structure example]]&lt;br /&gt;
* [[Using configuration management systems]] (like puppet, ansible, etc)&lt;br /&gt;
* [[GeoIP matching]]&lt;br /&gt;
&lt;br /&gt;
= Development =&lt;br /&gt;
&lt;br /&gt;
Check [[Portal:DeveloperDocs|Portal:DeveloperDocs - documentation for netfilter developers]].&lt;br /&gt;
&lt;br /&gt;
Some hints on the general development progress:&lt;br /&gt;
&lt;br /&gt;
* [[List of updates since Linux kernel 3.13]]&lt;br /&gt;
* [[Supported features compared to xtables|Supported features compared to {ip,ip6,eb,arp}tables]]&lt;br /&gt;
* [[List of available translations via iptables-translate tool]]&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
&lt;br /&gt;
Watch some videos:&lt;br /&gt;
&lt;br /&gt;
* Watch [https://www.youtube.com/watch?v=FXTRRwXi3b4 Getting a grasp of nftables], thanks to [https://www.nluug.nl/index-en.html NLUUG association] for recording this.&lt;br /&gt;
* Watch [https://www.youtube.com/watch?v=CaYp0d2wiuU#t=1m47s The ultimate packet classifier for GNU/Linux], thanks to the FSFE for paying my trip to Barcelona and for recommending me as speaker to the KDE Spanish branch.&lt;br /&gt;
* [https://www.youtube.com/watch?v=Sy0JDX451ns Florian Westphal - Why nftables?]&lt;br /&gt;
* Watch [https://www.youtube.com/watch?v=qXVOA2MKA1s Netdev 2.1 - Netfilter workshop]&lt;br /&gt;
* Watch [https://youtu.be/iCj10vEKPrw Netdev 2.2 - Netf‌ilter mini-workshop]&lt;br /&gt;
* Watch [https://youtu.be/0hqfzp6tpZo Netdev 0x12 - Netf‌ilter mini-workshop]&lt;br /&gt;
* Watch [https://www.youtube.com/watch?v=0wQfSfDVN94 NLUUG - Goodbye iptables, Hello nftables]&lt;br /&gt;
* Watch [https://www.youtube.com/watch?v=Uf5ULkEWPL0 LCA2018 - nftables from a user perspective]&lt;br /&gt;
&lt;br /&gt;
Additional documentations and articles:&lt;br /&gt;
&lt;br /&gt;
* Tutorial [https://zasdfgbnm.github.io/2017/09/07/Extending-nftables/ Extending nftables by Xiang Gao]&lt;br /&gt;
* Article [http://ral-arturo.org/2017/05/05/debian-stretch-stable-nftables.html New in Debian stable Stretch: nftables]&lt;br /&gt;
&lt;br /&gt;
= Thanks =&lt;br /&gt;
&lt;br /&gt;
To the NLnet foundation for initial sponsorship of this HOWTO:&lt;br /&gt;
&lt;br /&gt;
[https://nlnet.nl https://nlnet.nl/image/logo.gif]&lt;br /&gt;
&lt;br /&gt;
To Eric Leblond, for boostrapping the [https://home.regit.org/netfilter-en/nftables-quick-howto/ Nftables quick howto] in 2013.&lt;/div&gt;</summary>
		<author><name>Jose</name></author>
	</entry>
	<entry>
		<id>http://wiki.nftables.org/wiki-nftables/index.php?title=GeoIP_matching&amp;diff=490</id>
		<title>GeoIP matching</title>
		<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php?title=GeoIP_matching&amp;diff=490"/>
		<updated>2020-01-19T13:08:48Z</updated>

		<summary type="html">&lt;p&gt;Jose: Fix ip6 example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
You can use a external script &#039;&#039;&#039;nft_geoip.py&#039;&#039;&#039;, at [https://github.com/JMGuisadoG/nftables-geoip nftables-geoip], to generate mappings between countries and marks that can be later included into your ruleset.&lt;br /&gt;
&lt;br /&gt;
== How to get the script ==&lt;br /&gt;
&lt;br /&gt;
Clone [https://github.com/JMGuisadoG/nftables-geoip nftables-geoip repo]&lt;br /&gt;
&lt;br /&gt;
== How to use the script ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You can use&#039;&#039; &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; ./nft_geoip --help &amp;lt;/code&amp;gt; &#039;&#039;to show the script help&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The script need two .csv files.&lt;br /&gt;
&lt;br /&gt;
* A country data csv (location.csv), its path can be specified with &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; --file-location &amp;lt;/code&amp;gt; option&lt;br /&gt;
* A geoip data csv (dbip.csv), its path can be specified with &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; --file-address &amp;lt;/code&amp;gt; option&lt;br /&gt;
&lt;br /&gt;
=== location.csv ===&lt;br /&gt;
&lt;br /&gt;
The script ships with this file. A modified .csv that contains country data needed to generate the maps.&lt;br /&gt;
&lt;br /&gt;
=== dbip.csv ===&lt;br /&gt;
&lt;br /&gt;
This .csv &#039;&#039;&#039;is not shipped&#039;&#039;&#039; and needed to be retrieved before using the script. There exist the option &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; --download &amp;lt;/code&amp;gt; to do so.&lt;br /&gt;
&lt;br /&gt;
== Generating the geoip maps ==&lt;br /&gt;
&lt;br /&gt;
To generate the mappings in the current directory (assuming you don&#039;t have the dbip.csv file)&lt;br /&gt;
&lt;br /&gt;
  ./nft_geoip.py --file-location location.csv --download&lt;br /&gt;
&lt;br /&gt;
You can specify a different (existing) output directory with &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; --output-dir &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Output files ==&lt;br /&gt;
&lt;br /&gt;
  rwxr-xr-x 2 foobar foobar 4,0K ene  4 19:38 .&lt;br /&gt;
  drwxr-xr-x 5 foobar foobar 4,0K ene  4 19:38 ..&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  22M ene  4 19:38 dbip.csv&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  956 ene  4 19:38 geoip-def-africa.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar 8,3K ene  4 19:38 geoip-def-all.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  902 ene  4 19:38 geoip-def-americas.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar   15 ene  4 19:38 geoip-def-antarctica.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  808 ene  4 19:38 geoip-def-asia.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  810 ene  4 19:38 geoip-def-europe.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  461 ene  4 19:38 geoip-def-oceania.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar 8,8M ene  4 19:38 geoip-ipv4.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  16M ene  4 19:38 geoip-ipv6.nft&lt;br /&gt;
&lt;br /&gt;
When everything is finished you will find the following files in your output directory&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;geoip-def-all.nft&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Containing all definitions. (eg. &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; define $CA = 124 &amp;lt;/code&amp;gt;) the variable name is its&lt;br /&gt;
It also contains a map between country marks and its corresponding continent mark.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;geoip-def-{continent}.nft&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Subset of definitions for countries of a given continent. To be used as marks.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;geoip-ipv4.nft&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Containing the map between ipv4 ranges and its geoip data. &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt;@geoip4&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;geoip-ipv6.nft&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Containing the map between ipv6 ranges and its geoip data. &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt;@geoip6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Marking packets with its country code ==&lt;br /&gt;
&lt;br /&gt;
  meta mark set ip saddr map @geoip4&lt;br /&gt;
&lt;br /&gt;
  meta mark set ip6 saddr map @geoip6&lt;br /&gt;
&lt;br /&gt;
== Matching packets by its country code ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You can only use the country definitions inside your ruleset file and not inside an interactive nft shell&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For example, to match packets marked with the Canada mark.&lt;br /&gt;
&lt;br /&gt;
  meta mark $CA&lt;br /&gt;
&lt;br /&gt;
See the relevant section in [https://wiki.nftables.org/wiki-nftables/index.php/Matching_packet_metainformation#Matching_packets_by_packet_mark Matching packet metainformation]&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Marking input ipv4 packets and counting Spanish traffic ===&lt;br /&gt;
&lt;br /&gt;
  table filter {&lt;br /&gt;
    include &amp;quot;./geoip-def-all.nft&amp;quot;&lt;br /&gt;
    include &amp;quot;./geoip-ipv4.nft&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
    chain input {&lt;br /&gt;
                  type filter hook input priority filter; policy accept;&lt;br /&gt;
                  meta mark set ip saddr map @geoip4&lt;br /&gt;
                  meta mark $ES counter&lt;br /&gt;
                }&lt;br /&gt;
  }&lt;/div&gt;</summary>
		<author><name>Jose</name></author>
	</entry>
	<entry>
		<id>http://wiki.nftables.org/wiki-nftables/index.php?title=GeoIP_matching&amp;diff=489</id>
		<title>GeoIP matching</title>
		<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php?title=GeoIP_matching&amp;diff=489"/>
		<updated>2020-01-19T10:48:36Z</updated>

		<summary type="html">&lt;p&gt;Jose: Create geoip matching page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
You can use a external script &#039;&#039;&#039;nft_geoip.py&#039;&#039;&#039;, at [https://github.com/JMGuisadoG/nftables-geoip nftables-geoip], to generate mappings between countries and marks that can be later included into your ruleset.&lt;br /&gt;
&lt;br /&gt;
== How to get the script ==&lt;br /&gt;
&lt;br /&gt;
Clone [https://github.com/JMGuisadoG/nftables-geoip nftables-geoip repo]&lt;br /&gt;
&lt;br /&gt;
== How to use the script ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You can use&#039;&#039; &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; ./nft_geoip --help &amp;lt;/code&amp;gt; &#039;&#039;to show the script help&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The script need two .csv files.&lt;br /&gt;
&lt;br /&gt;
* A country data csv (location.csv), its path can be specified with &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; --file-location &amp;lt;/code&amp;gt; option&lt;br /&gt;
* A geoip data csv (dbip.csv), its path can be specified with &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; --file-address &amp;lt;/code&amp;gt; option&lt;br /&gt;
&lt;br /&gt;
=== location.csv ===&lt;br /&gt;
&lt;br /&gt;
The script ships with this file. A modified .csv that contains country data needed to generate the maps.&lt;br /&gt;
&lt;br /&gt;
=== dbip.csv ===&lt;br /&gt;
&lt;br /&gt;
This .csv &#039;&#039;&#039;is not shipped&#039;&#039;&#039; and needed to be retrieved before using the script. There exist the option &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; --download &amp;lt;/code&amp;gt; to do so.&lt;br /&gt;
&lt;br /&gt;
== Generating the geoip maps ==&lt;br /&gt;
&lt;br /&gt;
To generate the mappings in the current directory (assuming you don&#039;t have the dbip.csv file)&lt;br /&gt;
&lt;br /&gt;
  ./nft_geoip.py --file-location location.csv --download&lt;br /&gt;
&lt;br /&gt;
You can specify a different (existing) output directory with &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; --output-dir &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Output files ==&lt;br /&gt;
&lt;br /&gt;
  rwxr-xr-x 2 foobar foobar 4,0K ene  4 19:38 .&lt;br /&gt;
  drwxr-xr-x 5 foobar foobar 4,0K ene  4 19:38 ..&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  22M ene  4 19:38 dbip.csv&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  956 ene  4 19:38 geoip-def-africa.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar 8,3K ene  4 19:38 geoip-def-all.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  902 ene  4 19:38 geoip-def-americas.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar   15 ene  4 19:38 geoip-def-antarctica.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  808 ene  4 19:38 geoip-def-asia.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  810 ene  4 19:38 geoip-def-europe.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  461 ene  4 19:38 geoip-def-oceania.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar 8,8M ene  4 19:38 geoip-ipv4.nft&lt;br /&gt;
  -rw-r--r-- 1 foobar foobar  16M ene  4 19:38 geoip-ipv6.nft&lt;br /&gt;
&lt;br /&gt;
When everything is finished you will find the following files in your output directory&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;geoip-def-all.nft&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Containing all definitions. (eg. &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt; define $CA = 124 &amp;lt;/code&amp;gt;) the variable name is its&lt;br /&gt;
It also contains a map between country marks and its corresponding continent mark.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;geoip-def-{continent}.nft&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Subset of definitions for countries of a given continent. To be used as marks.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;geoip-ipv4.nft&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Containing the map between ipv4 ranges and its geoip data. &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt;@geoip4&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;geoip-ipv6.nft&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Containing the map between ipv6 ranges and its geoip data. &amp;lt;code lang=&amp;quot;bash&amp;quot;&amp;gt;@geoip6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Marking packets with its country code ==&lt;br /&gt;
&lt;br /&gt;
  meta mark set ip saddr map @geoip4&lt;br /&gt;
&lt;br /&gt;
  meta mark set ip saddr map @geoip6&lt;br /&gt;
&lt;br /&gt;
== Matching packets by its country code ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You can only use the country definitions inside your ruleset file and not inside an interactive nft shell&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For example, to match packets marked with the Canada mark.&lt;br /&gt;
&lt;br /&gt;
  meta mark $CA&lt;br /&gt;
&lt;br /&gt;
See the relevant section in [https://wiki.nftables.org/wiki-nftables/index.php/Matching_packet_metainformation#Matching_packets_by_packet_mark Matching packet metainformation]&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Marking input ipv4 packets and counting Spanish traffic ===&lt;br /&gt;
&lt;br /&gt;
  table filter {&lt;br /&gt;
    include &amp;quot;./geoip-def-all.nft&amp;quot;&lt;br /&gt;
    include &amp;quot;./geoip-ipv4.nft&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
    chain input {&lt;br /&gt;
                  type filter hook input priority filter; policy accept;&lt;br /&gt;
                  meta mark set ip saddr map @geoip4&lt;br /&gt;
                  meta mark $ES counter&lt;br /&gt;
                }&lt;br /&gt;
  }&lt;/div&gt;</summary>
		<author><name>Jose</name></author>
	</entry>
</feed>