<?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>Plus Ultra</title>
	<atom:link href="http://atlina.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://atlina.com/blog</link>
	<description>Promoting Freedom through Technology, Music, and Movement</description>
	<lastBuildDate>Fri, 16 Sep 2011 16:08:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Python 3 sftp and unzip in Windows using pscp and 7zip</title>
		<link>http://atlina.com/blog/?p=46</link>
		<comments>http://atlina.com/blog/?p=46#comments</comments>
		<pubDate>Fri, 16 Sep 2011 16:02:03 +0000</pubDate>
		<dc:creator>Atlina</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://atlina.com/blog/?p=46</guid>
		<description><![CDATA[I have attached the example script. Explanation to follow!
SFTP_Python_Script
]]></description>
			<content:encoded><![CDATA[<p>I have attached the example script. Explanation to follow!</p>
<p><a href="http://atlina.com/blog/uploads/SFTP_Download_Script.zip">SFTP_Python_Script</a></p>
]]></content:encoded>
			<wfw:commentRss>http://atlina.com/blog/?feed=rss2&amp;p=46</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Script for checking if a Process is running, and/or Restarting Server</title>
		<link>http://atlina.com/blog/?p=40</link>
		<comments>http://atlina.com/blog/?p=40#comments</comments>
		<pubDate>Tue, 30 Mar 2010 00:46:24 +0000</pubDate>
		<dc:creator>Atlina</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://atlina.com/blog/?p=40</guid>
		<description><![CDATA[Hello all,
This is just a quick post with a script that I recently wrote to run a command on a Debian server if a process is no longer running. You can change the top variables to change the process, where the log is written, or the server action. Make sure to chmod 755 the script [...]]]></description>
			<content:encoded><![CDATA[<p>Hello all,</p>
<p>This is just a quick post with a script that I recently wrote to run a command on a Debian server if a process is no longer running. You can change the top variables to change the process, where the log is written, or the server action. Make sure to chmod 755 the script for it to work.</p>
<p>&#8212;&#8212;</p>
<pre>#! /usr/bin/env python
# This script checks if an application is running in ps -A, and writes to a log file at the designated path
# comment
import commands
import time
import os

# Get the time and format it for writing to the log
timenow = time.strftime("%a %m/%d/%y %H:%M:%S", time.localtime())

#HERE ARE THE VARIABLES THAT YOU MAY WANT TO CHANGE
processname = "squid"
isrunningstring = "\n" + timenow + ' - ' + processname + " is still running..."
notrunningstring = "\n" + timenow + ' - ' + processname + " is no longer running..."
pathtologfile = "/usr/local/squid/var/logs/cache.log"
notrunningcommand = "/sbin/shutdown -r now"

#run ps -A to get a list of all processes
output = commands.getoutput('ps -A')
#check if the process we are looking for was in the ps -A
if processname in output:
	print isrunningstring
	fileHandle = open ( pathtologfile, 'a' )
	fileHandle.write (isrunningstring)
	fileHandle.close()
#if it wasn't there, epic fail, restart
else:
	print notrunningstring
	fileHandle = open ( pathtologfile, 'a' )
	fileHandle.write (notrunningstring)
	fileHandle.close()
#restart the server!!!!
	os.system(notrunningcommand)</pre>
]]></content:encoded>
			<wfw:commentRss>http://atlina.com/blog/?feed=rss2&amp;p=40</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hot Chai Recipe</title>
		<link>http://atlina.com/blog/?p=36</link>
		<comments>http://atlina.com/blog/?p=36#comments</comments>
		<pubDate>Sun, 24 Jan 2010 21:59:54 +0000</pubDate>
		<dc:creator>Atlina</dc:creator>
				<category><![CDATA[Indian Inspired]]></category>
		<category><![CDATA[Recipes]]></category>

		<guid isPermaLink="false">http://atlina.com/blog/?p=36</guid>
		<description><![CDATA[I love Chai!
I don&#8217;t like the &#8216;bucks style Chai because I find it way too sweet and you can&#8217;t even taste the tea. My philosophy on flavor is: if you can&#8217;t taste it, why bother putting it in there. Below is my Chai recipe that I have been working on for a couple of weeks [...]]]></description>
			<content:encoded><![CDATA[<p>I love Chai!</p>
<p>I don&#8217;t like the &#8216;bucks style Chai because I find it way too sweet and you can&#8217;t even taste the tea. My philosophy on flavor is: if you can&#8217;t taste it, why bother putting it in there. Below is my Chai recipe that I have been working on for a couple of weeks now.</p>
<p>Ingredients:</p>
<ul>
<li>4 Cups Lowfat 1% Milk (Light Plain Soy will also work, rice milk isn&#8217;t really creamy enough) **edit** Silk Almond Milk is DIVINE with this recipe.</li>
<li>3 Cups water</li>
<li>3 Bags of Lipton Premium Black Pearl tea (unmixed and plain Ceylon, Darjeeling, or other black tea should work, do not use &#8220;breakfast&#8221; teas or pre-blended chai)</li>
<li>2 teaspoons fresh ginger *or 5-6 thin-cut slices* (do not use dry ginger unless absolutely necessary as it tastes different, substitute 1/8 tsp. dry)</li>
<li>3-4 whole cloves (add one or two more for more tongue-numbingness)</li>
<li>1 stick cinnamon (or 1/2 tsp ground cinnamon)</li>
<li>1/2 teaspoon Cardamom powder</li>
<li>2 teaspoons honey (add more to your taste)</li>
<li>Optional: 1/2 teaspoon Vanilla</li>
<li>Optional: 1/4 teaspoon Fenugreek (Meth seeds)</li>
</ul>
<p>Directions:</p>
<p>Boil water with 3 bags of tea, cloves, (optional fenugreek), and cinnamon for about 4 minutes. Add honey, (optional vanilla) cardamom, and ginger, and simmer for 2 minutes. Strain into another pot and add milk, simmer for 2-3 minutes, stirring constantly. Remove from heat and serve immediately. Serves 2 &#8220;Large&#8221; glasses or 4-5 &#8220;Small&#8221; glasses.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://atlina.com/blog/?feed=rss2&amp;p=36</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSWAN/IPSec to Netgear FVS318_V3</title>
		<link>http://atlina.com/blog/?p=23</link>
		<comments>http://atlina.com/blog/?p=23#comments</comments>
		<pubDate>Wed, 12 Aug 2009 06:08:34 +0000</pubDate>
		<dc:creator>Atlina</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://atlina.com/blog/?p=23</guid>
		<description><![CDATA[I tested this with a ClarkConnect Home/Office Ed 3.2 and 4.0; both worked.
Netgear configuration
I just used the VPN wizard, choosing gateway-gateway, then changed the settings.


ClarkConnect Configuration
Create a new ipsec config.
# nano /etc/ipsec.newsitename.conf
Create the new connection configuration in this format:



#Beginning of config
conn fvs318
type=tunnel
left= xx.xx.xx.xx         #WAN ip address of local CC router
leftsubnet=192.168.x.x/24     #ip address [...]]]></description>
			<content:encoded><![CDATA[<p>I tested this with a ClarkConnect Home/Office Ed 3.2 and 4.0; both worked.</p>
<p><strong>Netgear configuration</strong></p>
<p>I just used the VPN wizard, choosing gateway-gateway, then changed the settings.</p>
<p><img class="alignnone size-full wp-image-27" title="NetgearFVS318VPNPolicy" src="http://atlina.com/blog/wp-content/uploads/2009/08/NetgearFVS318VPNPolicy.png" alt="NetgearFVS318VPNPolicy" width="450" height="488" /></p>
<p><img class="alignnone size-full wp-image-28" title="IKEPolicy" src="http://atlina.com/blog/wp-content/uploads/2009/08/IKEPolicy.png" alt="IKEPolicy" width="450" height="387" /></p>
<p><strong>ClarkConnect Configuration</strong></p>
<p>Create a new ipsec config.</p>
<p># nano /etc/ipsec.newsitename.conf</p>
<p>Create the new connection configuration in this format:</p>
<table border="1">
<tbody>
<tr>
<td valign="top">#Beginning of config<br />
conn fvs318<br />
type=tunnel<br />
left= xx.xx.xx.xx         #WAN ip address of local CC router<br />
leftsubnet=192.168.x.x/24     #ip address of CC LAN subnet<br />
leftnexthop=xx.xx.xx.xx     #ip address of local CC&#8217;s internet gateway<br />
leftid=xx.xx.xx.xx.xx         #WAN IP<br />
right=xx.xx.xx.xx         #WAN ip address of remote netgear fvs318<br />
rightnexthop=xx.xx.x.x        #ip address of remote netgear&#8217;s internet gateway<br />
rigthsubnet=192.168.x.x/24     #ip address of netear LAN subnet<br />
rightid=xx.xx.xx.xx        #WAN IP</p>
<p>ike=3des-sha1-modp1024        #ike policy settings, could not get aes128 or aes256 to work<br />
ikelifetime=1440m        #ike lifetime<br />
keylife=480m            #key life<br />
pfs=no                #pfs is off, could not get pfs working<br />
keyexchange=ike            #tell it to use ike(not AH)<br />
authby=secret            #tells it to use a PSK for authentication<br />
auto=start            #start when ipsec(openswan) starts<br />
esp=aes256-sha1            #phase 2 encryption, no pfs defined. Netgear &#8220;VPN policy&#8221;<br />
#End of config</td>
</tr>
</tbody>
</table>
<p>Create the secrets file:<br />
nano /etc/ipsec.newsitename.secrets</p>
<p>Enter the remote WAN, then the local WAN, a colon “:” then ‘PSK “yourpskhere”&#8217;</p>
<p>Example:</p>
<table border="1">
<tbody>
<tr>
<td valign="top">60.11.11.11 61.11.12.13 : PSK &#8220;testtest&#8221;</td>
</tr>
</tbody>
</table>
<p><strong>Notes</strong></p>
<p>You can restart ipsec on ClarkConnect or Red Hat(Centos, Fedora, etc) using this command: /etc/init.d/ipsec restart</p>
]]></content:encoded>
			<wfw:commentRss>http://atlina.com/blog/?feed=rss2&amp;p=23</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Squid Reverse Proxy for OWA and RPC over HTTPS</title>
		<link>http://atlina.com/blog/?p=8</link>
		<comments>http://atlina.com/blog/?p=8#comments</comments>
		<pubDate>Wed, 12 Aug 2009 04:20:21 +0000</pubDate>
		<dc:creator>Atlina</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://atlina.com/blog/?p=8</guid>
		<description><![CDATA[This method was tested on Debian 5.0 Lenny in SBS 2003 and Server 2003 environments.
Why use Squid?

It is free in most ways (GPL) &#8211; M$ ISA is not free
Apache can&#8217;t do RPC Reverse Proxying (yet?)

The Basics
Install Lenny using the net install disc with internet access available, when it prompts for what type of installation, you [...]]]></description>
			<content:encoded><![CDATA[<p>This method was tested on Debian 5.0 Lenny in SBS 2003 and Server 2003 environments.</p>
<p>Why use Squid?</p>
<ul>
<li>It is free in most ways (GPL) &#8211; M$ ISA is not free</li>
<li>Apache can&#8217;t do RPC Reverse Proxying (yet?)</li>
</ul>
<p><strong>The Basics</strong></p>
<p>Install Lenny using the net install disc with internet access available, when it prompts for what type of installation, you only need the base package. You can add the &#8220;Desktop Environment&#8221;,  but I haven&#8217;t tested adding any other functions at base install. Installing the Desktop is not recommended as it will create overhead (if you let it start on boot).</p>
<p>Make sure that you set up the apt repositories to use the http and ftp resources before you try apt-get. (Uncomment the lines in &#8220;/etc/apt/sources.list&#8221;)</p>
<p>OWA and/or RPC should be tested and working before you try the proxy.</p>
<p>The certificate on the external interface of your Proxy machine needs to be signed by a recognized CA or RPC will not work properly (and you should do this anyway). The Certificates between the Exchange server and the Proxy do not need to be signed by a recognized CA (for it to work). I used an inexpensive cert from GoDaddy (~$30) for the working example.</p>
<p>This method uses TWO certificates.  RPC/Browser -&gt; SSL -&gt; proxy &#8211; SSL -&gt;  Exchange</p>
<p><strong>Update apt, install OpenSSL</strong></p>
<p><strong> </strong></p>
<p>As root, update the local apt database.</p>
<p>#apt-get update</p>
<p>Now, install OpenSSL and essential ssl development libraries.</p>
<p>#aptitude install build-essential openssl libssl-dev</p>
<p>You shouldn’t have to do this, but you can also make sure g++ is installed (this is a compiler).</p>
<p>#apt-get install g++</p>
<p><strong>Installing Squid</strong></p>
<p>Go to <a href="http://squid-cache.org/">http://squid-cache.org</a> and download the 3.0 Stable version in tar.gz format.</p>
<p>Move the file to a directory that you can remember the path to, in this document, I’m going to download to the /home/exampleuser/ directory because I have access to that directory without being root.</p>
<p>I will assume that you can download and move the file without instruction.</p>
<p><strong>NOTE</strong>: While Squid is in the apt repository, the apt installer will not enable SSL support; this is why we are compiling from source. Please note this also means you will not be able to update Squid using the apt repositories.</p>
<p>Once the file is downloaded, open a console and login as root, change directory to where we downloaded Squid and unpack the tar.</p>
<p># cd /home/exampleuser/</p>
<p># tar xvfz squid-3.0.STABLE16.tar.gz</p>
<p><strong>NOTE</strong>: “squid-3.0.STABLE16” is the name of the current Squid 3 stable release, yours may be a different number, so make sure to use the file name of your file, don’t assume it is still 16.</p>
<p>Now, lets get to the compiling, first we will change directories “cd”, then we will configure, compile, and install Squid.</p>
<p># cd /home/exampleuser/squid-3.0.STABLE16</p>
<p># ./configure –enable-ssl –with-openssl=/usr/include/openssl/</p>
<p># make</p>
<p># make install</p>
<p>After the Install, you will need to create the squid cache.</p>
<p># /usr/local/squid/sbin/squid –z</p>
<p><strong>Squid Configuration</strong></p>
<p>Replace the text in squid.conf with the below template. (Use whatever editor you want, nano is just easiest for newbies).</p>
<p># nano /usr/local/squid/etc/squid.conf</p>
<p>Squid.conf Template -  items in Green are specific to your environment and need to be assigned:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="559" valign="top">visible_hostname <span style="color: #00ff00;">owa.examplecompany.net</span></p>
<p>extension_methods   RPC_IN_DATA RPC_OUT_DATA</p>
<p>https_port   443 cert=<span style="color: #00ff00;">/path/to/external/cert</span></p>
<p>key=<span style="color: #00ff00;">/path/to/external/cert.key</span> defaultsite=<span style="color: #00ff00;">external.owa.domain.name</span></p>
<p>cache_peer <span style="color: #00ff00;"> ip.address.of.exchange</span> parent 443 0 no-query originserver login=PASS</p>
<p>ssl   sslflags=DONT_VERIFY_PEER sslcert=<span style="color: #00ff00;">/</span><span style="color: #00ff00;">path/to/exchange/cert.crt</span> sslkey=<span style="color: #00ff00;">/path/to/exchange/certkey.pem</span> name=owaServer</p>
<p>acl   OWA dstdomain <span style="color: #00ff00;">external.owa.domain.name</span></p>
<p>cache_peer_access   owaServer allow OWA</p>
<p>never_direct   allow OWA</p>
<p>http_access   allow OWA</p>
<p>http_access   deny all</p>
<p>miss_access   allow OWA</p>
<p>miss_access   deny all</td>
</tr>
</tbody>
</table>
<p><strong>Certificate Notes</strong></p>
<p>Getting the certificates organized and prepared is sometimes the most daunting part of the setup.</p>
<p>For the internet-facing certificate, you will need to get a certificate from a certificate authority. I used GoDaddy. If they ask you what type of server you want it for, choose &#8220;Apache&#8221;.Make sure the “Simple Name” is the same as the external web address to access the OWA server, in our case it is “owa.examplecompany.net”.</p>
<p>After you order it from GoDaddy and initiate the process per their directions, you will get to a point where it asks you to paste your certificate request.</p>
<p>Generate the request on the proxy server.</p>
<p># mkdir /usr/local/squid/certs/</p>
<p># cd /usr/local/squid/certs/</p>
<p># openssl genrsa –des3 –out owa.examplecompany.net.key 1024</p>
<p># openssl req –new –key owa.examplecompany.net.key –out owa.examplecompany.net.csr</p>
<p>Copy the contents of owa.examplecompany.net.csr to the request form.</p>
<p>Once you get the certificate files from the CA, you will most likely get a bundle or intermediate cert and the public cert.</p>
<p>You will need to add gd_bundle.crt to the owa.examplecompany.net.crt. First, backup the owa.examplecompany.crt file, then we will append it with gd_bundle.crt.</p>
<p># cp /usr/local/squid/certs/owa.examplecompany.net.crt /usr/local/squid/certs/certsexampleuser/owa.examplecompany.net.backup</p>
<p># cat /usr/local/squid/certs/gd_bundle.crt &gt;&gt; /usr/local/squid/certs/owa.examplecompany.net.crt</p>
<p>For the exchange server communication, you can use a self-signed certificate.</p>
<p>If you generate a self-signed certificate on your Exchange server, you can export it as a PFX and use openssl on your proxy to convert it into the usable format. First, move the PFX file to the proxy (this example assumes it is in &#8220;/usr/local/squid/certs/&#8221;.</p>
<p># cd /usr/local/squid/certs/</p>
<p># openssl pkcs12 –in exchangecert.pfx –nocerts –out exchange.key</p>
<p># openssl rsa –in exchange.key –out nopassexchange.key</p>
<p># openssl pkcs12 –in exchangecert.pfx –nokeys –out exchange.crt</p>
<p>Now you have the key and the crt;  move these to the path that you specify in the squid.conf file.</p>
<p><strong>Final Notes:</strong></p>
<p>You have to forward the 443 traffic from your router to the proxy for this to work, and you have to make sure that 443 traffic is being allowed to your proxy. This involves iptables, which I will not get into.</p>
<p>I tested in the live environment before changing the forwarding on my router by changing my local hosts file to forward owa.examplecompany.net to the local address of the proxy. This worked fine for OWA testing.</p>
<p>Also, you should either set the ip address on the proxy or create a reservation for its MAC on your DHCP server.</p>
<p><strong>References/Bibliography/Special Thanks:</strong></p>
<p><strong><span style="color: #800080;">The Squid Cache Project</span> &#8211; </strong><a href="http://www.squid-cache.org/">http://www.squid-cache.org</a></p>
<p><span style="color: #800080;"><strong>The Debian Project</strong></span> -<a href="http://www.debian.org/"> http://www.debian.org</a></p>
<p>Owen Campbell &#8211; <a href="http://www.tanti.org.uk/index.php/blogs/owencampbell/3-tech/3-proxy" target="_blank">http://www.tanti.org.uk/index.php/blogs/owencampbell/3-tech/3-proxy</a></p>
<p>Squid Cache Wiki &#8211; <a href="http://wiki.squid-cache.org/ConfigExamples/Reverse/OutlookWebAccess">http://wiki.squid-cache.org/ConfigExamples/Reverse/OutlookWebAccess</a></p>
<p>Laurent Brichet -<a href="http://www.brichet.be/how-to-setup-a-reverse-proxy-server-over-ssl-squid-debian/"> http://www.brichet.be/how-to-setup-a-reverse-proxy-server-over-ssl-squid-debian</a></p>
]]></content:encoded>
			<wfw:commentRss>http://atlina.com/blog/?feed=rss2&amp;p=8</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Why Blog?</title>
		<link>http://atlina.com/blog/?p=3</link>
		<comments>http://atlina.com/blog/?p=3#comments</comments>
		<pubDate>Wed, 12 Aug 2009 03:09:46 +0000</pubDate>
		<dc:creator>Atlina</dc:creator>
				<category><![CDATA[Blog/Maintenance Related]]></category>

		<guid isPermaLink="false">http://atlina.com/blog/?p=3</guid>
		<description><![CDATA[Hello World!   
I&#8217;m just using this blog as an outlet for sharing some of my interests.
I love computers, especially if they have Linux on them.
I also love to cook, write, and play guitar.
Hopefully, I will have some music recordings and new recipes up soon, for now I have a couple techie posts!
]]></description>
			<content:encoded><![CDATA[<p>Hello World!  <img src='http://atlina.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>I&#8217;m just using this blog as an outlet for sharing some of my interests.</p>
<p>I love computers, especially if they have Linux on them.</p>
<p>I also love to cook, write, and play guitar.</p>
<p>Hopefully, I will have some music recordings and new recipes up soon, for now I have a couple techie posts!</p>
]]></content:encoded>
			<wfw:commentRss>http://atlina.com/blog/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

