<?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>blog.biernacki.ca &#187; Linux</title> <atom:link href="http://blog.biernacki.ca/category/linux/feed/" rel="self" type="application/rss+xml" /><link>http://blog.biernacki.ca</link> <description>Jakub&#039;s rants and raves on Life</description> <lastBuildDate>Tue, 10 Jan 2012 21:39:14 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>Putty strange &#8216;Access Denied&#8217; following username entry</title><link>http://blog.biernacki.ca/2011/10/putty-strange-access-denied-following-username-entry/</link> <comments>http://blog.biernacki.ca/2011/10/putty-strange-access-denied-following-username-entry/#comments</comments> <pubDate>Mon, 31 Oct 2011 13:16:44 +0000</pubDate> <dc:creator>Jakub</dc:creator> <category><![CDATA[How To]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[SysAdmin]]></category> <category><![CDATA[access denied]]></category> <category><![CDATA[error]]></category> <category><![CDATA[putty]]></category> <category><![CDATA[update]]></category> <guid
isPermaLink="false">http://blog.biernacki.ca/?p=546</guid> <description><![CDATA[I don&#8217;t know about you, but I kept getting this since upgrading putty to 0.61, as 0.60 didn&#8217;t do so before. It would be an error of &#8216;Access Denied&#8217; right after username entry, and all else would proceed as planned. Well I searched about it a bit and found the answer on superuser.com. PuTTY tries [...]]]></description> <content:encoded><![CDATA[<p>I don&#8217;t know about you, but I kept getting this since upgrading putty to 0.61, as 0.60 didn&#8217;t do so before.</p><p><img
src="http://blog.biernacki.ca/wp-content/uploads/2011/10/putty-access-denied-error.jpg" alt="" title="putty-access-denied-error" width="627" height="312" class="aligncenter size-full wp-image-547" /></p><p>It would be an error of &#8216;Access Denied&#8217; right after username entry, and all else would proceed as planned.  Well I searched about it a bit and found the answer on superuser.com.</p><blockquote><p> PuTTY tries several authentication methods in a row, which might cause these messages:</p><ul><li>GSSAPI (only if your system and the server have it enabled)</li><li>Public key (only if you have a key loaded)</li><li>Password</li></ul><p>After receiving the &#8220;Access denied&#8221; message, hold Ctrl and right-click on the PuTTY window, then select Event log. At the bottom you will see what exactly caused the failure.</p></blockquote><p><a
href="http://superuser.com/questions/312197/putty-0-61-why-do-i-see-access-denied-message-after-i-enter-my-login-id">http://superuser.com/questions/312197/putty-0-61-why-do-i-see-access-denied-message-after-i-enter-my-login-id</a></p> ]]></content:encoded> <wfw:commentRss>http://blog.biernacki.ca/2011/10/putty-strange-access-denied-following-username-entry/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Great reference for learning BASH</title><link>http://blog.biernacki.ca/2010/07/great-reference-for-learning-bash/</link> <comments>http://blog.biernacki.ca/2010/07/great-reference-for-learning-bash/#comments</comments> <pubDate>Wed, 14 Jul 2010 01:33:39 +0000</pubDate> <dc:creator>Jakub</dc:creator> <category><![CDATA[How To]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[SysAdmin]]></category> <guid
isPermaLink="false">http://blog.biernacki.ca/?p=294</guid> <description><![CDATA[As my buddy Mike has been writing great BASH scripts, I&#8217;m trying to get some more Linux experience, so I have been doing some research into BASH programming on the linux command line. I will add more references here as I find them useful: http://www.justlinux.com/nhf/Programming/Bash_Programming_Cheat_Sheet.html &#8211; Bash Cheatsheet http://www.mindpicnic.com/tag/bash/ &#8211; Learn Bash]]></description> <content:encoded><![CDATA[<p>As my buddy Mike has been writing great BASH scripts, I&#8217;m trying to get some more Linux experience, so I have been doing some research into BASH programming on the linux command line.</p><p>I will add more references here as I find them useful:</p><ul><li><a
href="http://www.justlinux.com/nhf/Programming/Bash_Programming_Cheat_Sheet.html">http://www.justlinux.com/nhf/Programming/Bash_Programming_Cheat_Sheet.html</a> &#8211; Bash Cheatsheet</li><li><a
href="http://www.mindpicnic.com/tag/bash/">http://www.mindpicnic.com/tag/bash/</a> &#8211; Learn Bash</li></ul> ]]></content:encoded> <wfw:commentRss>http://blog.biernacki.ca/2010/07/great-reference-for-learning-bash/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Hardening your Ubuntu 9.10 Server &#8211; Firewall</title><link>http://blog.biernacki.ca/2010/02/hardening-your-ubuntu-9-10-server-firewall/</link> <comments>http://blog.biernacki.ca/2010/02/hardening-your-ubuntu-9-10-server-firewall/#comments</comments> <pubDate>Fri, 26 Feb 2010 03:59:46 +0000</pubDate> <dc:creator>Jakub</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[SysAdmin]]></category> <guid
isPermaLink="false">http://blog.biernacki.ca/?p=231</guid> <description><![CDATA[These are the steps that I tried to follow to harden my server from intrusion, at least at the SSH level.]]></description> <content:encoded><![CDATA[<p>Having bought a Linode.com VPS, I began experimenting more with Linux, at only $20 a month, its a great setup, your own virtual server, and the rights to do as you please.  However with that power, comes responsibility (I should hope..).  So we need to setup our firewall properly to reduce the chance of attack, and hacks.</p><p>Below is the IPTABLES script that I&#8217;ve developed based on multiple sources:</p><pre class="brush: bash; title: ; notranslate">
#!/bin/sh
IPT=&quot;/sbin/iptables&quot;
# Flush old rules, old custom tables
$IPT -F
$IPT -X
$IPT -t nat -F
$IPT -t nat -X
$IPT -t mangle -F
$IPT -t mangle -X
$IPT -P INPUT ACCEPT
$IPT -P FORWARD ACCEPT
$IPT -P OUTPUT ACCEPT
# Set default policies for all three default chains
$IPT -P INPUT DROP
$IPT -P FORWARD DROP
$IPT -P OUTPUT ACCEPT
# Enable free use of loopback interfaces
$IPT -A INPUT -i lo -j ACCEPT
$IPT -A OUTPUT -o lo -j ACCEPT
# All TCP sessions should begin with SYN
$IPT -A INPUT -p tcp ! --syn -m state --state NEW -s 0.0.0.0/0 -j DROP
# Lets log and drop stuff
$IPT -N LOGNDROP
$IPT -A INPUT -j LOGNDROP
$IPT -A LOGNDROP -p tcp -m limit --limit 4/min -j LOG --log-prefix &quot;Denied TCP: &quot; --log-level 7
$IPT -A LOGNDROP -p udp -m limit --limit 4/min -j LOG --log-prefix &quot;Denied UDP: &quot; --log-level 7
$IPT -A LOGNDROP -p icmp -m limit --limit 4/min -j LOG --log-prefix &quot;Denied ICMP: &quot; --log-level 7
$IPT -A LOGNDROP -j DROP
# X-mas tree protection
$IPT -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j LOGNDROP
$IPT -A INPUT -p tcp --tcp-flags SYN,FIN,RST SYN,FIN,RST -j LOGNDROP
$IPT -A INPUT -p tcp --tcp-flags SYN,FIN,RST,PSH SYN,FIN,RST,PSH -j LOGNDROP
# block IANA reserved
$IPT -A INPUT -i eth0 -s 10.0.0.0/8 -j LOGNDROP
$IPT -A INPUT -i eth0 -s 172.16.0.0/12 -j LOGNDROP
$IPT -A INPUT -i eth0 -s 192.168.0.0/16 -j LOGNDROP
# Accept inbound TCP packets
$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -A INPUT -p tcp --dport 80 -m state --state NEW -s 0.0.0.0/0 -j ACCEPT
$IPT -A INPUT -p tcp --dport 443 -m state --state NEW -s 0.0.0.0/0 -j ACCEPT
$IPT -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW -m recent --set --name SSH
$IPT -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 5 --rttl --name SSH -j DROP
$IPT -A INPUT -j LOGNDROP
</pre><p>The script is fairly straight forward, but includes a few little &#8216;gems&#8217;, those include X-mas tree protection (fully lit up packets &#8211; SYN, FIN etc;). As well as blocking IANA reserved ip&#8217;s (which you should not get on an external box!).</p><p>The only ports that I open are port 80 for HTTP.<br
/> Port 443 for HTTPS and 22 for SSH (altho I should move it to a non-standard port to reduce bruteforce attacks).</p><p>What kind of gems do you guys have in your iptables for protection?  One of my next plans is to either add a port-knock (for ssh) or a tarpit (also for ssh &#8211; which should slow down bruteforce attempts).</p> ]]></content:encoded> <wfw:commentRss>http://blog.biernacki.ca/2010/02/hardening-your-ubuntu-9-10-server-firewall/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>WGET only if file is modified</title><link>http://blog.biernacki.ca/2009/05/wget-only-if-file-is-modified/</link> <comments>http://blog.biernacki.ca/2009/05/wget-only-if-file-is-modified/#comments</comments> <pubDate>Wed, 06 May 2009 21:27:13 +0000</pubDate> <dc:creator>Jakub</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[SysAdmin]]></category> <category><![CDATA[shellscript]]></category> <category><![CDATA[sync]]></category> <category><![CDATA[wget]]></category> <guid
isPermaLink="false">http://blog.biernacki.ca/?p=163</guid> <description><![CDATA[This is a tiny little tip, and probably any linux guru worth his/her salt knows this, but I just discovered the wget usage to check the time-stamp / last-modified header prior to downloading a file.  Which is pretty cool if you&#8217;ve ever setup any shell scripts that fetch/sync something. I have written some apps in [...]]]></description> <content:encoded><![CDATA[<p>This is a tiny little tip, and probably any linux guru worth his/her salt knows this, but I just discovered the wget usage to check the time-stamp / last-modified header prior to downloading a file.  Which is pretty cool if you&#8217;ve ever setup any shell scripts that fetch/sync something.</p><p>I have written some apps in the past that have relied on wget to fetch content, thereby cache it locally (as a backup in case of remote failure, as I&#8217;ve had a couple times).  Also it reduces the load if that data is begin shown on the your website/app.  So if 100 users sign on and check something, it doesn&#8217;t hit the remote server for 100x fetches of that data, it just falls back to the local copy, then the re-sync takes place 10-15 min later.</p><p>Anyways the command to get a timestamp check before downloading a file is:</p><blockquote><p><strong>wget -N http://google.com/robots.txt</strong></p></blockquote><p>So the above command will only fetch the <strong>robots.txt</strong> file IF and ONLY if the following is true:</p><ul><li>A file of that name does not already exist locally.</li><li>A file of that name does exist, but the remote file was modified more recently than the local file.</li></ul><p>Well there you have it, dumb but useful command if you ever need it.  Here is a script that I&#8217;ve used in the past to spool &amp; fetch RSS / XML feeds:</p><pre class="brush: bash; title: ; notranslate">
!/bin/bash
#------------------------------------------------------------------
#
# This script will run via CRONTAB and fetch data from the
# urls.txt file, which can be used internally.  This way we minimize
# the number of requests externally for data.
#
# - created by Jakub
#
#------------------------------------------------------------------
basedir=/htdocs/RSS
storedir=/htdocs/RSS/read/
sourcefile=/htdocs/RSS/urls.txt&lt;/strong&gt;
#------------------------------------------------------------------
# Read the URLS.TXT file to get the URL/filename
#
# Formatted:
# http://google.com/robots.txt/robot.filename.txt
# ^- URL                                                 ^- filename to save as
for s in `cat &quot;$sourcefile&quot;`;
do
geturl=`dirname $s`;
filename=`basename $s`;
wget -qN $geturl -pO &quot;$storedir&quot;$filename;
done;
#------------------------------------------------------------------
</pre>]]></content:encoded> <wfw:commentRss>http://blog.biernacki.ca/2009/05/wget-only-if-file-is-modified/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Morgage crisis? or Process crisis?</title><link>http://blog.biernacki.ca/2009/04/morgage-crisis-or-process-crisis/</link> <comments>http://blog.biernacki.ca/2009/04/morgage-crisis-or-process-crisis/#comments</comments> <pubDate>Sat, 25 Apr 2009 05:05:41 +0000</pubDate> <dc:creator>Jakub</dc:creator> <category><![CDATA[In the News]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Thoughts & Rants]]></category> <category><![CDATA[credit rating]]></category> <category><![CDATA[mortgage]]></category> <category><![CDATA[pain in the ass]]></category> <category><![CDATA[rant]]></category> <guid
isPermaLink="false">http://blog.biernacki.ca/?p=151</guid> <description><![CDATA[I figured that with all the turmoil in the market, it would be perfect to gamble and buy a house.  After all prices are at an all-time low, so I went for it. Since last November I have been looking at homes.  As my Realtor can attest, I have gone through probably 40+ homes before [...]]]></description> <content:encoded><![CDATA[<p>I figured that with all the turmoil in the market, it would be perfect to gamble and buy a house.  After all prices are at an all-time low, so I went for it.</p><p>Since last November I have been looking at homes.  As my <a
href="http://en.wikipedia.org/wiki/Realtor" target="_blank">Realtor</a> can attest, I have gone through probably 40+ homes before finally finding one that I loved and bidding on it (and winning the bid).</p><p><img
class="alignright size-full wp-image-160" style="margin-left: 5px; margin-bottom: 5px;" title="Mortgage Crisis" src="http://blog.biernacki.ca/wp-content/uploads/2009/04/mortgage.jpg" alt="Mortgage Crisis" width="337" height="274" />Everything up to that point went smooth until I got half way into the mortgage process, THEN things started getting weird, I began getting irrelevant requests from the underwriters for getting 30 day history on ALL my accounts, meaning, my stock investments (in the toilet), my mutual funds (in the toilet) and even.. yes my one years worth of 401k&#8217;s (also in the toilet). They looked at my Canadian chequing account and questioned small deposits like $200 personal transfer from my friend for money he owed me (there were like 4 deposits, totaling under 800 dollars combined!).  I laughed each time these requests came through, but I fulfilled their wishes.  Well except for the 401k, I couldn&#8217;t get that in the time frame that they requested because ING direct (the company behind my 401k) sends paper reports out every quarter, and my last quarter was from December, and did not satisfy their needs (but we worked this out).</p><p>The next thing that started annoying me is that the underwriters began confusing my Canadian funds with my American funds, and my Canadian accounts (chq/savings, etc) with my American accounts.  I understand that there is a Canada vs USA thing at this point, but why do they keep having to confuse my finances when I outline them clearly for them?  Everything I send over is scanned to PDF and everything is noted and summarized.</p><p><strong>It truly annoys me.</strong></p><p>But that&#8217;s the beginning of it all, I end up waiting over 4 weeks for my mortgage process.  And I am not someone that is easily impatient, but the process takes the full time I allotted to close on my house (procrastination anyone? or maybe just overworked and leave till last minute type?).  And then 2 days before close, I get a call from my mortgage rep.  &#8220;Bad news, you were approved for the mortgage, but the <a
href="http://en.wikipedia.org/wiki/Private_Mortgage_Insurance" target="_blank">PMI </a>company denied you based on your credit being under 700&#8243;.  At this point I should probably provide some background, I had only 15% down for my house, and you need 20% in order to NOT pay mortgage insurance (<a
href="http://en.wikipedia.org/wiki/Private_Mortgage_Insurance" target="_blank">PMI</a>). Plus when I began the mortgage process my credit rating was around 750.</p><p>So as you can imagine, this news of being denied PMI came as a shock to me (as I received this notice at 11:30PM 2 days before the scheduled close).</p><p>Turns out that because I have only worked in the USA for the past <strong>1 1/2 years</strong>, my credit history is vulnerable to being hit by something as innocent as 5 credit checks (yes, 5 is a lot, but I was hit 3 times by my OWN bank for some reason!?, the last 2 were all in order for my mortgage company doing their dudiligence). But that is besides the point, my denial was because my <strong>credit score dropped from 750&#8242;s to 694</strong>, which is terrible, because if you consider it, the sole reason for my credit checks was to get setup with a mortgage, so I could buy a house.  The PMI company did not take that into consideration.</p><p>So now, after a month of a mortgage process, my mortgage rep is scrambling to flip me to a government backed <a
href="http://en.wikipedia.org/wiki/FHA_loan" target="_blank">FHA mortgage</a> (because I cannot qualify at this point for mortgage insurance for a conventional loan).  I am upset at the system, because I have done all I could do to qualify for a good mortgage, only to be denied by the very system that I marched to the beat of.</p><p>The questions are all too clear, <strong>is it a mortgage crisis?</strong> Or a <strong>mortgage process </strong><strong>crisis</strong><strong>?</strong> Because if this is the reflection of what people have to deal with, I am not the least bit surprised with whats happening in the market, and that nobody wants to buy (or can afford) a new house.</p><p>I&#8217;m pretty sure the answer is a little bit of both, but more of the process than the mortgage.  Well to be more clear: The mortgage crysis is a result of the process crysis.</p><p>And its time for me to stop, as I&#8217;m starting to rant more about this, the good thing is, that I am (hopefully) going to be alright with closing on my home.  And in the end thats all I care about.</p> ]]></content:encoded> <wfw:commentRss>http://blog.biernacki.ca/2009/04/morgage-crisis-or-process-crisis/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Map Of The Linux File System</title><link>http://blog.biernacki.ca/2007/09/map-of-the-linux-file-system/</link> <comments>http://blog.biernacki.ca/2007/09/map-of-the-linux-file-system/#comments</comments> <pubDate>Mon, 24 Sep 2007 20:49:45 +0000</pubDate> <dc:creator>Jakub</dc:creator> <category><![CDATA[Linux]]></category> <guid
isPermaLink="false">http://blog.biernacki.ca/?p=26</guid> <description><![CDATA[One of the difficulties of switching from one OS to the other is trying to locate all the system files and keep track of where the new OS stores all its settings. The image above, is a complete Linux File System map that&#8217;s quite helpful for newbies like myself. I&#8217;m not sure what specific distribution [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://blog.biernacki.ca/wp-content/uploads/2007/09/linux_filemap.jpg" title="Linux filemap"><img
src="http://blog.biernacki.ca/wp-content/uploads/2007/09/linux_filemap.thumbnail.jpg" alt="Linux filemap" /></a></p><p>One of the difficulties of switching from one OS to the other is trying to locate all the system files and keep track of where the new OS stores all its settings.</p><p>The image above, is a complete Linux File System map that&#8217;s quite helpful for newbies like myself. I&#8217;m not sure what specific distribution this layout is from and, depending on the system you&#8217;re using, your actual structure may vary, with directories left out or additional ones present, but the basic outline should be the same.</p><p>From: <a
href="http://blog.wired.com/monkeybites/2007/09/newbie-help-map.html">http://blog.wired.com/monkeybites/2007/09/newbie-help-map.html</a></p> ]]></content:encoded> <wfw:commentRss>http://blog.biernacki.ca/2007/09/map-of-the-linux-file-system/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
