|
|
|
|
@@ -128,7 +128,9 @@ for more details.</p>
|
|
|
|
|
with this program. If not, see <a
|
|
|
|
|
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.
|
|
|
|
|
<code>CRITICAL</code>,<code>ERROR</code>,<code>WARNING</code>,<code>NOTICE</code>,<code>INFO</code>
|
|
|
|
|
and <code>DEBUG</code>.</p>
|
|
|
|
|
and <code>DEBUG</code>.
|
|
|
|
|
@param [string] Report ban via badips.com, and use
|
|
|
|
|
as blacklist</p>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -537,10 +539,10 @@ auto: will use the system locale setting</p>
|
|
|
|
|
<span class='name'>fn_enabled</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class='type'>(<tt>string</tt>)</span>
|
|
|
|
|
<span class='type'>(<tt>boolean</tt>)</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<em class="default">(defaults to: <tt>'false'</tt>)</em>
|
|
|
|
|
<em class="default">(defaults to: <tt>false</tt>)</em>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
—
|
|
|
|
|
@@ -714,6 +716,212 @@ href="https://tools.ietf.org/html/rfc7231#section-5.5.3">tools.ietf.org/html/rfc
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
<span class='name'>fn_banaction</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class='type'>(<tt>string</tt>)</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<em class="default">(defaults to: <tt>'iptables-multiport'</tt>)</em>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
—
|
|
|
|
|
<div class='inline'>
|
|
|
|
|
<p>Default banning action</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
<span class='name'>fn_banaction_allports</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class='type'>(<tt>string</tt>)</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<em class="default">(defaults to: <tt>'iptables-allports'</tt>)</em>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
—
|
|
|
|
|
<div class='inline'>
|
|
|
|
|
<p>Default banning action</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
<span class='name'>fn_action_</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class='type'>(<tt>string</tt>)</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<em class="default">(defaults to: <tt>'%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]'</tt>)</em>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
—
|
|
|
|
|
<div class='inline'>
|
|
|
|
|
<p>ban only</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
<span class='name'>fn_action_mw</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class='type'>(<tt>string</tt>)</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<em class="default">(defaults to: <tt>'%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
|
|
|
|
|
%(mta)s-whois[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", protocol="%(protocol)s", chain="%(chain)s"]'</tt>)</em>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
—
|
|
|
|
|
<div class='inline'>
|
|
|
|
|
<p>ban & send an e-mail with whois report to the
|
|
|
|
|
destemail.</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
<span class='name'>fn_action_mwl</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class='type'>(<tt>string</tt>)</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<em class="default">(defaults to: <tt>'%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
|
|
|
|
|
%(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]'</tt>)</em>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
—
|
|
|
|
|
<div class='inline'>
|
|
|
|
|
<p>ban & send an e-mail with whois report and
|
|
|
|
|
relevant log lines</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
<span class='name'>fn_action_xarf</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class='type'>(<tt>string</tt>)</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<em class="default">(defaults to: <tt>'%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
|
|
|
|
|
xarf-login-attack[service=%(__name__)s, sender="%(sender)s", logpath=%(logpath)s, port="%(port)s"]'</tt>)</em>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
—
|
|
|
|
|
<div class='inline'>
|
|
|
|
|
<p>ban & send a xarf e-mail to abuse contact of
|
|
|
|
|
IP address and include
|
|
|
|
|
relevant log lines.</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
<span class='name'>fn_action_cf_mwl</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class='type'>(<tt>string</tt>)</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<em class="default">(defaults to: <tt>'cloudflare[cfuser="%(cfemail)s", cftoken="%(cfapikey)s"]
|
|
|
|
|
%(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]'</tt>)</em>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
—
|
|
|
|
|
<div class='inline'>
|
|
|
|
|
<p>ban IP on CloudFlare & send an e-mail with
|
|
|
|
|
whois report and relevant
|
|
|
|
|
log lines.</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
<span class='name'>fn_action_blocklist_de</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class='type'>(<tt>string</tt>)</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<em class="default">(defaults to: <tt>'blocklist_de[email="%(sender)s", service=%(filter)s, apikey="%(blocklist_de_apikey)s", agent="%(fail2ban_agent)s"]'</tt>)</em>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
—
|
|
|
|
|
<div class='inline'>
|
|
|
|
|
<p>Report block via blocklist.de fail2ban
|
|
|
|
|
reporting service API</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
<span class='name'>fn_action_badips_report</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class='type'>(<tt>string</tt>)</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<em class="default">(defaults to: <tt>'badips[category="%(__name__)s", agent="%(fail2ban_agent)s"]'</tt>)</em>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
—
|
|
|
|
|
<div class='inline'>
|
|
|
|
|
<h1 id="label-Report+ban+via+badips.com">Report ban via badips.com</h1>
|
|
|
|
|
|
|
|
|
|
<p>(uses action.d/badips.conf for reporting only).</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
<span class='name'>fn_default_action</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class='type'>(<tt>string</tt>)</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<em class="default">(defaults to: <tt>'action_'</tt>)</em>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
—
|
|
|
|
|
<div class='inline'>
|
|
|
|
|
<p>Choose default action.</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
<span class='name'>fn_action_badips</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class='type'>(<tt>Any</tt>)</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<em class="default">(defaults to: <tt>'badips.py[category="%(__name__)s", banaction="%(banaction)s", agent="%(fail2ban_agent)s"]'</tt>)</em>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -724,23 +932,6 @@ href="https://tools.ietf.org/html/rfc7231#section-5.5.3">tools.ietf.org/html/rfc
|
|
|
|
|
<pre class="lines">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
105
|
|
|
|
|
106
|
|
|
|
|
107
|
|
|
|
|
108
|
|
|
|
|
109
|
|
|
|
|
110
|
|
|
|
|
111
|
|
|
|
|
112
|
|
|
|
|
113
|
|
|
|
|
114
|
|
|
|
|
115
|
|
|
|
|
116
|
|
|
|
|
117
|
|
|
|
|
118
|
|
|
|
|
119
|
|
|
|
|
120
|
|
|
|
|
121
|
|
|
|
|
122
|
|
|
|
|
123
|
|
|
|
|
@@ -804,47 +995,92 @@ href="https://tools.ietf.org/html/rfc7231#section-5.5.3">tools.ietf.org/html/rfc
|
|
|
|
|
181
|
|
|
|
|
182
|
|
|
|
|
183
|
|
|
|
|
184</pre>
|
|
|
|
|
184
|
|
|
|
|
185
|
|
|
|
|
186
|
|
|
|
|
187
|
|
|
|
|
188
|
|
|
|
|
189
|
|
|
|
|
190
|
|
|
|
|
191
|
|
|
|
|
192
|
|
|
|
|
193
|
|
|
|
|
194
|
|
|
|
|
195
|
|
|
|
|
196
|
|
|
|
|
197
|
|
|
|
|
198
|
|
|
|
|
199
|
|
|
|
|
200
|
|
|
|
|
201
|
|
|
|
|
202
|
|
|
|
|
203
|
|
|
|
|
204
|
|
|
|
|
205
|
|
|
|
|
206
|
|
|
|
|
207
|
|
|
|
|
208
|
|
|
|
|
209
|
|
|
|
|
210
|
|
|
|
|
211
|
|
|
|
|
212
|
|
|
|
|
213
|
|
|
|
|
214
|
|
|
|
|
215</pre>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 104</span>
|
|
|
|
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 121</span>
|
|
|
|
|
|
|
|
|
|
class cd_fail2ban::params (
|
|
|
|
|
|
|
|
|
|
$pkg_ensure = 'latest',
|
|
|
|
|
$pkg_ensure = 'latest',
|
|
|
|
|
|
|
|
|
|
$fn_manage_config = true,
|
|
|
|
|
$fn_enable_service = 'running',
|
|
|
|
|
$fn_manage_config = true,
|
|
|
|
|
$fn_enable_service = 'running',
|
|
|
|
|
|
|
|
|
|
# fail2ban.conf/local
|
|
|
|
|
|
|
|
|
|
$fn_loglevel = 'INFO',
|
|
|
|
|
$fn_logtarget = 'SYSLOG',
|
|
|
|
|
$fn_syslogsocket = 'auto',
|
|
|
|
|
$fn_socket = '/var/run/fail2ban/fail2ban.sock',
|
|
|
|
|
$fn_pidfile = '/var/run/fail2ban/fail2ban.pid',
|
|
|
|
|
$fn_dbfile = '/var/lib/fail2ban/fail2ban.sqlite3',
|
|
|
|
|
$fn_dbpurgeage = '86400',
|
|
|
|
|
$fn_loglevel = 'INFO',
|
|
|
|
|
$fn_logtarget = 'SYSLOG',
|
|
|
|
|
$fn_syslogsocket = 'auto',
|
|
|
|
|
$fn_socket = '/var/run/fail2ban/fail2ban.sock',
|
|
|
|
|
$fn_pidfile = '/var/run/fail2ban/fail2ban.pid',
|
|
|
|
|
$fn_dbfile = '/var/lib/fail2ban/fail2ban.sqlite3',
|
|
|
|
|
$fn_dbpurgeage = '86400',
|
|
|
|
|
|
|
|
|
|
# jail.conf/local
|
|
|
|
|
$fn_ignoreip = '127.0.0.1/8',
|
|
|
|
|
$fn_ignorecommand = '',
|
|
|
|
|
$fn_bantime = '600',
|
|
|
|
|
$fn_findtime = '600',
|
|
|
|
|
$fn_maxretry = '5',
|
|
|
|
|
$fn_backend = 'auto',
|
|
|
|
|
$fn_usedns = 'warn',
|
|
|
|
|
$fn_logencoding = 'auto',
|
|
|
|
|
$fn_enabled = 'false',
|
|
|
|
|
$fn_filter = '%(__name__)s',
|
|
|
|
|
$fn_destemail = 'root@localhost',
|
|
|
|
|
$fn_sender = 'root@localhost',
|
|
|
|
|
$fn_mta = 'sendmail',
|
|
|
|
|
$fn_protocol = 'tcp',
|
|
|
|
|
$fn_chain = 'INPUT',
|
|
|
|
|
$fn_port = '0:65535',
|
|
|
|
|
$fn_fail2ban_agent = 'Fail2Ban/%(fail2ban_version)s',
|
|
|
|
|
|
|
|
|
|
$fn_ignoreip = '127.0.0.1/8',
|
|
|
|
|
$fn_ignorecommand = '',
|
|
|
|
|
$fn_bantime = '600',
|
|
|
|
|
$fn_findtime = '600',
|
|
|
|
|
$fn_maxretry = '5',
|
|
|
|
|
$fn_backend = 'auto',
|
|
|
|
|
$fn_usedns = 'warn',
|
|
|
|
|
$fn_logencoding = 'auto',
|
|
|
|
|
$fn_enabled = false,
|
|
|
|
|
$fn_filter = '%(__name__)s',
|
|
|
|
|
$fn_destemail = 'root@localhost',
|
|
|
|
|
$fn_sender = 'root@localhost',
|
|
|
|
|
$fn_mta = 'sendmail',
|
|
|
|
|
$fn_protocol = 'tcp',
|
|
|
|
|
$fn_chain = 'INPUT',
|
|
|
|
|
$fn_port = '0:65535',
|
|
|
|
|
$fn_fail2ban_agent = 'Fail2Ban/%(fail2ban_version)s',
|
|
|
|
|
$fn_banaction = 'iptables-multiport',
|
|
|
|
|
$fn_banaction_allports = 'iptables-allports',
|
|
|
|
|
$fn_action_ = '%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]',
|
|
|
|
|
$fn_action_mw = '%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
|
|
|
|
|
%(mta)s-whois[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", protocol="%(protocol)s", chain="%(chain)s"]',
|
|
|
|
|
$fn_action_mwl = '%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
|
|
|
|
|
%(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]',
|
|
|
|
|
$fn_action_xarf = '%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
|
|
|
|
|
xarf-login-attack[service=%(__name__)s, sender="%(sender)s", logpath=%(logpath)s, port="%(port)s"]',
|
|
|
|
|
$fn_action_cf_mwl = 'cloudflare[cfuser="%(cfemail)s", cftoken="%(cfapikey)s"]
|
|
|
|
|
%(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]',
|
|
|
|
|
$fn_action_blocklist_de = 'blocklist_de[email="%(sender)s", service=%(filter)s, apikey="%(blocklist_de_apikey)s", agent="%(fail2ban_agent)s"]',
|
|
|
|
|
$fn_action_badips = 'badips.py[category="%(__name__)s", banaction="%(banaction)s", agent="%(fail2ban_agent)s"]',
|
|
|
|
|
$fn_action_badips_report = 'badips[category="%(__name__)s", agent="%(fail2ban_agent)s"]',
|
|
|
|
|
$fn_default_action = 'action_',
|
|
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
|
|
@@ -897,7 +1133,7 @@ $fn_jail_local_erb = 'cd_fail2ban/jail_local.erb'
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="footer">
|
|
|
|
|
Generated on Thu Aug 3 18:32:56 2017 by
|
|
|
|
|
Generated on Sun Aug 6 17:07:22 2017 by
|
|
|
|
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
|
|
|
0.9.9 (ruby-2.0.0).
|
|
|
|
|
</div>
|
|
|
|
|
|