<?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>foxpa.ws</title>
	<atom:link href="http://foxpa.ws/feed/" rel="self" type="application/rss+xml" />
	<link>http://foxpa.ws</link>
	<description>pitter patter on the keyboard</description>
	<lastBuildDate>Thu, 16 May 2013 21:50:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Portable PHP HTTP(S) GET Request with HTTP Basic Authentication</title>
		<link>http://foxpa.ws/2013/05/16/portable-php-https-get-request-with-http-basic-authentication/</link>
		<comments>http://foxpa.ws/2013/05/16/portable-php-https-get-request-with-http-basic-authentication/#comments</comments>
		<pubDate>Thu, 16 May 2013 21:50:59 +0000</pubDate>
		<dc:creator>كارما</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[allow_url_fopen]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[authorization]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[http authentication]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[portability]]></category>
		<category><![CDATA[portable]]></category>
		<category><![CDATA[request]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[tls]]></category>
		<category><![CDATA[username]]></category>

		<guid isPermaLink="false">http://foxpa.ws/?p=1974</guid>
		<description><![CDATA[I&#8217;m not sure where I found this class years ago (probably the php.net comments) but it&#8217;s a handy way to make simple HTTP GET requests in PHP without having to rely on the availability of allow_url_fopen or curl extensions. It supports automatic detection of SSL/TLS and non-default port numbers based on the URL you provide. ]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m not sure where I found this class years ago (probably the php.net comments) but it&#8217;s a handy way to make simple HTTP GET requests in PHP without having to rely on the availability of <em>allow_url_fopen</em> or <em>curl extensions</em>. It supports automatic detection of SSL/TLS and non-default port numbers based on the URL you provide.</p>
<p>I&#8217;ve made a minor modification to include support for <a href="http://en.wikipedia.org/wiki/Basic_access_authentication">HTTP Basic Authentication</a>.</p>
<pre>
class HTTPRequest
{
    var $_fp;          // HTTP socket
    var $_url;         // full URL
    var $_host;        // HTTP host
    var $_protocol;    // protocol (HTTP/HTTPS)
    var $_uri;         // request URI
    var $_port;        // port
    var $_user;        // HTTP Basic Auth User
    var $_pass;        // HTTP Basic Auth Password
   
    // scan url
    function _scan_url()
    {
        $req = $this-&gt;_url;
       
        $pos = strpos($req, '://');
        $this-&gt;_protocol = strtolower(substr($req, 0, $pos));
       
        $req = substr($req, $pos+3);
        $pos = strpos($req, '/');
        if($pos === false)
            $pos = strlen($req);
        $host = substr($req, 0, $pos);
       
        if(strpos($host, ':') !== false)
        {
            list($this-&gt;_host, $this-&gt;_port) = explode(':', $host);
        }
        else
        {
            $this-&gt;_host = $host;
            $this-&gt;_port = ($this-&gt;_protocol == 'https') ? 443 : 80;
        }
       
        $this-&gt;_uri = substr($req, $pos);
        if($this-&gt;_uri == '')
            $this-&gt;_uri = '/';
    }
   
    // constructor
    function HTTPRequest($url, $user='', $pass='')
    {
        $this-&gt;_url = $url;
        $this-&gt;_scan_url();
        $this-&gt;_user = $user;
        $this-&gt;_pass = $pass;
    }
   
    // download URL to string
    function DownloadToString()
    {
        $crlf = "\r\n";
       
        // generate request
        $req = 'GET ' . $this-&gt;_uri . ' HTTP/1.0' . $crlf
            .    'Host: ' . $this-&gt;_host . $crlf;
            if(!empty($this-&gt;_user))
                 $req .= "Authorization: Basic " . base64_encode($this-&gt;_user . ':' . $this-&gt;_pass) . $crlf;
       $req .= $crlf;
       
        // fetch
        $this-&gt;_fp = fsockopen(($this-&gt;_protocol == 'https' ? 'ssl://' : '') . $this-&gt;_host, $this-&gt;_port);
        fwrite($this-&gt;_fp, $req);
        while(is_resource($this-&gt;_fp) &#038;&#038; $this-&gt;_fp &#038;&#038; !feof($this-&gt;_fp))
            $response .= fread($this-&gt;_fp, 1024);
        fclose($this-&gt;_fp);
       
        // split header and body
        $pos = strpos($response, $crlf . $crlf);
        if($pos === false)
            return($response);
        $header = substr($response, 0, $pos);
        $body = substr($response, $pos + 2 * strlen($crlf));
       
        // parse headers
        $headers = array();
        $lines = explode($crlf, $header);
        foreach($lines as $line)
            if(($pos = strpos($line, ':')) !== false)
                $headers[strtolower(trim(substr($line, 0, $pos)))] = trim(substr($line, $pos+1));
       
        // redirection?
        if(isset($headers['location']))
        {
            $http = new HTTPRequest($headers['location']);
            return($http-&gt;DownloadToString($http));
        }
        else
        {
            return($body);
        }
    }
}
</pre>
<p><strong>Usage:</strong></p>
<pre>
$r = new HTTPRequest($url, [username], [password]);
$response = $r->DownloadToString();
</pre>
<p>The <em>username</em> and <em>password</em> variables are optional.</p>
]]></content:encoded>
			<wfw:commentRss>http://foxpa.ws/2013/05/16/portable-php-https-get-request-with-http-basic-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick and Dirty (and Free!) Host Monitoring for DNS Failover and Round-Robin</title>
		<link>http://foxpa.ws/2013/05/14/quick-and-dirty-and-free-host-monitoring-for-dns-failover-and-round-robin/</link>
		<comments>http://foxpa.ws/2013/05/14/quick-and-dirty-and-free-host-monitoring-for-dns-failover-and-round-robin/#comments</comments>
		<pubDate>Tue, 14 May 2013 20:37:13 +0000</pubDate>
		<dc:creator>كارما</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[bind9]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[dns made easy]]></category>
		<category><![CDATA[dnsmadeeasy]]></category>
		<category><![CDATA[dnsupdate]]></category>
		<category><![CDATA[easydns]]></category>
		<category><![CDATA[expire]]></category>
		<category><![CDATA[expiry]]></category>
		<category><![CDATA[fail-over]]></category>
		<category><![CDATA[failover]]></category>
		<category><![CDATA[HA]]></category>
		<category><![CDATA[heartbeat]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[icinga]]></category>
		<category><![CDATA[load balacer]]></category>
		<category><![CDATA[load balacing]]></category>
		<category><![CDATA[load balance]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[monitorning]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[name server]]></category>
		<category><![CDATA[named]]></category>
		<category><![CDATA[notify]]></category>
		<category><![CDATA[propagation]]></category>
		<category><![CDATA[redundancy]]></category>
		<category><![CDATA[redundant]]></category>
		<category><![CDATA[rndc]]></category>
		<category><![CDATA[round robin]]></category>
		<category><![CDATA[route53]]></category>
		<category><![CDATA[rrdns]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[slave]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[ttl]]></category>
		<category><![CDATA[zone]]></category>
		<category><![CDATA[zone file]]></category>

		<guid isPermaLink="false">http://foxpa.ws/?p=1970</guid>
		<description><![CDATA[Round-Robin DNS gets trash-talked a lot because although it is a cheap and easy way to distribute loads it is counter-redundant: the more A records (servers) there are behind a domain the more points of failure there are and the lower your mean time to failure is going to be. The good news is that ]]></description>
				<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Round-robin_DNS">Round-Robin DNS</a> gets trash-talked a lot because although it is a cheap and easy way to distribute loads it is counter-redundant: the more A records (servers) there are behind a domain the more points of failure there are and the lower your mean time to failure is going to be. The good news is that if one in five web servers/reverse proxies are down then only about one fifth of your audience is unable to connect at any given time.</p>
<p>The answer to this problem is host monitoring. If we can update our DNS records to remove the IPs of downed servers then add them back when the hosts recover no direct intervention on our part is required. Unfortunately, DNS is a heavily cached system so we will have to work with reasonably short timeouts. <a href="http://www.dnsmadeeasy.com/">DNS Made Easy</a> recommends a TTL of no less than 180 seconds as some ISPs are configured to ignore the TTLs of records which they deem are too short and default to a much higher value. The drawback to short TTLs is that you will end up receiving more DNS queries, which is a problem if you use a commercial billed-by-million-queries DNS provider like <a href="http://aws.amazon.com/route53/">Amazon&#8217;s Route 53</a> or <a href="https://web.easydns.com/Pricing/">EasyDNS&#8217;s</a> enterprise service.</p>
<p>If your objective is to have web server failover that happens instantly this is simply not the solution for you &#8211; you need a <a href="http://en.wikipedia.org/wiki/Load_balancing_%28computing%29">load balancer</a> and/or <a href="http://en.wikipedia.org/wiki/Anycast">anycast</a> address space. Amazon&#8217;s Route53 and DNS Made Easy can be configured to check as often as every minute and it doesn&#8217;t make a lot of sense to run a ping/tcp test more often than that. At worst this means that the failover system doesn&#8217;t even know there is a problem for up to 60 seconds. Once the failover system updates the records there may be a short delay while the slave name servers synchronize. Then we have to wait for the record to expire at any-given-user&#8217;s ISP&#8217;s recursive name servers, which could take up to the TTL of your record or longer if their ISP is manipulative. Then you may have to wait for the record to expire in the caching DNS daemon on their home or office router. Then you may have to wait for the record to expire in their OS or browser&#8217;s DNS cache. This could take up to 15 minutes even if you use a very low TTL like 180.</p>
<p>So the question is: you already have DNS infrastructure. Why pay these large DNS outfits for host monitoring and DNS failover when it&#8217;s not really that great anyway and you can do it just as well as they can?</p>
<p>Just because BIND doesn&#8217;t have built-in support? Pshaw!</p>
<p>You could just as easily do the host monitoring with nagios/icinga or use the <a href="http://mysql-bind.sourceforge.net/">mysql-bind</a> backend or even some other database-backed name daemon but in this article I&#8217;ll show you how to drop in a simple shell script that will work with your existing BIND installation because it demonstrates how mind-numbingly simple this is and why it shouldn&#8217;t be charged for as a premium service.</p>
<p>Observe a typical zone file with round-robin:</p>
<pre>$TTL 6400       ; max TTL
@       IN      SOA     ns1.somedomain.com. admin.somedomain.com. (
                                201305140       ; Serial
                                28800           ; Refresh
                                7200            ; Retry
                                60480           ; Expire
                                600 )           ; TTL Minimum
@               IN      A       10.0.0.10
@               IN      A       10.0.0.11
@               IN      A       10.0.0.12
@               IN      A       10.0.0.13
@               IN      A       10.0.0.14
*               IN      A       10.0.0.10
*               IN      A       10.0.0.11
*               IN      A       10.0.0.12
*               IN      A       10.0.0.13
*               IN      A       10.0.0.14
ns1             IN      A       10.0.1.10
ns2             IN      A       10.0.1.11
@               IN      NS      ns1.somedomain.com.
@               IN      NS      ns2.somedomain.com.
www             IN      CNAME   somedomain.com.</pre>
<p>Our SOA contains the serial which will have to be updated by the script if our changes are to propagate properly. In the zone file on the master server(s) replace the SOA and block of round-robin A records with $INCLUDE statements like this:</p>
<pre>$INCLUDE "/var/bind/soa.include"
$INCLUDE "/var/bind/ips.include"
ns1             IN      A       10.0.1.10
ns2             IN      A       10.0.1.11
@               IN      NS      ns1.somedomain.com.
@               IN      NS      ns2.somedomain.com.
www             IN      CNAME   somedomain.com.</pre>
<p>Do this for every zone file which is to use this pool of A records. Now we have a centralized place to put the IPs and serial number that come from the shell script.</p>
<p>Create the script on the master name server and chmod +x it, don&#8217;t forget to update the paths to reflect your DNS situation. Also note that I&#8217;m adding a wildcard subdomain to the pool:</p>
<pre>#!/bin/bash
HOSTS="10.0.0.10 10.0.0.11 10.0.0.12 10.0.0.13 10.0.0.14"
COUNT=4
echo "; Generated by monitor.sh $(date)" &gt; /chroot/dns/var/bind/ips.include
for myHost in $HOSTS
do
  count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }')
  if [ $count -eq 0 ]; then
    # 100% failed 
    echo "$(date) $myHost is down" &gt;&gt; /var/log/monitor.log
  else
    echo "@               IN      A       $myHost" &gt;&gt; /chroot/dns/var/bind/ips.include
    echo "*               IN      A       $myHost" &gt;&gt; /chroot/dns/var/bind/ips.include
  fi

done

echo "; Generated by monitor.sh $(date)
\$TTL 300       ; max TTL
@       IN      SOA     ns1.somedomain.com. admin.somedomain.com. (
                                $(date +%s)      ; Serial
                                300             ; Refresh
                                60              ; Retry
                                86400           ; Expire
                                300 )           ; TTL Minimum" &gt; /chroot/dns/var/bind/soa.include

rndc reload</pre>
<p>This script will ping each host in the HOSTS array four times. If at least one ping is received the host is written to a new version of ips.include (note the single angle bracket when inserting the date). If all four pings fail a message will be recorded in /var/log/monitor.log. You may want to adjust the number of pings and failure tolerance, or replace the logging line with an e-mail notification instead. Once the ping tests are done a new soa.include is written with an epoch serial number and the zones are reloaded.</p>
<p>At the end of execution you should see something like this in ips.include:</p>
<pre>; Generated by monitor.sh Tue May 14 16:15:26 EDT 2013
@               IN      A       10.0.0.10
*               IN      A       10.0.0.10
@               IN      A       10.0.0.11
*               IN      A       10.0.0.11
@               IN      A       10.0.0.12
*               IN      A       10.0.0.12
@               IN      A       10.0.0.13
*               IN      A       10.0.0.13
@               IN      A       10.0.0.14
*               IN      A       10.0.0.14</pre>
<p>And in soa.include:</p>
<pre>; Generated by monitor.sh Tue May 14 16:15:26 EDT 2013
$TTL 300       ; max TTL
@       IN      SOA     ns1.somedomain.com. admin.somedomain.com. (
                                1368562526      ; Serial
                                300             ; Refresh
                                60              ; Retry
                                86400           ; Expire
                                300 )           ; TTL Minimum</pre>
<p>Note that you may need to chown named: the .include files after they are created the first time, depending on your environment.</p>
<p>I switched from using the widely popular YYYYMMDDID format to epoch since the 5 minute interval requires hours, minutes and seconds to be effective and YYYMMDDHHMMSS is too large a value for BIND. This resulted in a lower serial value &#8211; you may have to go around to your slaves and manually delete then reload their zone files.</p>
<p>This approach ends up generating a lot of NOTIFY traffic since every 5 minutes (or whatever interval you cron the shell script at) a new serial is loaded and all of your slaves have to be contacted. A more graceful improvement would be to save the state that each host is in inside of a temporary file and only update the serial when there has actually been a change in the status of your pool.</p>
<p>Another neat thing I thought of trying was using something like <a href="http://linux-ha.org/wiki/Heartbeat">heartbeat</a> for real-time monitoring and <a href="http://dnsupdate.sourceforge.net/">dnsupdate</a> to dynamically update the zone files. This should narrow the propagation latency on your side of the equation down to the barest minimum possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://foxpa.ws/2013/05/14/quick-and-dirty-and-free-host-monitoring-for-dns-failover-and-round-robin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring GRUB2 for Xen on Gentoo</title>
		<link>http://foxpa.ws/2013/04/28/configuring-grub2-for-xen-on-gentoo/</link>
		<comments>http://foxpa.ws/2013/04/28/configuring-grub2-for-xen-on-gentoo/#comments</comments>
		<pubDate>Sun, 28 Apr 2013 23:54:43 +0000</pubDate>
		<dc:creator>كارما</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[bootloader]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[ext]]></category>
		<category><![CDATA[ext4]]></category>
		<category><![CDATA[extfs]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[grub2]]></category>
		<category><![CDATA[grub2-install]]></category>
		<category><![CDATA[grub2-mkconfig]]></category>
		<category><![CDATA[hypervisor]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://foxpa.ws/?p=1966</guid>
		<description><![CDATA[GRUB2 is highly customizable and feature-rich, however it is a bit of a nightmare if you configure bootloaders regularly. Unfortunately GRUB 0.97 doesn&#8217;t support ext4 and &#8211; if you were an idiot like me &#8211; you might have set up your new dedicated with an ext4 /boot. Now, you have neither the time nor patience ]]></description>
				<content:encoded><![CDATA[<p>GRUB2 is highly customizable and feature-rich, however it is a bit of a nightmare if you configure bootloaders regularly. Unfortunately GRUB 0.97 doesn&#8217;t support ext4 and &#8211; if you were an idiot like me &#8211; you might have set up your new dedicated with an ext4 /boot. Now, you have neither the time nor patience to re-install and need to make Xen <em>go</em>.</p>
<p>First, copy your Dom0 .config and kernel to /boot/. /etc/grub.d/20_linux_xen picks up on the CONFIG_XEN_PRIVILEGED_GUEST=y variable.</p>
<pre>
# cp /usr/src/linux/arch/x86_64/boot/bzImage /boot/kernel-dom0
# cp /usr/src/linux/.config /boot/config-dom0
</pre>
<p>Next, remove the executable flag from /etc/grub.d/10_linux or you will end up with three or four entries that boot straight to the Dom0 kernel without the hypervisor.</p>
<pre>
# chmod -x /etc/grub.d/10_linux
</pre>
<p>To add kernel boot parameters to your grub.cfg (as generated with grub2-mkconfig and 20_linux_xen) add these lines to your /etc/default/grub file:</p>
<pre>
GRUB_CMDLINE_LINUX_XEN_REPLACE="max_loop=128"
GRUB_CMDLINE_XEN="dom0_mem=512"
</pre>
<p>The former will place your boot options on the Dom0 kernel&#8217;s module line. The latter will place boot options on the xen.gz hypervisor&#8217;s kernel line.</p>
<p>Now, generate your new configuration:</p>
<pre>
# grub2-mkconfig -o /boot/grub2/grub.cfg
</pre>
<p>Once the config file has been written, determine the position of the Xen hypervisor entry and update GRUB_DEFAULT in /etc/default/grub.</p>
<p>Install GRUB2 to your MBR(s) as necessary:</p>
<pre>
# grub2-install /dev/sda 
</pre>
]]></content:encoded>
			<wfw:commentRss>http://foxpa.ws/2013/04/28/configuring-grub2-for-xen-on-gentoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache OFBiz: Cannot find a service engine definition for the engine name [java] in the serviceengine.xml file</title>
		<link>http://foxpa.ws/2013/04/23/apache-ofbiz-cannot-find-a-service-engine-definition-for-the-engine-name-java-in-the-serviceengine-xml-file/</link>
		<comments>http://foxpa.ws/2013/04/23/apache-ofbiz-cannot-find-a-service-engine-definition-for-the-engine-name-java-in-the-serviceengine-xml-file/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 21:45:42 +0000</pubDate>
		<dc:creator>كارما</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[apache ofbiz]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[ofbiz]]></category>
		<category><![CDATA[open for business]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[ports]]></category>
		<category><![CDATA[settings]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://foxpa.ws/?p=1963</guid>
		<description><![CDATA[Chances are you just changed the port settings in framework/base/config/ofbiz-containers.xml but forgot to update framework/service/config/serviceengine.xml. Open serviceengine.xml and replace all four instances of &#8220;8080&#8243; with the non-secure port you specified in ofbiz-containers.xml]]></description>
				<content:encoded><![CDATA[<p>Chances are you just changed the port settings in framework/base/config/ofbiz-containers.xml but forgot to update framework/service/config/serviceengine.xml.</p>
<p>Open serviceengine.xml and replace all four instances of &#8220;8080&#8243; with the non-secure port you specified in ofbiz-containers.xml.</p>
]]></content:encoded>
			<wfw:commentRss>http://foxpa.ws/2013/04/23/apache-ofbiz-cannot-find-a-service-engine-definition-for-the-engine-name-java-in-the-serviceengine-xml-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find Files Which Have Been Recently Modified or Created</title>
		<link>http://foxpa.ws/2013/04/23/find-files-which-have-been-recently-modified-or-created/</link>
		<comments>http://foxpa.ws/2013/04/23/find-files-which-have-been-recently-modified-or-created/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 21:13:35 +0000</pubDate>
		<dc:creator>كارما</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[attacker]]></category>
		<category><![CDATA[automated]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[compromise]]></category>
		<category><![CDATA[compromised]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[exploited]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[fraud]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacker]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[hole]]></category>
		<category><![CDATA[insecure]]></category>
		<category><![CDATA[isp]]></category>
		<category><![CDATA[malicious software]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[phishing]]></category>
		<category><![CDATA[rootkit]]></category>
		<category><![CDATA[shrinkwrapware]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[vector]]></category>
		<category><![CDATA[vulnerability]]></category>
		<category><![CDATA[webshell]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://foxpa.ws/?p=1961</guid>
		<description><![CDATA[Has your outdated wordpress or other shrinkwrapware been compromised? (Yes &#62;.&#62;) After taking steps to shut down the site you should probably use the find command to check to see if there are any unusual files which have been uploaded recently. If you scramble to close the hole and do updates before this step you ]]></description>
				<content:encoded><![CDATA[<p>Has your outdated wordpress or other shrinkwrapware been compromised? (Yes &gt;.&gt;)</p>
<p>After taking steps to shut down the site you should probably use the <strong>find</strong> command to check to see if there are any unusual files which have been uploaded recently. If you scramble to close the hole and do updates before this step you will likely end up drowning any suspects in the results.</p>
<p>If you don&#8217;t remove, for example, a phishing page before plugging the hole you:</p>
<ul>
<li>May never find out it&#8217;s there</li>
<li>Are contributing to phishing</li>
<li>One day your ISP will probably forward you a sternly worded letter from the victimized institution and threaten to drop your service if the page is not removed in 24 hours</li>
</ul>
<p>Use your imagination if it&#8217;s something worse, like a rootkit or webshell.</p>
<p>It is necessary to determine the earliest possible time the attack could have taken place. It won&#8217;t kill you to add a day or two for safety.</p>
<pre>
# find /var/www/localhost/htdocs/ -type f -ctime -<em>X</em>
</pre>
<p>Where <em>X</em> is the number of days to look back.</p>
]]></content:encoded>
			<wfw:commentRss>http://foxpa.ws/2013/04/23/find-files-which-have-been-recently-modified-or-created/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LG&#8217;s Tucked-Away RMA Portal</title>
		<link>http://foxpa.ws/2013/04/23/lgs-tucked-away-rma-portal/</link>
		<comments>http://foxpa.ws/2013/04/23/lgs-tucked-away-rma-portal/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 20:53:21 +0000</pubDate>
		<dc:creator>كارما</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[blu ray]]></category>
		<category><![CDATA[defective]]></category>
		<category><![CDATA[lg]]></category>
		<category><![CDATA[portal]]></category>
		<category><![CDATA[refurbished]]></category>
		<category><![CDATA[return]]></category>
		<category><![CDATA[rma]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://foxpa.ws/?p=1959</guid>
		<description><![CDATA[I recently purchased an LG blu-ray burner which was DOA. I might just be an idiot, and things may have changed by now but I wasted a solid half hour of my life not finding anywhere to RMA the drive on their Canadian consumer products site. For your benefit, so you do not end up ]]></description>
				<content:encoded><![CDATA[<p>I recently purchased an LG blu-ray burner which was DOA.</p>
<p>I might just be an idiot, and things may have changed by now but I wasted a solid half hour of my life <em>not</em> finding anywhere to RMA the drive on their Canadian consumer products site.</p>
<p>For your benefit, so you do not end up on hold with consumer support for 20 minutes as I did, the location of the RMA portal:</p>
<p><a href="https://www.lgrepairportal.com">https://www.lgrepairportal.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://foxpa.ws/2013/04/23/lgs-tucked-away-rma-portal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Documentary for Dinner: Light Darkness and Colours (1998)</title>
		<link>http://foxpa.ws/2013/04/21/documentary-for-dinner-light-darkness-and-colours-1998/</link>
		<comments>http://foxpa.ws/2013/04/21/documentary-for-dinner-light-darkness-and-colours-1998/#comments</comments>
		<pubDate>Sun, 21 Apr 2013 23:27:27 +0000</pubDate>
		<dc:creator>كارما</dc:creator>
				<category><![CDATA[Documentary]]></category>
		<category><![CDATA[colour]]></category>
		<category><![CDATA[documentary]]></category>
		<category><![CDATA[goethe]]></category>
		<category><![CDATA[philosophy]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[theory]]></category>

		<guid isPermaLink="false">http://foxpa.ws/?p=1956</guid>
		<description><![CDATA[Using Goethe&#8217;s Theory of Colours as point of departure, Light Darkness and Colours takes us on a fascinating journey through the universe of colours]]></description>
				<content:encoded><![CDATA[<p>Using <a href="http://en.wikipedia.org/wiki/Theory_of_Colours">Goethe&#8217;s Theory of Colours</a> as point of departure, Light Darkness and Colours takes us on a fascinating journey through the universe of colours.</p>
<p><iframe width="500" height="280" src="http://www.youtube.com/embed/GiCI1HVLgBI?feature=player_embedded" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://foxpa.ws/2013/04/21/documentary-for-dinner-light-darkness-and-colours-1998/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find the Largest Open Files and Their Owner(s) on Linux with lsof</title>
		<link>http://foxpa.ws/2013/04/12/find-the-largest-open-files-on-linux-with-lsof/</link>
		<comments>http://foxpa.ws/2013/04/12/find-the-largest-open-files-on-linux-with-lsof/#comments</comments>
		<pubDate>Fri, 12 Apr 2013 23:15:57 +0000</pubDate>
		<dc:creator>كارما</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[ghost]]></category>
		<category><![CDATA[lsof]]></category>
		<category><![CDATA[sort]]></category>
		<category><![CDATA[space]]></category>

		<guid isPermaLink="false">http://foxpa.ws/?p=1944</guid>
		<description><![CDATA[In this article we covered finding the largest files on a file system. Often this doesn&#8217;t account for the whole story when you scramble to clear up a filled volume; for as long as a process exists which has opened a given file that file will &#8211; even if apparently deleted &#8211; continue to exist ]]></description>
				<content:encoded><![CDATA[<p>In <a href="http://foxpa.ws/2012/04/17/find-and-delete-the-largest-files-on-a-file-system/">this article</a> we covered finding the largest files on a file system. Often this doesn&#8217;t account for the whole story when you scramble to clear up a filled volume; for as long as a process exists which has opened a given file that file will &#8211; even if apparently deleted &#8211; continue to exist until that process releases it.</p>
<p>This strategy has numerous benefits, not the least of which is the ability to upgrade libraries and binaries in-place. The software which relies on these libraries continues to run using the version it was started up with, preventing crashes due to version mismatching and giving you time to update the binaries themselves before restarting for minimal downtime.</p>
<p>Unfortunately, this makes things slightly confusing. You may have deleted a 400MB log file expecting to have immediately freed 400MB but <strong>df</strong> is still reporting that your file system is full. If you know what process &#8220;owns&#8221; that file it&#8217;s usually a simple matter of restarting the corresponding software. You won&#8217;t always know this, however, and that&#8217;s where some clever use of the lsof command comes in handy.</p>
<p><strong>lsof</strong> spits out the size and owner of all open files. If you already know the file you&#8217;re looking for it&#8217;s as simple as grepping the output:</p>
<pre>
# lsof | grep "/var/log/zimbra.log"
COMMAND     PID    USER   FD      TYPE             DEVICE    SIZE/OFF       NODE NAME
rsyslogd   1285    root    6w      REG             202,17    65125680    2031675 /var/log/zimbra.log
</pre>
<p>If we pipe <strong>lsof</strong>&#8216;s output through <strong>awk</strong> and <strong>sort</strong> we can get some useful, human-readable information. This command will give us the 10 largest currently open files, the size of the files in megabytes and the name of the process(es) using them:</p>
<pre>
# lsof / | awk '{if($7 > 1048576) print $7/1048576 "MB" " " $9 " " $1}' | sort -n -u | tail
</pre>
<p>For example:</p>
<pre>
498.804MB /var/log/zimbra.log zimbra
</pre>
<p>To view more or less than 10 results add <strong>-n X</strong> where <em>X</em> is the number of lines you would like to see to the <strong>tail</strong> command.</p>
]]></content:encoded>
			<wfw:commentRss>http://foxpa.ws/2013/04/12/find-the-largest-open-files-on-linux-with-lsof/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Documentary for Dinner: VPRO Tegenlicht&#124;Backlight: The Tax Free Tour (2013)</title>
		<link>http://foxpa.ws/2013/03/29/documentary-for-dinner-vpro-tegenlichtbacklight-the-tax-free-tour-2013/</link>
		<comments>http://foxpa.ws/2013/03/29/documentary-for-dinner-vpro-tegenlichtbacklight-the-tax-free-tour-2013/#comments</comments>
		<pubDate>Sat, 30 Mar 2013 02:39:14 +0000</pubDate>
		<dc:creator>كارما</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Documentary]]></category>
		<category><![CDATA[accounting]]></category>
		<category><![CDATA[africa]]></category>
		<category><![CDATA[avoidance]]></category>
		<category><![CDATA[backlight]]></category>
		<category><![CDATA[baking]]></category>
		<category><![CDATA[bank]]></category>
		<category><![CDATA[banksters]]></category>
		<category><![CDATA[cayman islands]]></category>
		<category><![CDATA[complicity]]></category>
		<category><![CDATA[documentary]]></category>
		<category><![CDATA[dutch]]></category>
		<category><![CDATA[europe]]></category>
		<category><![CDATA[evasion]]></category>
		<category><![CDATA[london]]></category>
		<category><![CDATA[netherlands]]></category>
		<category><![CDATA[new york]]></category>
		<category><![CDATA[secrecy]]></category>
		<category><![CDATA[tax]]></category>
		<category><![CDATA[tax haven]]></category>
		<category><![CDATA[tax holiday]]></category>
		<category><![CDATA[tax neutral]]></category>
		<category><![CDATA[tegenlicht]]></category>
		<category><![CDATA[united kingtom]]></category>
		<category><![CDATA[vrpo]]></category>
		<category><![CDATA[wall street]]></category>

		<guid isPermaLink="false">http://foxpa.ws/?p=1941</guid>
		<description><![CDATA[My favourite Dutch series is back with a visually stunning tour around the world&#8217;s tax havens in an effort to crystalize how giant multinational corporations like Apple can pay an effective tax rate in the ballpark of 1.9%]]></description>
				<content:encoded><![CDATA[<p>My favourite Dutch series is back with a visually stunning tour around the world&#8217;s tax havens in an effort to crystalize how giant multinational corporations like Apple can pay an effective tax rate in the ballpark of 1.9%</p>
<p><iframe width="500" height="280" src="http://www.youtube.com/embed/d4o13isDdfY?feature=player_detailpage" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://foxpa.ws/2013/03/29/documentary-for-dinner-vpro-tegenlichtbacklight-the-tax-free-tour-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zimbra &#8220;Some Services Are Not Running&#8221; Even Though They Are</title>
		<link>http://foxpa.ws/2013/03/29/zimbra-some-services-are-not-running-even-though-they-are/</link>
		<comments>http://foxpa.ws/2013/03/29/zimbra-some-services-are-not-running-even-though-they-are/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 15:43:24 +0000</pubDate>
		<dc:creator>كارما</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[zimbra]]></category>
		<category><![CDATA[zmstatuslog]]></category>

		<guid isPermaLink="false">http://foxpa.ws/?p=1939</guid>
		<description><![CDATA[If you have logged in to your Zimbra administration interface and been told that &#8220;Some services are not running&#8221; despite what zmcontrol status is telling you there may be a problem with the cron scripts. You can force a manual update by running: # sudo -u zimbra /opt/zimbra/libexec/zmstatuslog To re-load the cron settings perform the ]]></description>
				<content:encoded><![CDATA[<p>If you have logged in to your Zimbra administration interface and been told that &#8220;Some services are not running&#8221; despite what zmcontrol status is telling you there may be a problem with the cron scripts.</p>
<p>You can force a manual update by running:</p>
<pre>
# sudo -u zimbra /opt/zimbra/libexec/zmstatuslog
</pre>
<p>To re-load the cron settings perform the following:</p>
<pre>
# cd /opt/zimbra/zimbramon/crontabs
# cat * > crontab.zimbra
# sudo -u zimbra crontab crontab.zimbra
</pre>
]]></content:encoded>
			<wfw:commentRss>http://foxpa.ws/2013/03/29/zimbra-some-services-are-not-running-even-though-they-are/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
