<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Smtp on vlan51</title><link>https://vlan51.com/tags/smtp/</link><description>Recent content in Smtp on vlan51</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Thu, 01 Oct 2015 00:00:00 +0000</lastBuildDate><atom:link href="https://vlan51.com/tags/smtp/index.xml" rel="self" type="application/rss+xml"/><item><title>Restricting SMTP Access with ACLs on Citrix NetScaler</title><link>https://vlan51.com/netscaler/acl-restrict-smtp/</link><pubDate>Thu, 01 Oct 2015 00:00:00 +0000</pubDate><guid>https://vlan51.com/netscaler/acl-restrict-smtp/</guid><description>&lt;p&gt;I had to configure a Citrix NetScaler (version 10.5) to load balance SMTP for an organisation that relayed mail through Microsoft&amp;rsquo;s smart host. Only specific source IP addresses should be able to reach port 25.&lt;/p&gt;&#10;&lt;p&gt;This is all done from the CLI. In the GUI, the same settings are under &lt;strong&gt;Configuration → System → Network → ACLs&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p&gt;In this example, the permitted senders are &lt;code&gt;1.1.1.1&lt;/code&gt; and &lt;code&gt;2.2.2.2&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h2 id="create-the-acls"&gt;Create the ACLs &lt;a class="anchor" href="#create-the-acls" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;div class="code"&gt;&#10; &lt;div class="code-bar"&gt;&lt;span&gt;cli&lt;/span&gt;&lt;button class="copy" type="button" aria-label="Copy to clipboard"&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;&amp;gt; add ns acl ALLOW-SMTP-1.1.1.1 ALLOW -srcIP = 1.1.1.1 -destPort = 25 -protocol TCP -priority 10&#10; Done&#10;&amp;gt; add ns acl ALLOW-SMTP-2.2.2.2 ALLOW -srcIP = 2.2.2.2 -destPort = 25 -protocol TCP -priority 20&#10; Done&#10;&amp;gt; add ns acl RESTRICT-SMTP-ALL DENY -srcIP = 0.0.0.0-* -destPort = 25 -protocol TCP -priority 50&#10; Done&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;p&gt;There&amp;rsquo;s no implicit deny or permit at the end of a NetScaler ACL list, so you need the explicit &lt;code&gt;DENY&lt;/code&gt; rule to block everyone else. Lower priority numbers are evaluated first.&lt;/p&gt;</description></item></channel></rss>