<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.nftables.org/wiki-nftables/index.php?action=history&amp;feed=atom&amp;title=Building_rules_through_expressions</id>
	<title>Building rules through expressions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.nftables.org/wiki-nftables/index.php?action=history&amp;feed=atom&amp;title=Building_rules_through_expressions"/>
	<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php?title=Building_rules_through_expressions&amp;action=history"/>
	<updated>2026-05-15T08:41:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>http://wiki.nftables.org/wiki-nftables/index.php?title=Building_rules_through_expressions&amp;diff=164&amp;oldid=prev</id>
		<title>Duncan: Inserted missing &quot;equal&quot; rule; changed &quot;non equal&quot; to &quot;not equal&quot;; italicised equal and not equal to match other rules;use &quot;which stands for&quot; throughout</title>
		<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php?title=Building_rules_through_expressions&amp;diff=164&amp;oldid=prev"/>
		<updated>2017-08-15T21:54:36Z</updated>

		<summary type="html">&lt;p&gt;Inserted missing &amp;quot;equal&amp;quot; rule; changed &amp;quot;non equal&amp;quot; to &amp;quot;not equal&amp;quot;; italicised equal and not equal to match other rules;use &amp;quot;which stands for&amp;quot; throughout&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:54, 15 August 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;nftables&amp;#039;&amp;#039; provides the following built-in operations:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;nftables&amp;#039;&amp;#039; provides the following built-in operations:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;ne&#039;&#039;&#039; which stands for &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;non &lt;/del&gt;equal. Alternatively you can use &#039;&#039;&#039;!=&#039;&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;eq&#039;&#039;&#039; which stands for &#039;&#039;equal&#039;&#039;. Alternatively you can use &#039;&#039;&#039;==&#039;&#039;&#039;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;lt&#039;&#039;&#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;means &lt;/del&gt;&#039;&#039;less than&#039;&#039;. Alternatively you can use &#039;&#039;&#039;&amp;lt;&#039;&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;ne&#039;&#039;&#039; which stands for &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;not &lt;/ins&gt;equal&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&lt;/ins&gt;. Alternatively you can use &#039;&#039;&#039;!=&#039;&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;gt&#039;&#039;&#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;means &lt;/del&gt;&#039;&#039;greater than&#039;&#039;. Alternatively you can use &#039;&#039;&#039;&amp;gt;&#039;&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;lt&#039;&#039;&#039; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;which stands for &lt;/ins&gt;&#039;&#039;less than&#039;&#039;. Alternatively you can use &#039;&#039;&#039;&amp;lt;&#039;&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;le&#039;&#039;&#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;means &lt;/del&gt;&#039;&#039;less than or equal to&#039;&#039;. Alternatively you can use &#039;&#039;&#039;&amp;lt;=&#039;&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;gt&#039;&#039;&#039; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;which stands for &lt;/ins&gt;&#039;&#039;greater than&#039;&#039;. Alternatively you can use &#039;&#039;&#039;&amp;gt;&#039;&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;ge&#039;&#039;&#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;means &lt;/del&gt;&#039;&#039;greater than or equal to&#039;&#039;. Alternatively you can use &#039;&#039;&#039;&amp;gt;=&#039;&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;le&#039;&#039;&#039; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;which stands for &lt;/ins&gt;&#039;&#039;less than or equal to&#039;&#039;. Alternatively you can use &#039;&#039;&#039;&amp;lt;=&#039;&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;ge&#039;&#039;&#039; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;which stands for &lt;/ins&gt;&#039;&#039;greater than or equal to&#039;&#039;. Alternatively you can use &#039;&#039;&#039;&amp;gt;=&#039;&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Beware&amp;#039;&amp;#039;&amp;#039;: if you use the symbols &amp;#039;&amp;#039;&amp;#039;&amp;lt;&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;&amp;gt;&amp;#039;&amp;#039;&amp;#039; from the shell since it will interpret those as the standard input and output redirection respectively. You will need to escape them, eg. &amp;#039;&amp;#039;&amp;#039;\&amp;lt;&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Beware&amp;#039;&amp;#039;&amp;#039;: if you use the symbols &amp;#039;&amp;#039;&amp;#039;&amp;lt;&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;&amp;gt;&amp;#039;&amp;#039;&amp;#039; from the shell since it will interpret those as the standard input and output redirection respectively. You will need to escape them, eg. &amp;#039;&amp;#039;&amp;#039;\&amp;lt;&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb_nftables:diff:1.41:old-21:rev-164:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Duncan</name></author>
	</entry>
	<entry>
		<id>http://wiki.nftables.org/wiki-nftables/index.php?title=Building_rules_through_expressions&amp;diff=21&amp;oldid=prev</id>
		<title>Pablo: Created page with &quot;&#039;&#039;nftables&#039;&#039; provides the following built-in operations:  * &#039;&#039;&#039;ne&#039;&#039;&#039; which stands for non equal. Alternatively you can use &#039;&#039;&#039;!=&#039;&#039;&#039;. * &#039;&#039;&#039;lt&#039;&#039;&#039; means &#039;&#039;less than&#039;&#039;. Alternativ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.nftables.org/wiki-nftables/index.php?title=Building_rules_through_expressions&amp;diff=21&amp;oldid=prev"/>
		<updated>2016-07-13T17:49:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;nftables&amp;#039;&amp;#039; provides the following built-in operations:  * &amp;#039;&amp;#039;&amp;#039;ne&amp;#039;&amp;#039;&amp;#039; which stands for non equal. Alternatively you can use &amp;#039;&amp;#039;&amp;#039;!=&amp;#039;&amp;#039;&amp;#039;. * &amp;#039;&amp;#039;&amp;#039;lt&amp;#039;&amp;#039;&amp;#039; means &amp;#039;&amp;#039;less than&amp;#039;&amp;#039;. Alternativ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;nftables&amp;#039;&amp;#039; provides the following built-in operations:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ne&amp;#039;&amp;#039;&amp;#039; which stands for non equal. Alternatively you can use &amp;#039;&amp;#039;&amp;#039;!=&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;lt&amp;#039;&amp;#039;&amp;#039; means &amp;#039;&amp;#039;less than&amp;#039;&amp;#039;. Alternatively you can use &amp;#039;&amp;#039;&amp;#039;&amp;lt;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;gt&amp;#039;&amp;#039;&amp;#039; means &amp;#039;&amp;#039;greater than&amp;#039;&amp;#039;. Alternatively you can use &amp;#039;&amp;#039;&amp;#039;&amp;gt;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;le&amp;#039;&amp;#039;&amp;#039; means &amp;#039;&amp;#039;less than or equal to&amp;#039;&amp;#039;. Alternatively you can use &amp;#039;&amp;#039;&amp;#039;&amp;lt;=&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ge&amp;#039;&amp;#039;&amp;#039; means &amp;#039;&amp;#039;greater than or equal to&amp;#039;&amp;#039;. Alternatively you can use &amp;#039;&amp;#039;&amp;#039;&amp;gt;=&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Beware&amp;#039;&amp;#039;&amp;#039;: if you use the symbols &amp;#039;&amp;#039;&amp;#039;&amp;lt;&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;&amp;gt;&amp;#039;&amp;#039;&amp;#039; from the shell since it will interpret those as the standard input and output redirection respectively. You will need to escape them, eg. &amp;#039;&amp;#039;&amp;#039;\&amp;lt;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The following example shows how to match all incoming traffic &amp;#039;&amp;#039;not&amp;#039;&amp;#039; coming to port TCP/22.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
nft add rule filter input tcp dport != 22&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly, you can also match traffic coming to high ports with the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
nft add rule filter input tcp dport &amp;gt;= 1024&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pablo</name></author>
	</entry>
</feed>