<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>linux Archives - DemonPenguins Brain</title>
	<atom:link href="https://brain.demonpenguin.co.uk/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://brain.demonpenguin.co.uk/category/linux/</link>
	<description>Random Mumblings</description>
	<lastBuildDate>Wed, 12 Dec 2018 10:47:42 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://i0.wp.com/brain.demonpenguin.co.uk/wp-content/uploads/2018/12/DP_favicon.png?fit=20%2C32&#038;ssl=1</url>
	<title>linux Archives - DemonPenguins Brain</title>
	<link>https://brain.demonpenguin.co.uk/category/linux/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">102551891</site>	<item>
		<title>Updating Droplet from Ubuntu 14.04 to 16.04 with ispconfig installed on it</title>
		<link>https://brain.demonpenguin.co.uk/2017/03/updating-droplet-from-ubuntu-14-04-to-16-04-with-ispconfig-installed-on-it/</link>
					<comments>https://brain.demonpenguin.co.uk/2017/03/updating-droplet-from-ubuntu-14-04-to-16-04-with-ispconfig-installed-on-it/#respond</comments>
		
		<dc:creator><![CDATA[dpadmin]]></dc:creator>
		<pubDate>Wed, 22 Mar 2017 14:48:47 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[tech talk]]></category>
		<guid isPermaLink="false">https://brain.demonpenguin.co.uk/?p=609</guid>

					<description><![CDATA[<p> Take a backup 🙂 run do-os-update apt install php-cgi php-fpm apt install linux-image-4.4.0-28 linux-headers-4.4.0-28 (this is because digital ocean don&#8217;t have 4.4.0-66 at the moment) reboot if the file system is mounted read only you&#8217;ll need to do blkid which gave me(/dev/vda1: LABEL=&#8221;DOROOT&#8221; UUID=&#8221;d1e1f550-6698-4cdd-899c-fa6ed6f8d15c&#8221; TYPE=&#8221;ext4&#8243; PARTLABEL=&#8221;primary&#8221; PARTUUID=&#8221;4cdd99e6-9c0d-4fef-bcf1-5204b5ae9eb1&#8243;) mount -rw -o remount UUID=d1e1f550-6698-4cdd-899c-fa6ed6f8d15c / edit /etc/fstab [&#8230;]</p>
<p>The post <a href="https://brain.demonpenguin.co.uk/2017/03/updating-droplet-from-ubuntu-14-04-to-16-04-with-ispconfig-installed-on-it/">Updating Droplet from Ubuntu 14.04 to 16.04 with ispconfig installed on it</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></description>
										<content:encoded><![CDATA[<ol>
<li> Take a backup 🙂</li>
<li>run do-os-update</li>
<li>apt install php-cgi php-fpm</li>
<li>apt install linux-image-4.4.0-28 linux-headers-4.4.0-28 (this is because digital ocean don&#8217;t have 4.4.0-66 at the moment)</li>
<li>reboot</li>
<li>if the file system is mounted read only you&#8217;ll need to do
<ul>
<li>blkid which gave me(/dev/vda1: LABEL=&#8221;DOROOT&#8221; UUID=&#8221;d1e1f550-6698-4cdd-899c-fa6ed6f8d15c&#8221; TYPE=&#8221;ext4&#8243; PARTLABEL=&#8221;primary&#8221; PARTUUID=&#8221;4cdd99e6-9c0d-4fef-bcf1-5204b5ae9eb1&#8243;)</li>
<li>mount -rw -o remount UUID=d1e1f550-6698-4cdd-899c-fa6ed6f8d15c /</li>
<li>edit /etc/fstab and change the UUID of the root partition eg<br />
UUID=d1e1f550-6698-4cdd-899c-fa6ed6f8d15c / ext4 errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 1</li>
<li>reboot</li>
</ul>
</li>
<li>go to the ispconfig console</li>
<li>edit the server config(system&gt;server config&gt;select the server)</li>
<li>Go to the Web tab and scroll down to PHP Settings
<ol>
<li>Change the setting to:<br />
Apache php.ini path: /etc/php/7.0/apache2/php.ini<br />
CGI php.ini path: /etc/php/7.0/cgi/php.ini<br />
PHP-FPM init script: php7.0-fpm<br />
PHP-FPM php.ini path: /etc/php/7.0/fpm/php.ini<br />
PHP-FPM pool directory: /etc/php/7.0/fpm/pool.d<br />
PHP-FPM start port: 9010<br />
PHP-FPM socket directory: /var/lib/php7.0-fpm<br />
PHP open_basedir: [website_path]/web:[website_path]/private:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/php<br />
Check php.ini every X minutes for changes: 1 0 = no check<br />
Default PHP Handler: PHP-FPM</li>
</ol>
</li>
<li>Go to the FastCGI tab and set:
<ol>
<li>FastCGI starter path: /var/www/php-fcgi-scripts/[system_user]/<br />
FastCGI starter script: .php-fcgi-starter<br />
FastCGI Alias: /php/<br />
FastCGI php.ini Path: /etc/php/7.0/cgi/<br />
FastCGI Children: 8<br />
FastCGI max. Requests: 5000<br />
FastCGI Bin: /usr/bin/php-cgi<br />
FastCGI config syntax: New (apache 2.2)</li>
</ol>
</li>
<li>Now go to Tool&gt;Resync click the All services and select the server and then select start</li>
<li><a href="https://www.rosehosting.com/blog/how-to-set-up-apache-with-http2-support-on-ubuntu-16-04/" target="_blank" rel="noopener">Go here to setup apache for HTTP/2</a></li>
</ol>
<p>The post <a href="https://brain.demonpenguin.co.uk/2017/03/updating-droplet-from-ubuntu-14-04-to-16-04-with-ispconfig-installed-on-it/">Updating Droplet from Ubuntu 14.04 to 16.04 with ispconfig installed on it</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brain.demonpenguin.co.uk/2017/03/updating-droplet-from-ubuntu-14-04-to-16-04-with-ispconfig-installed-on-it/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">609</post-id>	</item>
		<item>
		<title>ISP-Config 3 default settings</title>
		<link>https://brain.demonpenguin.co.uk/2015/06/isp-config-3-default-settings/</link>
					<comments>https://brain.demonpenguin.co.uk/2015/06/isp-config-3-default-settings/#respond</comments>
		
		<dc:creator><![CDATA[dpadmin]]></dc:creator>
		<pubDate>Wed, 24 Jun 2015 14:04:12 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[tech talk]]></category>
		<guid isPermaLink="false">https://brain.demonpenguin.co.uk/?p=420</guid>

					<description><![CDATA[<p>To change the defaults in the web site section you need to edit /usr/local/ispconfig/interface/web/sites/form/web_domain.tform.php find and replace 'default' =&#62; 'webalizer', with 'default' =&#62; 'awstats', do the same with 'default' =&#62; 'fast-cgi', to 'default' =&#62; 'php-fpm', &#160; &#160;</p>
<p>The post <a href="https://brain.demonpenguin.co.uk/2015/06/isp-config-3-default-settings/">ISP-Config 3 default settings</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>To change the defaults in the web site section you need to edit</p>
<p>/usr/local/ispconfig/interface/web/sites/form/web_domain.tform.php</p>
<p>find and replace</p>
<pre>'default' =&gt; 'webalizer',</pre>
<p>with</p>
<pre>'default' =&gt; 'awstats',</pre>
<p>do the same with</p>
<pre>'default' =&gt; 'fast-cgi',</pre>
<p>to</p>
<pre>'default' =&gt; 'php-fpm',</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://brain.demonpenguin.co.uk/2015/06/isp-config-3-default-settings/">ISP-Config 3 default settings</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brain.demonpenguin.co.uk/2015/06/isp-config-3-default-settings/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">420</post-id>	</item>
		<item>
		<title>Adding SphinxSE to MySQL on ubuntu server</title>
		<link>https://brain.demonpenguin.co.uk/2015/04/adding-sphinxse-to-mysql-on-ubuntu-server/</link>
					<comments>https://brain.demonpenguin.co.uk/2015/04/adding-sphinxse-to-mysql-on-ubuntu-server/#respond</comments>
		
		<dc:creator><![CDATA[dpadmin]]></dc:creator>
		<pubDate>Thu, 30 Apr 2015 09:05:04 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[tech talk]]></category>
		<guid isPermaLink="false">https://brain.demonpenguin.co.uk/?p=409</guid>

					<description><![CDATA[<p>The post <a href="https://brain.demonpenguin.co.uk/2015/04/adding-sphinxse-to-mysql-on-ubuntu-server/">Adding SphinxSE to MySQL on ubuntu server</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div class="et_pb_section et_pb_section_0 et_section_regular" >
				
				
				
				
				
				
				<div class="et_pb_row et_pb_row_0">
				<div class="et_pb_column et_pb_column_4_4 et_pb_column_0  et_pb_css_mix_blend_mode_passthrough et-last-child">
				
				
				
				
				<div class="et_pb_module et_pb_text et_pb_text_0  et_pb_text_align_left et_pb_bg_layout_light">
				
				
				
				
				<div class="et_pb_text_inner">Unfortunately installing sphinx search on Ubuntu using apt-get does not install the SphinxSE engine in MySQL.&nbsp; To do that we need to build it from source.&nbsp; We can do that using the following steps:

Ensure that the build-essential packages are installed, as well as all the dependencies required for building mysql-server
<pre>apt-get install build-essential
apt-get build-dep mysql-server
</pre>
Next step get the mysql-server source code:
<pre>cd /tmp
dpkg --list | grep mysql-server
</pre>
In my case this gives:
<pre>ii  mysql-server                        5.5.43-0ubuntu0.14.04.1             all          MySQL database server (metapackage depending on the latest version)
ii  mysql-server-5.5                    5.5.43-0ubuntu0.14.04.1             amd64        MySQL database server binaries and system database setup
ii  mysql-server-core-5.5               5.5.43-0ubuntu0.14.04.1             amd64        MySQL database server binaries
</pre>
So we can see we are using mysql-server version 5.5.43. Now we need to grab the source code:
<pre>wget 'http://mysql.mirrors.hoobly.com/Downloads/MySQL-5.5/mysql-5.5.43.tar.gz'
</pre>
Next we need the source code for sphinxsearch
<pre>wget 'http://sphinxsearch.com/files/sphinx-2.2.9-release.tar.gz'
</pre>
Now we need to extract the source code for both programs
<pre>tar xvfz mysql-5.5.43.tar.gz 
tar xvfz sphinx-2.2.9-release.tar.gz
</pre>
Next we need to copy the mysqlse engine code to the mysql source tree:
<pre>cp -R sphinx-2.2.9-release/mysqlse/ mysql-5.5.43/storage/sphinx
</pre>
Then we need to compile mysql:
<pre>cd mysql-5.5.43
./BUILD/autorun.sh
./configure
make
</pre>
Now go and get yourself a coffee &#8211; this may take some time 😉

OK so now you are caffined up and mysql has been build we need to copy a couple of files to the mysql you have on you system:
<pre>cp storage/sphinx/ha_sphinx.* /usr/lib/mysql/plugin/
</pre>
And now we need to login to mysql and enable the engine:
<pre>mysql -uroot -p mysql
mysql&gt; INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so';
mysql&gt; show engines;
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine             | Support | Comment                                                        | Transactions | XA   | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| PERFORMANCE_SCHEMA | YES     | Performance Schema                                             | NO           | NO   | NO         |
| MRG_MYISAM         | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
| MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |
| BLACKHOLE          | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
| MyISAM             | YES     | MyISAM storage engine                                          | NO           | NO   | NO         |
| SPHINX             | YES     | Sphinx storage engine 2.2.9-release                            | NO           | NO   | NO         |
| CSV                | YES     | CSV storage engine                                             | NO           | NO   | NO         |
| ARCHIVE            | YES     | Archive storage engine                                         | NO           | NO   | NO         |
| FEDERATED          | NO      | Federated MySQL storage engine                                 | NULL         | NULL | NULL       |
| InnoDB             | DEFAULT | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
10 rows in set (0.00 sec)
</pre>
As you can see the engine is now listed along with the standard ones.

To remove the engine you can do this.
<pre> mysql&gt; UNINSTALL PLUGIN sphinx; 
</pre></div>
			</div>
			</div>
				
				
				
				
			</div>
				
				
			</div>
<p>The post <a href="https://brain.demonpenguin.co.uk/2015/04/adding-sphinxse-to-mysql-on-ubuntu-server/">Adding SphinxSE to MySQL on ubuntu server</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brain.demonpenguin.co.uk/2015/04/adding-sphinxse-to-mysql-on-ubuntu-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">409</post-id>	</item>
		<item>
		<title>Building a vsphere system on windows server 2012</title>
		<link>https://brain.demonpenguin.co.uk/2015/02/building-vsphere-system-windows-server-2012/</link>
					<comments>https://brain.demonpenguin.co.uk/2015/02/building-vsphere-system-windows-server-2012/#respond</comments>
		
		<dc:creator><![CDATA[dpadmin]]></dc:creator>
		<pubDate>Wed, 04 Feb 2015 11:27:58 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[tech talk]]></category>
		<guid isPermaLink="false">https://brain.demonpenguin.co.uk/?p=345</guid>

					<description><![CDATA[<p>This is a step by step list - that unfortunately I never got around to finishing. </p>
<p>The post <a href="https://brain.demonpenguin.co.uk/2015/02/building-vsphere-system-windows-server-2012/">Building a vsphere system on windows server 2012</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Install windows server (with GUI)</p>
<p>Install vmware tools</p>
<p>Reboot</p>
<p>Setup networking</p>
<p>Setup fqdn in host file</p>
<ul>
<li>My Computer -&gt; C Drive -&gt; windows -&gt; system32 -&gt; drivers -&gt; etc -&gt; hosts</li>
<li>add line with ip address and short and long host names</li>
</ul>
<p>Change network from public to private:</p>
<ul>
<li>Server Manager -&gt; Tools -&gt; Local Security Policy</li>
<li>Network List Manager Policies</li>
<li>Open The Network you are using (Network 2 in this case)</li>
<li>Give it a Name</li>
<li>select the network location tab and set location type to private</li>
</ul>
<p>Turn on Remote Desktop</p>
<ul>
<li>Server Manager -&gt; Local Server</li>
<li>Click Disabled next to Remote Desktop</li>
<li>select Allow remote connections to this computer</li>
</ul>
<p>Reboot</p>
<p>On Remina client</p>
<ul>
<li>Add a new connection</li>
<li>enter the normal details with RDP as protocol</li>
<li>select advanced tab</li>
<li>make sure security is set to negotiate</li>
<li>if there was a previous server on that ip address you may need to remove the keys in ~/.freerdp/known_hosts</li>
</ul>
<p>Probably a good time to turn on the automatic updates</p>
<p>you&#8217;ll need to add .NET Framework 3.5 Features</p>
<ul>
<li>Server Manager -&gt; Local Server -&gt; Manage -&gt; Add Roles and Features</li>
<li>Follow through the wizard then select Features and scroll to .NET Framework 3.5 Features</li>
<li>apply</li>
</ul>
<p>add active directory lightweight services</p>
<p>&nbsp;</p>
<p>Install extra components for flash to work</p>
<ul>
<li>Server Manager -&gt; Local Server -&gt; Manage -&gt; Add Roles and Features</li>
<li>Follow through wizard then select features</li>
<li>expand User Interfaces and Infrastructure</li>
<li>check Desktop Experience</li>
</ul>
<p>Install Ms SQL Server</p>
<p><a title="http://vknowledge.net/2012/08/22/how-to-setup-ms-sql-2008-r2-for-vmware-vcenter/" href="http://vknowledge.net/2012/08/22/how-to-setup-ms-sql-2008-r2-for-vmware-vcenter/" target="_blank">http://vknowledge.net/2012/08/22/how-to-setup-ms-sql-2008-r2-for-vmware-vcenter/</a> as a guide</p>
<p>Install vsphere 5.5</p>
<ul>
<li>Autorun the CD</li>
<li>Select Simple install</li>
</ul>
<p>Not complete I know&#8230;but I thought I&#8217;d get it out</p>
<p>The post <a href="https://brain.demonpenguin.co.uk/2015/02/building-vsphere-system-windows-server-2012/">Building a vsphere system on windows server 2012</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brain.demonpenguin.co.uk/2015/02/building-vsphere-system-windows-server-2012/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">345</post-id>	</item>
		<item>
		<title>Fail2Ban monitoring MySQL</title>
		<link>https://brain.demonpenguin.co.uk/2014/05/fail2ban-monitoring-mysql/</link>
					<comments>https://brain.demonpenguin.co.uk/2014/05/fail2ban-monitoring-mysql/#comments</comments>
		
		<dc:creator><![CDATA[dpadmin]]></dc:creator>
		<pubDate>Thu, 01 May 2014 11:07:07 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[tech talk]]></category>
		<guid isPermaLink="false">https://brain.demonpenguin.co.uk/?p=226</guid>

					<description><![CDATA[<p>Some notes and recipes for fail2ban and MySQL.</p>
<p>The post <a href="https://brain.demonpenguin.co.uk/2014/05/fail2ban-monitoring-mysql/">Fail2Ban monitoring MySQL</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve only started using Fail2Ban recently and at that only since I have started using the WordPress <a title="WP Fail2ban" href="https://wordpress.org/plugins/wp-fail2ban/" target="_blank" rel="noopener">WP Fail2ban</a> plugin &#8211; which I will post again about that at a later date. For now though I will write about how I have added MySQL&nbsp;as a monitored service on my ubuntu 12.04 server.</p>
<p>To start off we have to log failed connection attempts and this is&nbsp;done without using the general log and by adding:</p>
<pre>log_warnings = 2</pre>
<p>to the my.cnf file which on an ubuntu server is in /etc/mysql. You will also need to make sure that the error log is enabled. I have changed mine to be:</p>
<pre>log_error = /var/log/mysql/error.log</pre>
<p>in the same file.</p>
<p>Now we need to look at a failed login to see what is logged. Here is an example:</p>
<pre>140501 11:18:05 [Warning] Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES)</pre>
<p>Now that we have a format we can start writing our Fail2ban filter.</p>
<pre># Fail2Ban configuration file
#
# Author: Andy Lear
#
# $Revision$
#

[Definition]

# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
#          host must be matched by a group named "host". The tag "" can
#          be used for standard IP/hostname matching and is only an alias for
#          (?:::f{4,6}:)?(?P[\w\-.^_]+)
# Values: TEXT
#
failregex = Access denied for user .*@''.*$ 

# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT
#
ignoreregex = 
</pre>
<p>and save it to:</p>
<pre>/etc/fail2ban/filter.d/mysql.conf</pre>
<p>Now we need to add to the jail.local in /etc/fail2ban to activate the filter:</p>
<pre>[mysql]
enabled  = true
port     = 3306
filter   = mysql
logpath  = /var/log/mysql/error.log
maxretry = 3
</pre>
<p>When we restart fail2ban and look at the debug log we&#8217;ll see something like this:</p>
<pre>2014-05-01 11:04:59,522 fail2ban.filter : DEBUG  Found a match for '140501 11:04:59 [Warning] Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES)
' but no valid date/time found for '140501 11:04:59 [Warning] Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES)
'. Please contact the author in order to get support for this format
</pre>
<p>So doing a little digging I found that the date/time format is parsed in:</p>
<pre>/usr/share/fail2ban/server/datedetector.py</pre>
<p>A touch more googling and I was able to add a new template to that file. you will see near the top that a <strong>class DateDetector</strong> is created.&nbsp; Scroll down the file until you get to&nbsp;<strong>finally:</strong><strong>&nbsp;</strong> and insert the following before it.</p>
<pre># MySQL date detector
template = DateStrptime()
template.setName("YearMonthDay Hour:Minute:Second")
template.setRegex("\d{2}\d{2}\d{2} {1,2}\d{1,2}:\d{2}:\d{2}")
template.setPattern("{0485a2dee41ac5bc19be369b86ade435390b5d2f09c107e6e6935a4e65879846}y{0485a2dee41ac5bc19be369b86ade435390b5d2f09c107e6e6935a4e65879846}m{0485a2dee41ac5bc19be369b86ade435390b5d2f09c107e6e6935a4e65879846}d {0485a2dee41ac5bc19be369b86ade435390b5d2f09c107e6e6935a4e65879846}H:{0485a2dee41ac5bc19be369b86ade435390b5d2f09c107e6e6935a4e65879846}M:{0485a2dee41ac5bc19be369b86ade435390b5d2f09c107e6e6935a4e65879846}S")
self.__templates.append(template)</pre>
<p>At this point we can restart Fail2Ban&nbsp;again and now you should see that the log file is picking up everything as we want it to:</p>
<pre>2014-05-01 11:53:24,728 fail2ban.filter : DEBUG  Got event: 1 for /var/log/mysql/error.log
2014-05-01 11:53:24,728 fail2ban.filter : DEBUG  File changed: /var/log/mysql/error.log
2014-05-01 11:53:24,777 fail2ban.filter : DEBUG  Processing line with time:1398941602.0 and ip:xxx.xxx.xxx.xxx
2014-05-01 11:53:24,777 fail2ban.filter : DEBUG  Found xxx.xxx.xxx.xxx
2014-05-01 11:53:24,777 fail2ban.filter : DEBUG  Currently have failures from 1 IPs: ['xxx.xxx.xxx.xxx']</pre>
<p>After a few more attempts we then get:</p>
<pre>2014-05-01 11:54:44,770 fail2ban.actions: WARNING [mysql] Ban xxx.xxx.xxx.xxx
2014-05-01 11:54:44,778 fail2ban.actions.action: DEBUG  iptables -I fail2ban-mysql 1 -s xxx.xxx.xxx.xxx -j DROP
2014-05-01 11:54:44,783 fail2ban.actions.action: DEBUG  iptables -I fail2ban-mysql 1 -s xxx.xxx.xxx.xxx -j DROP returned successfully
2014-05-01 11:54:44,786 fail2ban.actions.action: DEBUG  printf {0485a2dee41ac5bc19be369b86ade435390b5d2f09c107e6e6935a4e65879846}b "Subject: [Fail2Ban] mysql: banned xxx.xxx.xxx.xxx
The IP xxx.xxx.xxx.xxx has just been banned by Fail2Ban after
</pre>
<p>There we go Fail2Ban&nbsp;blocking failed logins to MySQL!</p>
<p>The post <a href="https://brain.demonpenguin.co.uk/2014/05/fail2ban-monitoring-mysql/">Fail2Ban monitoring MySQL</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brain.demonpenguin.co.uk/2014/05/fail2ban-monitoring-mysql/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">226</post-id>	</item>
		<item>
		<title>There be Buffalo here&#8230;</title>
		<link>https://brain.demonpenguin.co.uk/2010/03/there-be-buffalo-here/</link>
					<comments>https://brain.demonpenguin.co.uk/2010/03/there-be-buffalo-here/#comments</comments>
		
		<dc:creator><![CDATA[dpadmin]]></dc:creator>
		<pubDate>Tue, 02 Mar 2010 11:12:22 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[tech talk]]></category>
		<category><![CDATA[Buffalo TeraStation]]></category>
		<category><![CDATA[BUFFALO TS-HTGL]]></category>
		<category><![CDATA[HS-DHTGL]]></category>
		<category><![CDATA[Live]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[Pro]]></category>
		<guid isPermaLink="false">https://brain.demonpenguin.co.uk/?p=90</guid>

					<description><![CDATA[<p>The battle to get nfs working on a Buffalo TeraStation Live by updating it's firmware to the Pro version</p>
<p>The post <a href="https://brain.demonpenguin.co.uk/2010/03/there-be-buffalo-here/">There be Buffalo here&#8230;</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">I have had a Buffalo TeraStation Live for several years now, and have always been a bit irritated that I have had to use SMB for mounting the share to my linux boxes (pretty much all of my boxes!). I managed a while ago to install a version of nfs on the box which however was only version 2 so I hit the maximum file size limit of 2GB, a bit of a pain when I have a lot of files over that size.</p>
<p style="text-align: justify;">I was hunting around the web the other day &#8211; as I do on occasion 🙂 &#8211; when I came across <a href="http://forum.buffalo.nas-central.org/viewtopic.php?f=22&amp;t=20431">this thread</a>.</p>
<p style="text-align: justify;">&#8220;A-ha!&#8221; I thinks to me-self! So the TeraStation Pro is essentially the same hardware with different software on it! Not only that the Pro has nfs on it properly!</p>
<p style="text-align: justify;">I duly went and downloaded the latest pro version of the firmware, unzipped it and edited the ini file to:</p>
<pre>[Application]
Title = BUFFALO TS-HTGL Updater Ver.1.33
WaitReboot = 360
WaitFormat = 300
[Target]
ProductID = 0x00002006
Name = HS-DHTGL

[Flags]
VersionCheck = 0

[SpecialFlags]
Debug=1
</pre>
<p style="text-align: justify;">Now run the firmware update! (<em>Note to self, do not have any web sessions open, or be logged in via ssh or telnet whilst doing this or it will be slow and will fail!</em>) This worked a charm, had to turn the machine back on a couple of times as the firmware updated. I logged back into the web front end and went about setting up the nfs options, then mounted them on one of the linux boxes. Have a poke around &#8211; yup all my files are visible, but hang-on a sec, what&#8217;s this? The file owners were all over the place, not what I was expecting.</p>
<p>OK</p>
<pre>chown blah:blah *</pre>
<p style="text-align: justify;">Permission denied! Damn! Time to crack the box again!</p>
<pre>java -jar acp_commander.jar -t 192.168.0.100 -o</pre>
<p style="text-align: justify;">followed by a telnet into the box. Have a look at</p>
<pre>/etc/exports</pre>
<p style="text-align: justify;">and see that the options on the shares are:</p>
<pre>rw,sync,all_squash,anonuid=99,anongid=99,no_subtree_check</pre>
<p style="text-align: justify;">well, that&#8217;s not what I want! SO I edit the options to</p>
<pre>rw,sync,no_root_squash,no_subtree_check</pre>
<p>and</p>
<pre>exportfs -ra</pre>
<p style="text-align: justify;">remount the share, and all works as expected!</p>
<p style="text-align: justify;">Well sort of. As soon as any change is made on the web fronted the nfs server is restarted and the options magically change back to their defaults!</p>
<p>Damn!</p>
<p style="text-align: justify;">OK time to find where the file is being generated from! So looking at</p>
<pre>/etc/init.d/nfs.sh</pre>
<p style="text-align: justify;">we see the usual startup type stuff and lo and behold there is a line that reads</p>
<pre>nas_configgen -c nfs</pre>
<p style="text-align: justify;">Right well I&#8217;ll change that I thought, should only be a script file, but alas it is a binary, so one small change in the script after the offending line:</p>
<pre>perl -pi -w -e \
's/rw,sync,all_squash,anonuid=99,anongid=99,\
no_subtree_check/rw,sync,no_root_squash, \
no_subtree_check/g;' /etc/exports</pre>
<p style="text-align: justify;">&#8211; thanks to &#8220;The Book of Pete&#8221; means that the changes I want are applied to the</p>
<pre>/etc/exports</pre>
<p style="text-align: justify;">file after it is written to the system, and root can go mad with permissions and I can at last start running some backup scripts that will maintain ownership of files as I want it to! After all the box is only for my use on my LAN and not available to the public at large!</p>
<p>The post <a href="https://brain.demonpenguin.co.uk/2010/03/there-be-buffalo-here/">There be Buffalo here&#8230;</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brain.demonpenguin.co.uk/2010/03/there-be-buffalo-here/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">90</post-id>	</item>
		<item>
		<title>Projects R Us</title>
		<link>https://brain.demonpenguin.co.uk/2010/01/projects-r-us/</link>
					<comments>https://brain.demonpenguin.co.uk/2010/01/projects-r-us/#respond</comments>
		
		<dc:creator><![CDATA[dpadmin]]></dc:creator>
		<pubDate>Wed, 27 Jan 2010 22:23:20 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[tech talk]]></category>
		<category><![CDATA[dotproject]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[todo]]></category>
		<guid isPermaLink="false">http://demonpenguin.co.uk/brain/?p=31</guid>

					<description><![CDATA[<p>dotProject is a volunteer supported Project Management application. There is no 'company' behind this project, it is managed, maintained, developed and supported by a volunteer group and by the users themselves</p>
<p>The post <a href="https://brain.demonpenguin.co.uk/2010/01/projects-r-us/">Projects R Us</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Okay.&nbsp; Yesterday I was bemoaning my memory for being unable to keep track of my workload and personal projects.&nbsp; Now as shown on the list yesterday the projects my seem fairly benign however a simple to-do list is not enough to remind me of what I am doing. The title of a project does not help me keep track of where I am up to, when there are interruptions due to support/server issues.&nbsp; As CodeNinja pointed out in his comment:</p>
<blockquote><p>&#8220;<em>I have tested different to-do lists/project tracking systems</em></p>
<p><em>I want a web-based one, and would like it to communicate with an iPhone app. but a decent web app would do for starters.&#8221;</em></p></blockquote>
<p>I had previously been looking for a nice open source, web-based, collaborative&nbsp; package, and some of those offered certain aspects of what I was after, however I found many of these were overly complex or just too plain basic, and having spoken to CodeNinja I decided to have a look at one of the packages he had looked at previously.</p>
<p>Enter &#8220;<a href="http://www.dotproject.net/" target="_blank">dotProject</a>&#8221;</p>
<blockquote><p>&#8220;dotProject is a volunteer supported Project Management application. There is no &#8216;company&#8217; behind this project, it is managed, maintained, developed and supported by a volunteer group and by the users themselves.&#8221;</p></blockquote>
<p>Exactly the sort of product I like to use.</p>
<p>After a very simple install (download, unzip, create a database, sort out couple of permissions and run the install page) I was up and running, not only that with in another couple of minutes I had the basis of my first project going.&nbsp; After a few minutes more I started to really like the package.&nbsp; Not only was it providing me with the to-do part I was after, but also dependencies, child to-do&#8217;s file attachments, which could be checked in and out.&nbsp; It also provides &#8220;Gantt&#8221; charts of the project along with progress monitoring of each to-do.</p>
<p>The product goes further than that though, it is a full multi-user product with budgeting, resource allocation, calendars, file management, contact management and a ticketing system to-boot!</p>
<p>All in all I am thoroughly happy with this product and look forward to making it one of the tools I use on a daily basis. I only hope that it will not be a tool that I get side tracked by!</p>
<p>The post <a href="https://brain.demonpenguin.co.uk/2010/01/projects-r-us/">Projects R Us</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brain.demonpenguin.co.uk/2010/01/projects-r-us/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">31</post-id>	</item>
	</channel>
</rss>
