<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CentOS 6.5 on nagg.eu</title><link>https://nagg.eu/tags/centos-6.5/</link><description>Recent content in CentOS 6.5 on nagg.eu</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 16 Sep 2015 18:54:42 +0000</lastBuildDate><atom:link href="https://nagg.eu/tags/centos-6.5/index.xml" rel="self" type="application/rss+xml"/><item><title>ejabberd and fail2ban</title><link>https://nagg.eu/ejabberd-and-fail2ban/</link><pubDate>Wed, 16 Sep 2015 18:54:42 +0000</pubDate><guid>https://nagg.eu/ejabberd-and-fail2ban/</guid><description>&lt;p&gt;Fail2ban is a useful tool capable of mitigating brute force attacks performed
against a multitude of services (ejabberd in our case).&lt;br&gt;
Configuration is split between a multitude of files: &lt;code&gt;jail.conf&lt;/code&gt; defines which
filters are active while the filters scripts are placed in &lt;code&gt;./filter.d&lt;/code&gt; directory.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;[root@CentOS ~]# vi /etc/fail2ban/jail.conf
---
bantime = 1200
findtime = 1200
maxretry = 10

backend = auto

[ejabberd-auth]
enabled = true
port = 5222,5280,7777
action = iptables-multiport[name=ejabberd, port=&amp;#34;5222,5269,5280,777&amp;#34;, protocol=tcp]
logpath = /var/log/ejabberd/ejabberd.log
---
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex="0"&gt;&lt;code&gt;[root@CentOS ~]# vi /etc/fail2ban/filter.d/ejabberd-auth.conf
---
[Definition]

failregex = ^=INFO REPORT====  ===\nI\(&amp;lt;0\.\d+\.0&amp;gt;:ejabberd_c2s:\d+\) : \([^)]+\) Failed authentication for .+ from IP &amp;lt;HOST&amp;gt; \({{(?:\d+,){3}\d+},\d+}\)$
                ^(?:\.\d+)? \[info\] &amp;lt;0\.\d+\.\d&amp;gt;@ejabberd_c2s:wait_for_feature_request:\d+ \([^\)]+\) Failed authentication for \S+ from IP &amp;lt;HOST&amp;gt;$
                ^.* Failed authentication for \S+ from &amp;lt;HOST&amp;gt;$
                ^.* from &amp;lt;&amp;lt;&amp;#34;&amp;lt;HOST&amp;gt;&amp;#34;&amp;gt;&amp;gt; failed with error: &amp;lt;&amp;lt;&amp;#34;inexistent-account&amp;#34;&amp;gt;&amp;gt;$
                ^.* from &amp;lt;&amp;lt;&amp;#34;&amp;lt;HOST&amp;gt;&amp;#34;&amp;gt;&amp;gt; failed with error: &amp;lt;&amp;lt;&amp;#34;bad-password&amp;#34;&amp;gt;&amp;gt;$
                ^.* from &amp;lt;&amp;lt;&amp;#34;&amp;lt;HOST&amp;gt;&amp;#34;&amp;gt;&amp;gt; failed with error: &amp;lt;&amp;lt;&amp;#34;badformed-jid&amp;#34;&amp;gt;&amp;gt;$

ignoreregex =

[Init]

journalmatch =
---
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The first two regular expressions are for user authentication while the others
are for administration panel login.&lt;br&gt;
Other useful commands are:&lt;/p&gt;</description></item><item><title>Get rid of SHA-1 – nginx, TLSv1.2, PFS and SHA-2</title><link>https://nagg.eu/get-rid-of-sha-1-nginx-tlsv1-2-pfs-and-sha-2/</link><pubDate>Tue, 09 Sep 2014 18:02:32 +0000</pubDate><guid>https://nagg.eu/get-rid-of-sha-1-nginx-tlsv1-2-pfs-and-sha-2/</guid><description>&lt;p&gt;Everyone who knows me a little bit knows how much I dislike Google but this time we really should thank them for taking a real step toward a more secure web.&lt;br&gt;
They are finally moving away from SHA-1 to the much more secure SHA-2, more info can be found here: &lt;!-- raw HTML omitted --&gt;&lt;a href="http://googleonlinesecurity.blogspot.it/2014/09/gradually-sunsetting-sha-1.html"&gt;http://googleonlinesecurity.blogspot.it/2014/09/gradually-sunsetting-sha-1.html&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;h3 id="-setup"&gt;.:. Setup&lt;/h3&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;CentOS 6.5 x86_64
nginx/1.6.1
OpenSSL 1.0.1e-fips 11 Feb 2013
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Nginx developers provide an up to date repository (&lt;!-- raw HTML omitted --&gt;&lt;a href="http://wiki.nginx.org/Install"&gt;http://wiki.nginx.org/Install&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;)for CentOS:&lt;/p&gt;</description></item></channel></rss>