<?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; SysAdmin</title> <atom:link href="http://blog.biernacki.ca/category/sysadmin/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>Windows 7 Icons not showing up or broken issue</title><link>http://blog.biernacki.ca/2010/07/windows-7-icons-not-showing-up-or-broken-issue/</link> <comments>http://blog.biernacki.ca/2010/07/windows-7-icons-not-showing-up-or-broken-issue/#comments</comments> <pubDate>Sat, 24 Jul 2010 12:56:52 +0000</pubDate> <dc:creator>Jakub</dc:creator> <category><![CDATA[In the News]]></category> <category><![CDATA[SysAdmin]]></category> <guid
isPermaLink="false">http://blog.biernacki.ca/?p=298</guid> <description><![CDATA[I got a strange bug the other day, where my Windows 7 icons would disappear, simply reverting to blank icons, even tho right clicking on the icon &#62; properties, resulted in an image of the programs icon. So I did a quick search and found a valid solution&#8230; to delete your icon cache.  I was [...]]]></description> <content:encoded><![CDATA[<p><img
class="alignright size-full wp-image-300" title="broken-icons" src="http://blog.biernacki.ca/wp-content/uploads/2010/07/broken-icons.jpg" alt="" width="271" height="535" />I got a strange bug the other day, where my Windows 7 icons would disappear, simply reverting to blank icons, even tho right clicking on the icon &gt; properties, resulted in an image of the programs icon. So I did a quick search and found a valid solution&#8230; to delete your icon cache.  I was a little hesitant to just delete something, so did a little research and found that this was harmless.</p><p>Here are the steps to get your icons fixed:</p><ol><li>Press Ctrl-Shift-Escape to get the task manager.</li><li>In  the Processes tab, click on <strong>explorer.exe</strong> and click End Process.  You&#8217;ll  get a confirmation dialog.  Click &#8220;End Process&#8221; to confirm.</li><li>From the File menu (still in the task manager), choose New Task (Run&#8230;).</li><li>Copy/paste/enter the following command in the run box:<div><pre class="brush: plain; title: ; notranslate">cmd /c del %userprofile%\AppData\Local\IconCache.db /a</pre></pre></div></li><li>Open the Run box again with File --&gt; New Task (Run...).  This time, enter this command:<div><pre class="brush: plain; title: ; notranslate">explorer.exe</pre></pre></div></li><li>All should be okay now.  Open the Start Menu and confirm that your icons are fixed now.</li></ol><p>That should get you back into working condition (worked perfectly for me, or I wouldn't post it).  All icons show up now.</p><p><em>Reference:</em><br
/> <a
href="http://www.sevenforums.com/general-discussion/9973-icons-not-showing-up.html#post356016" target="_blank">http://www.sevenforums.com/general-discussion/9973-icons-not-showing-up.html#post356016</a></p> ]]></content:encoded> <wfw:commentRss>http://blog.biernacki.ca/2010/07/windows-7-icons-not-showing-up-or-broken-issue/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>Logging into a Windows Server as a Console user Remotely</title><link>http://blog.biernacki.ca/2007/10/logging-into-a-windows-server-as-a-console-user-remotely/</link> <comments>http://blog.biernacki.ca/2007/10/logging-into-a-windows-server-as-a-console-user-remotely/#comments</comments> <pubDate>Thu, 04 Oct 2007 19:17:47 +0000</pubDate> <dc:creator>Jakub</dc:creator> <category><![CDATA[SysAdmin]]></category> <category><![CDATA[Thoughts & Rants]]></category> <category><![CDATA[quick tips]]></category> <category><![CDATA[system administration]]></category> <guid
isPermaLink="false">http://blog.biernacki.ca/?p=28</guid> <description><![CDATA[Its funny, I spent so much time trying to find a solution for this and accidentally my friend Nick emailed me about it. I don&#8217;t know how I didn&#8217;t find this earlier. Anyways, the problem stemmed from being unable to connect remotely (RDC) to one of my server2k3 boxes. I needed to modify the software [...]]]></description> <content:encoded><![CDATA[<p>Its funny, I spent so much time trying to find a solution for this and accidentally my friend Nick emailed me about it. I don&#8217;t know how I didn&#8217;t find this earlier.</p><p>Anyways, the problem stemmed from being unable to connect remotely (RDC) to one of my server2k3 boxes. I needed to modify the software firewall settings, and due to security reasons (whether good or bad I don&#8217;t know) I couldn&#8217;t administer the firewall to make changes unless I was at the console.</p><p>The firewall I am running is Sygate Personal Firewall Pro 5.5 (now owned by Symantec.. ugh!). Its a very efficient software firewall, but the one drawback is being unable to use the gui when remotely logged in using RDC.</p><p>So to get around this I had to do the following:</p><pre>mstsc /v:servernameoraddress /f /console</pre><p>I did that from my machine (cmd prompt) and it forces the connection as a console connection (even tho it is remote). There you have it, you can now remote Sygate PF Pro 5.5 <img
src='http://blog.biernacki.ca/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>Hope this helps anyone out there looking for a solution to this problem, and pissed that Symantec canned everything Sygate had for documentation.</p> ]]></content:encoded> <wfw:commentRss>http://blog.biernacki.ca/2007/10/logging-into-a-windows-server-as-a-console-user-remotely/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
