<?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>ComputerMedic (dotOrg) Web Servers &#187; config</title>
	<atom:link href="http://www.computermedic.org/?feed=rss2&#038;tag=config" rel="self" type="application/rss+xml" />
	<link>http://www.computermedic.org</link>
	<description>MLD Computers &#124; Computer Medic &#124; beagle host</description>
	<lastBuildDate>Fri, 22 Jul 2016 20:26:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.35</generator>
	<item>
		<title>WordPress Woes Here in 2016</title>
		<link>http://www.computermedic.org/?p=244</link>
		<comments>http://www.computermedic.org/?p=244#comments</comments>
		<pubDate>Mon, 09 May 2016 01:06:00 +0000</pubDate>
		<dc:creator><![CDATA[computermedicorg]]></dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[Web Server]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[conf]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[equipment]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.computermedic.org/?p=244</guid>
		<description><![CDATA[Old (-ish) server equipment, old (very, no ish about it) PHP v5.3.xx and WordPress version 4.xx don&#8217;t work together.  Period.  Don&#8217;t believe us, net search for &#8220;wordpress image upload error&#8221;.  You&#8217;ll see.  Google says right now: About 1,310,000 results (0.59 seconds) This is not a new thing, it has been going on for years since [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Old (-ish) server equipment, old (very, no ish about it) PHP v5.3.xx and WordPress version 4.xx don&#8217;t work together.  Period.  Don&#8217;t believe us, net search for &#8220;wordpress image upload error&#8221;.  You&#8217;ll see.  Google says right now: About 1,310,000 results (0.59 seconds)</p>
<p><span id="more-244"></span>This is not a new thing, it has been going on for years since WordPress versions in the middle 3.xx-es.  It&#8217;s not a WordPress &#8220;bug&#8221; &#8211; it&#8217;s because PHP v5.3.xx went End Of Life almost 2 years ago (on 14 Aug 2014 &#8211; see: <a href="http://php.net/eol.php" target="_blank">http://php.net/eol.php</a> ).  And, see: <a href="https://wordpress.org/support/topic/wp-35-is-not-compatible-with-php-53-please-read" target="_blank">https://wordpress.org/support/topic/wp-35-is-not-compatible-with-php-53-please-read</a></p>
<p>Now, here&#8217;s the deal.  Computers are [supposedly] cheap these days.  Supposedly.  So, [supposedly] you just buy some awesome new quad-this-or-that x64 with at least 128GB RAM and some number of TBs of storage to&#8230; host your 20-30 MB WordPress sites.  Because images, that&#8217;s why.  Oh yeah, then manually migrate 100 or so websites, databases, all the associated &#8220;stuff&#8221; and spend &#8220;a few minutes each&#8221; changing all of the myriad of things you had to do to those sites and config files to make it work a couple-few years ago.</p>
<p>Or: keep what you&#8217;ve got and deal with it until the new V-Lab-Super-Box is online and your &#8220;team&#8221; starts pushing things around in their spare time.  Right.</p>
<p>If you did google-bar the above image issue you&#8217;ll have discovered that it has gotten progressively worse the more versions away from good olde EOL PHP 5.3.xx WordPress has gotten.  We experienced this.  This page is being written in WordPress 4.2.8, the site that went to pot today auto-magic-ly updated itself to 4.5.2.  That site was having dreaded the &#8220;http Error&#8221; problem with images for over a year.  Now, today, kaput!  No images, no PDFs, no nothing through the [Add Media] [Upload] section.  We finally got a PDF to upload and link in a page by angrily clicking refresh and doing the same thing over and over (Add media, library, upload&#8230; select&#8230; repeat).  Once upon a time we could size images to &#8220;web friendly&#8221; sizes and do the Angry-Repeat click-ery &#8211; no more.  Kaput!</p>
<p>&#8220;Well,&#8221; says google-bar, &#8220;didn&#8217;t you know about the Media From FTP plugin?&#8221;  <a href="https://wordpress.org/plugins/media-from-ftp/" target="_blank">https://wordpress.org/plugins/media-from-ftp/</a>  &#8220;No,&#8221; says us.  So, we give it a try and when you click [Activate] it happily tells you:  Only works with PHP version 5.4 or higher.</p>
<p>Then it happened, just before give-up-time, because: (1) had already uploaded via ftp the problem image; (2) had looked at the [Insert From URL] button hundreds of times today.  [Insert From Url] clicked, http://domainname.com/wp-content/uploads/2016/05/PictureName.jpg&#8230;  BAM! Done.</p>
<p>Now it doesn&#8217;t show up in the Library but it shows up in the page &#8211; and in Edit mode there&#8217;s the alignment stuff, room for a title and a caption, and the ability to make it a link to itself (full sized).  The only hang-up: it inserts the image with width and height set to it&#8217;s &#8220;real&#8221; values (giant in this case).  Last trick, get some server-side resizing done (on the fly stuff) and&#8230;  BAM! Done.</p>
<p>So, at long last, here is the long way around work-around for Great New WordPress on Great Olde Server[s] with incompatible PHP (and other things) versions.</p>
<ul>
<li>ftp upload your image (keep the WordPress method of folder naming in case you ever &#8220;migrate&#8221; the site to Great New Server[s])</li>
<li>In the page or post: [Add Media] and [Insert From URL]</li>
<li>In the page or post: [Edit] the image, make it a link to itself, add a caption, title and alignment if you wish.</li>
<li>[Preview changes] and use whatever you use to see the on-screen height-width numbers you need to stop the server from sending the full-sized image to that thumbnail-sized box.  (We did Print-Screen, Paint, Select on a Windows computer.)</li>
<li>Switch your WordPress Editor to [Text] (underlying HTML) and change the width and height properties of your IMG tag.  (We changed &#8211; width=&#8221;2592&#8243; height=&#8221;1944&#8243; &#8211; to &#8211; width=&#8221;662&#8243; height=&#8221;496&#8243;.)</li>
</ul>
<p>Finally, [Save] the page or post, and go shake that piggy-bank and see about that new high-speed quad or oct thing with all the latest of everything (including PHP).  Test runs on many devices and browsers: invisible server-side image resize and send (thanks, Apache) and post complete.  Not very &#8220;reflexive&#8221; but &#8220;good enough&#8221; for now.</p>
<p>Now that that is taken care of&#8230; a test&#8230; of WordPress 4.2.8</p>
<div id="attachment_246" style="width: 310px" class="wp-caption aligncenter"><a href="http://www.computermedic.org/wp-content/uploads/2016/05/IMG5368.jpg"><img class="wp-image-246 size-medium" src="http://www.computermedic.org/wp-content/uploads/2016/05/IMG5368-300x225.jpg" alt="IMG5368" width="300" height="225" /></a><p class="wp-caption-text">This file would not upload.</p></div>
<p>Above: try again, pig headed try again, try again&#8230; error, error, long slow progress bar &#8211; worked !  Not worth the trouble.</p>
<p>Last notes and link:  Thanks to WordPress ( <a href="http://www.wordpress.org" target="_blank">http://www.wordpress.org</a> ) for not updating us to death.  The new Quad is actually in place and in QA Testing mode &#8211; but, migration is not going to happen until a lot more testing is done.  Known bugs are better than unknown ones.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.computermedic.org/?feed=rss2&#038;p=244</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Serious fail2ban!</title>
		<link>http://www.computermedic.org/?p=116</link>
		<comments>http://www.computermedic.org/?p=116#comments</comments>
		<pubDate>Tue, 13 Aug 2013 17:20:56 +0000</pubDate>
		<dc:creator><![CDATA[computermedicorg]]></dc:creator>
				<category><![CDATA[Networks]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Status]]></category>
		<category><![CDATA[already banned]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[bot]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[conf]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[ddos]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[fail2ban]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[named]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[network security]]></category>
		<category><![CDATA[rate]]></category>
		<category><![CDATA[rate limit]]></category>
		<category><![CDATA[rsyslog]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[syslog]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[zombie]]></category>

		<guid isPermaLink="false">http://www.computermedic.org/?p=116</guid>
		<description><![CDATA[It reminds me of a level of Serious Sam &#8211; the one where 1,000s of those headless bomb-toting zombie-soldiers and screamers came pouring at you relentlessly, seemingly to infinity (and beyond). It was a backdraft. Or the eye of the Zombie-Nado-Cane. When the bad-bots got some air around August 5th &#8211; hak4umz.net DDoS or DNS Amplification [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-117" alt="Serious Sam Box Art" src="http://www.computermedic.org/wp-content/uploads/2013/08/SeriousSamBoxArt.jpg" width="300" height="339" />It reminds me of a level of <a title="Croteam - Serious Sam Games" href="http://croteam.com/" target="_blank">Serious Sam</a> &#8211; the one where 1,000s of those headless bomb-toting zombie-soldiers and screamers came pouring at you relentlessly, seemingly to infinity (and beyond).</p>
<p>It was a <a title="Backdraft Post" href="http://www.computermedic.org/?p=107">backdraft</a>. Or the eye of the Zombie-Nado-Cane. When the bad-bots got some air around August 5th &#8211; hak4umz.net DDoS or DNS Amplification &#8211; fail2ban (and the servers) got burned.</p>
<p>Even the &#8220;eye-dee-keff-kuh-may&#8221; (TammyBelle&#8217;s God Mode Code for DOOM][ ) cheat didn&#8217;t help.  fail2ban got clobbered&#8230; &#8216;already banned&#8217; every one second in the log and no more bans happening because 100s or 1000s of times per second from 100s or thousands of bots: bad requests.</p>
<p><span id="more-116"></span></p>
<p>Here is the <em><strong>Serious!</strong></em> problem when you put the fail2ban -vs- the entire globe death match together:</p>
<pre>2013-08-13 12:40:37,730 fail2ban.actions: INFO   [named-flood] &lt;ip&gt; already banned
2013-08-13 12:40:38,732 fail2ban.actions: INFO   [named-flood] &lt;ip&gt; already banned</pre>
<p>almost exactly one second apart, hundreds of times, and no new banning going on.<br />
Q: Why?<br />
A: fail2ban appears to have a &#8220;one second pulse/parse&#8221; clock built in to it.</p>
<p>Q: So?<br />
A: So, when 4,000 log entries appear in a log that fail2ban is reading within that one second, fail2ban &#8216;queues&#8217; (or spools or fifo&#8217;s) those 4,000 entries into an internal list and tries to de-queue them one-per-second.</p>
<p>Easier math: (&#8220;let&#8217;s say&#8221;) there are 10 &#8216;fail regex&#8217; entries pouring into your log per second. Trying to de-queue the messages from the first second takes fail2ban 9 seconds.  By the time it gets done, there are 90 more messages/fails waiting.  So every second that goes by (in this low number scenario) the problem gets 10-to-the-10th-power worse.  The problem being fail2ban over-run by those headless bomb-toting zombies.  The &#8220;real world&#8221; explanation: fail2ban lags out and becomes combat ineffective.  In cop-talk the radio call from Officer fail2ban would be: &#8220;Extended&#8221;</p>
<p>Now, a &#8220;server admin&#8221; must consider &#8211; besides &#8216;shutdown -h now&#8217; &#8211; is there a solution to the problem? First part of that: what &#8211; <em>exactly</em> &#8211; is the problem.  More Q/A (logic/reasoning):<br />
Q: Problem?<br />
A: fail2ban says &#8216;already banned&#8217; and is &#8216;lagged out'; can&#8217;t fight the good fight.</p>
<p>Q: Why?<br />
A: Too many log entries per second.  fail2ban reads logs and &#8216;actions&#8217; based on log entries.</p>
<p>Q: So, why don&#8217;t you server admins just limit the number of log entries? (Instead of trying to hyper-tune fail2ban, just give it less to do? Remember the old-old server used to say &#8216;&#8230;the previous message repeated ### times&#8230;&#8217;)<br />
A: Why didn&#8217;t I think of that.</p>
<p>The old-old server was a Gentoo box dragged across the millennium boundary by makes and make-installs.  It finally wore out (it still runs, it was just retired because it had done it&#8217;s duty) this year.  A little searching about &#8216;the previous message repeated&#8217; and was reminded that <em>that</em> is called: rate-limit-ing.  A modern Centos-6-x86_64 install (not a bunch of custom compiled stuff on a 32-bit Gentoo) uses an &#8216;out of the box&#8217; rsyslog and doesn&#8217;t say things like &#8216;&#8230;the previous message&#8230;&#8217;  The new stuff says:<br />
imuxsock begins to drop messages from pid 1228 due to rate-limiting</p>
<p>Very little more searching finds:<br />
<a href="http://www.rsyslog.com/tag/rate-limiting/">http://www.rsyslog.com/tag/rate-limiting/</a></p>
<p>The docs are a &#8216;little dated&#8217; (2010) but the essentials are there to solve the problem (problem being &#8216;too many log entries for poor old fail2ban&#8217;).</p>
<p><strong>vim /etc/rsyslog.conf</strong> (and add as the 2nd and 3rd uncommented lines):</p>
<pre>#### 8.12.13 - try to slow the message floods so fail2ban won't die so much ####
$SystemLogRateLimitInterval 1
$SystemLogRateLimitBurst 5</pre>
<p>[Esc]:wq (write and quit)</p>
<p>Now do a <strong>/etc/init.d/rsyslog restart</strong> or <strong>service rsyslog restart</strong> (<em>reload</em> does not work, I tried it) and&#8230;</p>
<p>Tah-dah!  fail2ban can keep up with the log.  Some of the abusers (firey screaming zombies with tater-bombs) get by for a few seconds until the rate-limit/fail2ban get Serious!; but, real-world they were getting by by the hundres-of-thousands before this fix (while poor old fail2ban was over-run or lag-back-buffered).</p>
<p>It may not be &#8216;iddqd&#8217; (god/degreelessness mode in &#8216;that other great fps&#8217;), but $SystemLogRateLimitInterval/$SystemLogRateLimitBurst is very close to TammyBelle&#8217;s &#8220;eye-dee-keff-kuh-may&#8221; (megaarmor, weapons and keys) for fail2ban.</p>
<p>Almost as good as Tangy-Bells for break-shishst.<br />
Very happy, ammo added.</p>
<p>*** A minor success/victory ***<br />
49 hours later&#8230; fail2ban chugging along ban/unban-ing, much smaller log files, no other services lagged out because of the packet attacks on port 53&#8230;.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.computermedic.org/?feed=rss2&#038;p=116</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
