{"id":3251,"date":"2022-12-20T16:43:58","date_gmt":"2022-12-20T19:43:58","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/xtables-nft-man8\/"},"modified":"2022-12-20T16:43:58","modified_gmt":"2022-12-20T19:43:58","slug":"xtables-nft-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/xtables-nft-man8\/","title":{"rendered":"XTABLES-NFT (man8)"},"content":{"rendered":"<h1 align=\"center\">XTABLES-NFT<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#USAGE\">USAGE<\/a><br \/> <a href=\"#DIFFERENCES TO LEGACY IPTABLES\">DIFFERENCES TO LEGACY IPTABLES<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#LIMITATIONS\">LIMITATIONS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHORS\">AUTHORS<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">xtables-nft \u2014 iptables using nftables kernel api<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>xtables-nft<\/b> are versions of iptables that use the nftables API. This is a set of tools to help the system administrator migrate the ruleset from <b>iptables(8)<\/b>, <b>ip6tables(8)<\/b>, <b>arptables(8)<\/b>, and <b>ebtables(8)<\/b> to <b>nftables(8)<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>xtables-nft<\/b> set is composed of several commands:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"32%\">\n<p>iptables\u2212nft<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"32%\">\n<p>iptables\u2212nft\u2212save<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"32%\">\n<p>iptables\u2212nft\u2212restore<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"32%\">\n<p>ip6tables\u2212nft<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"32%\">\n<p>ip6tables\u2212nft\u2212save<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"32%\">\n<p>ip6tables\u2212nft\u2212restore<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"32%\">\n<p>arptables\u2212nft<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"32%\">\n<p>ebtables\u2212nft<\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:14%; margin-top: 1em\">These tools use the libxtables framework extensions and hook to the nf_tables kernel subsystem using the <b>nft_compat<\/b> module.<\/p>\n<h2>USAGE <a name=\"USAGE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The xtables-nft tools allow you to manage the nf_tables backend using the native syntax of <b>iptables(8)<\/b>, <b>ip6tables(8)<\/b>, <b>arptables(8)<\/b>, and <b>ebtables(8)<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">You should use the xtables-nft tools exactly the same way as you would use the corresponding original tools.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Adding a rule will result in that rule being added to the nf_tables kernel subsystem instead. Listing the ruleset will use the nf_tables backend as well.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">When these tools were designed, the main idea was to replace each legacy binary with a symlink to the xtables-nft program, for example:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/sbin\/iptables -> \/usr\/sbin\/iptables\u2212nft\u2212multi<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>\/sbin\/ip6tables -> \/usr\/sbin\/ip6tables\u2212nft\u2212multi<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>\/sbin\/arptables -> \/usr\/sbin\/arptables\u2212nft\u2212multi<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>\/sbin\/ebtables -> \/usr\/sbin\/ebtables\u2212nft\u2212multi<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">The iptables version string will indicate whether the legacy API (get\/setsockopt) or the new nf_tables api is used:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>iptables \u2212V<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>iptables v1.7 (nf_tables)<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>DIFFERENCES TO LEGACY IPTABLES <a name=\"DIFFERENCES TO LEGACY IPTABLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Because the xtables-nft tools use the nf_tables kernel API, rule additions and deletions are always atomic. Unlike iptables-legacy, iptables-nft \u2212A .. will NOT need to retrieve the current ruleset from the kernel, change it, and re-load the altered ruleset. Instead, iptables-nft will tell the kernel to add one rule. For this reason, the iptables-legacy \u2212\u2212wait option is a no-op in iptables-nft.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Use of the xtables-nft tools allow monitoring ruleset changes using the <b>xtables\u2212monitor(8)<\/b> command.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">When using \u2212j TRACE to debug packet traversal to the ruleset, note that you will need to use <b>xtables\u2212monitor(8)<\/b> in \u2212\u2212trace mode to obtain monitoring trace events.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">One basic example is creating the skeleton ruleset in nf_tables from the xtables-nft tools, in a fresh machine:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>root@machine:~# iptables\u2212nft \u2212L<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>[&#8230;]<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>root@machine:~# ip6tables\u2212nft \u2212L<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>[&#8230;]<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>root@machine:~# arptables\u2212nft \u2212L<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>[&#8230;]<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>root@machine:~# ebtables\u2212nft \u2212L<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>[&#8230;]<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>root@machine:~# nft list ruleset<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>table ip filter {<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>chain INPUT {<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"69%\">\n<p>type filter hook input priority 0; policy accept;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>chain FORWARD {<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"69%\">\n<p>type filter hook forward priority 0; policy accept;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>chain OUTPUT {<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"69%\">\n<p>type filter hook output priority 0; policy accept;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>table ip6 filter {<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>chain INPUT {<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"69%\">\n<p>type filter hook input priority 0; policy accept;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>chain FORWARD {<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"69%\">\n<p>type filter hook forward priority 0; policy accept;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>chain OUTPUT {<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"69%\">\n<p>type filter hook output priority 0; policy accept;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>table bridge filter {<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>chain INPUT {<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"69%\">\n<p>type filter hook input priority \u2212200; policy accept;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>chain FORWARD {<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"69%\">\n<p>type filter hook forward priority \u2212200; policy accept;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>chain OUTPUT {<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"69%\">\n<p>type filter hook output priority \u2212200; policy accept;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>table arp filter {<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>chain INPUT {<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"69%\">\n<p>type filter hook input priority 0; policy accept;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>chain FORWARD {<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"69%\">\n<p>type filter hook forward priority 0; policy accept;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>chain OUTPUT {<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"69%\">\n<p>type filter hook output priority 0; policy accept;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"> <\/td>\n<td width=\"8%\"> <\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"7%\"><\/td>\n<td width=\"8%\">\n<p>}<\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">(please note that in fresh machines, listing the ruleset for the first time results in all tables an chain being created).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To migrate your complete filter ruleset, in the case of <b>iptables(8)<\/b>, you would use:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>root@machine:~# iptables\u2212legacy\u2212save > myruleset # reads from x_tables<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>root@machine:~# iptables\u2212nft\u2212restore myruleset # writes to nf_tables<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\">or<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>root@machine:~# iptables\u2212legacy\u2212save | iptables-translate-restore | less<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">to see how rules would look like in the nft <b>nft(8)<\/b> syntax.<\/p>\n<h2>LIMITATIONS <a name=\"LIMITATIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">You should use <b>Linux kernel >= 4.17<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The CLUSTERIP target is not supported.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To get up-to-date information about this, please head to <b>http:\/\/wiki.nftables.org\/<\/b>.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>nft(8)<\/b>, <b>xtables\u2212translate(8)<\/b>, <b>xtables\u2212monitor(8)<\/b><\/p>\n<h2>AUTHORS <a name=\"AUTHORS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The nftables framework is written by the Netfilter project (https:\/\/www.netfilter.org).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This manual page was written by Arturo Borrero Gonzalez <arturo@debian.org> for the Debian project, but may be used by others.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This documentation is free\/libre under the terms of the GPLv2+.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  xtables-nft \u2014 iptables using nftables kernel api <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,388],"class_list":["post-3251","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-xtables-nft"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3251"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3251\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}