| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>ProFTPD module mod_dnsbl</title> |
| 5 | </head> |
| 6 | |
| 7 | <body bgcolor=white> |
| 8 | |
| 9 | <hr> |
| 10 | <center> |
| 11 | <h2><b>ProFTPD module <code>mod_dnsbl</code></b></h2> |
| 12 | </center> |
| 13 | <hr><br> |
| 14 | |
| 15 | <p> |
| 16 | A DNS blacklist is a way in which the DNS can be used to "blacklist" |
| 17 | sites/addresses that have been deemd to be "bad" in some way. These |
| 18 | blacklists are often used by email servers, for determining and rejecting |
| 19 | email sent by addresses known to be sources of spam. More information |
| 20 | on DNS blacklists can be found here: |
| 21 | <pre> |
| 22 | <a href="http://en.wikipedia.org/wiki/DNSBL">http://en.wikipedia.org/wiki/DNSBL</a> |
| 23 | </pre> |
| 24 | |
| 25 | <p> |
| 26 | While DNS blacklists are well known for use by email servers, it is <i>also</i> |
| 27 | possible to use them for other means, such as ways of checking whether an |
| 28 | FTP client's address should be allowed or rejected by an FTP server. Thus |
| 29 | the <code>mod_dnsbl</code> module was written for ProFTPD, for such a purpose. |
| 30 | |
| 31 | <p> |
| 32 | The <code>mod_dnsbl</code> module is not compiled by default; build/installation |
| 33 | instructions are discussed <a href="#Installation">here</a>. |
| 34 | |
| 35 | <p> |
| 36 | The most current version of <code>mod_dnsbl</code> is distributed with the |
| 37 | ProFTPD source code. |
| 38 | |
| 39 | <h2>Author</h2> |
| 40 | <p> |
| 41 | Please contact TJ Saunders <tj <i>at</i> castaglia.org> with any |
| 42 | questions, concerns, or suggestions regarding this module. |
| 43 | |
| 44 | <h2>Directives</h2> |
| 45 | <ul> |
| 46 | <li><a href="#DNSBLDomain">DNSBLDomain</a> |
| 47 | <li><a href="#DNSBLEngine">DNSBLEngine</a> |
| 48 | <li><a href="#DNSBLLog">DNSBLLog</a> |
| 49 | <li><a href="#DNSBLPolicy">DNSBLPolicy</a> |
| 50 | </ul> |
| 51 | |
| 52 | <hr> |
| 53 | <h3><a name="DNSBLDomain">DNSBLDomain</a></h3> |
| 54 | <strong>Syntax:</strong> DNSBLDomain <em>domain</em><br> |
| 55 | <strong>Default:</strong> None<br> |
| 56 | <strong>Context:</strong> server config, <code><VirtualHost></code>, <code><Global></code><br> |
| 57 | <strong>Module:</strong> mod_dnsbl<br> |
| 58 | <strong>Compatibility:</strong> 1.3.1rc1 and later |
| 59 | |
| 60 | <p> |
| 61 | The <code>DNSBLDomain</code> directive is used to configure the DNS name of |
| 62 | a DNS blacklist site, to be consulted when determining whether |
| 63 | <code>mod_dnsbl</code> should allow or reject an FTP connection. This |
| 64 | directive can be used multiple times, to configure multiple different DNS |
| 65 | blacklist sites. When checking these sites, the <code>mod_dnsbl</code> module |
| 66 | will check each <code>DNSBLDomain</code>, in the order they appear in the |
| 67 | <code>proftpd.conf</code> file. |
| 68 | |
| 69 | <p> |
| 70 | Example: |
| 71 | <pre> |
| 72 | DNSBLDomain sbl.spamhaus.org |
| 73 | DNSBLDomain xbl.spamhaus.org |
| 74 | </pre> |
| 75 | |
| 76 | <p> |
| 77 | <hr> |
| 78 | <h3><a name="DNSBLEngine">DNSBLEngine</a></h3> |
| 79 | <strong>Syntax:</strong> DNSBLEngine <em>on|off</em><br> |
| 80 | <strong>Default:</strong> None<br> |
| 81 | <strong>Context:</strong> server config, <code><VirtualHost></code>, <code><Global></code><br> |
| 82 | <strong>Module:</strong> mod_dnsbl<br> |
| 83 | <strong>Compatibility:</strong> 1.3.1rc1 and later |
| 84 | |
| 85 | <p> |
| 86 | The <code>DNSBLEngine</code> directive toggles the use of DNS blacklists for |
| 87 | access control for FTP client connections (<i>e.g.</i> <code>mod_dnsbl</code>). |
| 88 | This is usually used inside a <code><VirtualHost></code> section to |
| 89 | enable DNS blacklist use for a particular virtual host. By default |
| 90 | <code>mod_dnsbl</code> is disabled for both the main server and all configured |
| 91 | virtual hosts. |
| 92 | |
| 93 | <p> |
| 94 | <hr> |
| 95 | <h3><a name="DNSBLLog">DNSBLLog</a></h3> |
| 96 | <strong>Syntax:</strong> DNSBLLog <em>file</em><br> |
| 97 | <strong>Default:</strong> None<br> |
| 98 | <strong>Context:</strong> server config, <code><VirtualHost></code>, <code><Global></code><br> |
| 99 | <strong>Module:</strong> mod_dnsbl<br> |
| 100 | <strong>Compatibility:</strong> 1.3.1rc1 and later |
| 101 | |
| 102 | <p> |
| 103 | The <code>DNSBLLog</code> directive is used to specify a log file for |
| 104 | <code>mod_dnsbl</code>'s reporting on a per-server basis. The <em>file</em> |
| 105 | parameter given must be the full path to the file to use for logging. |
| 106 | |
| 107 | <p> |
| 108 | Note that this path must <b>not</b> be to a world-writable directory and, |
| 109 | unless <code>AllowLogSymlinks</code> is explicitly set to <em>on</em> |
| 110 | (generally a bad idea), the path must <b>not</b> be a symbolic link. |
| 111 | |
| 112 | <p> |
| 113 | <hr> |
| 114 | <h3><a name="DNSBLPolicy">DNSBLPolicy</a></h3> |
| 115 | <strong>Syntax:</strong> DNSBLPolicy <em>"allow,deny"|"deny,allow"</em><br> |
| 116 | <strong>Default:</strong> None<br> |
| 117 | <strong>Context:</strong> server config, <code><VirtualHost></code>, <code><Global></code><br> |
| 118 | <strong>Module:</strong> mod_dnsbl<br> |
| 119 | <strong>Compatibility:</strong> 1.3.1rc1 and later |
| 120 | |
| 121 | <p> |
| 122 | The <code>DNSBLPolicy</code> directive determines whether the |
| 123 | <code>mod_dnsbl</code> module (if enabled) will allow a connection by default |
| 124 | or not. |
| 125 | |
| 126 | <p> |
| 127 | If <code>DNSBLPolicy</code> is configured using <em>"allow,deny"</em>, then |
| 128 | the <code>mod_dnsbl</code> module will allow the connection, <i>unless</i> |
| 129 | the connecting client is blacklisted by <i>any</i> of the configured |
| 130 | <code>DNSBLDomain</code> sites. |
| 131 | |
| 132 | <p> |
| 133 | If <code>DNSBLPolicy</code> is configured using <em>"deny,allow"</em>, then |
| 134 | the <code>mod_dnsbl</code> module will <b>not</b> allow the connection, |
| 135 | <i>unless</i> the connecting client is listed by any of the configured |
| 136 | <code>DNSBLDomain</code> sites. |
| 137 | |
| 138 | <p> |
| 139 | <hr><br> |
| 140 | <h2><a name="Installation">Installation</a></h2> |
| 141 | The <code>mod_dnsbl</code> module is distributed with ProFTPD. Simply follow |
| 142 | the normal steps for using third-party modules in ProFTPD: |
| 143 | <pre> |
| 144 | $ ./configure --with-modules=mod_dnsbl |
| 145 | $ make |
| 146 | $ make install |
| 147 | </pre> |
| 148 | Alternatively, <code>mod_dnsbl</code> can be built as a DSO module: |
| 149 | <pre> |
| 150 | $ ./configure --enable-dso --with-shared=mod_dnbsl ... |
| 151 | </pre> |
| 152 | Then follow the usual steps: |
| 153 | <pre> |
| 154 | $ make |
| 155 | $ make install |
| 156 | </pre> |
| 157 | |
| 158 | <p> |
| 159 | <b>Logging</b><br> |
| 160 | The <code>mod_dnbsl</code> module supports different forms of logging. The |
| 161 | main module logging is done via the <code>DNSBLLog</code> directive. |
| 162 | For debugging purposes, the module also uses <a href="../howto/Tracing.html">trace logging</a>, via the module-specific log channels: |
| 163 | <ul> |
| 164 | <li>dnsbl |
| 165 | </ul> |
| 166 | Thus for trace logging, to aid in debugging, you would use the following in |
| 167 | your <code>proftpd.conf</code>: |
| 168 | <pre> |
| 169 | TraceLog /path/to/ftpd/trace.log |
| 170 | Trace dnsbl:20 |
| 171 | </pre> |
| 172 | This trace logging can generate large files; it is intended for debugging use |
| 173 | only, and should be removed from any production configuration. |
| 174 | |
| 175 | <p> |
| 176 | <hr> |
| 177 | |
| 178 | <font size=2><b><i> |
| 179 | © Copyright 2007-2014 TJ Saunders<br> |
| 180 | All Rights Reserved<br> |
| 181 | </i></b></font> |
| 182 | |
| 183 | <hr> |
| 184 | </body> |
| 185 | </html> |