<?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>Good/Bad/Tech &#187; Linux</title>
	<atom:link href="http://goodbadtech.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://goodbadtech.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Fri, 15 Jul 2011 18:33:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Private web browsing using SSH tunnel and SOCKS v5 proxy (Mac or Windows)</title>
		<link>http://goodbadtech.com/2010/01/05/private-web-browsing-using-ssh-tunnel-and-socks5-proxy/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://goodbadtech.com/2010/01/05/private-web-browsing-using-ssh-tunnel-and-socks5-proxy/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 14:43:54 +0000</pubDate>
		<dc:creator>goodbadtech</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Domain Names]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://goodbadtech.com/?p=195</guid>
		<description><![CDATA[It&#8217;s not that I&#8217;m doing anything I shouldn&#8217;t be doing, but sometimes I just feel more comfortable knowing my employer or the local coffee shop can&#8217;t see what web sites I&#8217;m going to on my laptop.  Also, I really love sending traffic through SSH tunnels. If you&#8217;re a user that has a desktop computer always [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not that I&#8217;m doing anything I shouldn&#8217;t be doing, but sometimes I just feel more comfortable knowing my employer or the local coffee shop can&#8217;t see what web sites I&#8217;m going to on my laptop.  Also, I really love sending traffic through SSH tunnels.</p>
<p>If you&#8217;re a user that has a desktop computer always on at home (Mac or Windows) and you carry a laptop around, this post can help set yourself up with some private web browsing.<span id="more-195"></span></p>
<p>I&#8217;m going to cover all the different Mac &amp; Windows options here, because I know not everyone uses the same set of computers.  I hope the post doesn&#8217;t get too cluttered&#8230;</p>
<h2 style="font-size: 24px;">Home Computer Setup</h2>
<hr />To get your home computer setup you&#8217;ll need a few things.</p>
<ol>
<li>A Dynamic DNS account configured using your high speed internet account.</li>
<li>An SSH server running (this is the tricky part)</li>
<li>A properly configured home firewall</li>
</ol>
<h3>1. Dynamic DNS</h3>
<p>There are <a href="http://www.google.com/search?q=Dynamic+DNS" target="_blank">lots</a> of Dynamic DNS services out there, but my favorite is <a href="http://www.dyndns.com/" target="_blank">DynDNS.com</a>.  I&#8217;ve had an account with them for over 10 years and I don&#8217;t think they&#8217;ve ever been offline.  I use their paid <a href="http://www.dyndns.com/services/dns/custom/" target="_blank">Custom DNS</a> service because it gives me a lot of flexibility and control.</p>
<p>I&#8217;m going to leave the setup process for Dynamic DNS on your home account out of this post.  Your firewall may already have integrated support and there are lots of other pages out there to set this up.  Here are a few:</p>
<ul>
<li><a href="http://www.dyndns.com/services/dns/dyndns/howto.html" target="_blank">http://www.dyndns.com/services/dns/dyndns/howto.html</a></li>
<li><a href="http://minitutorials.com/apache/dyndns11.shtml" target="_blank">http://minitutorials.com/apache/dyndns11.shtml</a></li>
<li><a href="http://geekswithblogs.net/saifkhan/archive/2008/12/29/setup-dyndns-dynamic-dns-on-a-linksys-wrt54g-router-again.aspx" target="_blank">http://geekswithblogs.net/saifkhan/archive/2008/12/29/setup-dyndns-dynamic-dns-on-a-linksys-wrt54g-router-again.aspx</a></li>
</ul>
<p>For reference, I set my custom DNS name to, home.mydomain.com.  This is the hostname I&#8217;ll use when configuring the remote SSH tunnel.</p>
<h3>2a. An SSH Server using Mac OS X</h3>
<p>With Mac OS X as your home computer, you&#8217;re in luck, this is easy to setup.  First, I recommend creating a user account used only for SSH connections.  Open System Preferences &#8211; Accounts, click the + icon to create a new account, and name it whatever you want, something cryptic maybe, I&#8217;ll call my new user, <span style="text-decoration: underline;">goodbadtechremote2009</span>, and I recommend picking a very strong password, 8+ characters, letters, numbers, symbols, etc.</p>
<p>Next, enable remote access by opening System Preferences -&gt; Sharing.  Then click the checkbox next to &#8220;Remote Login&#8221;.  In the &#8220;Allow Access&#8221; section, change the selection to &#8220;Only these users&#8221;, and add the user you just created.</p>
<p>Last, configure your Mac to use a <a href="http://answers.vt.edu/kb/entry/1867/" target="_blank">static IP address</a>.  This can be done under System Preferences -&gt; Network.  Make note of the address you use, I&#8217;ll refer to it later as SSHIP.  Take a look at this link for additional help: <a href="http://answers.vt.edu/kb/entry/1867/" target="_blank">http://answers.vt.edu/kb/entry/1867/</a></p>
<p>That&#8217;s it on the Mac side, you&#8217;re ready to go.</p>
<h3>2b. An SSH Server using Microsoft Windows</h3>
<p>Running Windows, it&#8217;s definitely more of a challenge to get an SSH server online.  I know some people have used <a href="http://www.cygwin.com/" target="_blank">Cygwin</a>, but I think using the free <a href="http://www.vmware.com/products/server/" target="_blank">VMWare Server</a> product is a better way to go. It makes the whole process much faster, is more reliable and VMWare is just cool.</p>
<ol>
<li>So, step one, download and install <a href="http://www.vmware.com/products/server/" target="_blank">VMWare Server</a>.  VMWare provides a lot of <a href="http://pubs.vmware.com/server1/admin/wwhelp/wwhimpl/common/html/wwhelp.htm?context=admin&amp;file=install_win_vmware_server.html" target="_blank">great documentation</a> regarding how to get the product downloaded and installs, but typically you just need to download and run the installer with all the default options.</li>
<li>Reference <a href="http://goodbadtech.com/2009/05/12/using-vmware-to-install-ruby-on-a-centos5-guest/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">my post regarding installing CentOS 5</a> as a VMWare guest.  Complete the steps in the section, CentOS 5.  Make sure you choose <strong>Bridged </strong>for the type of network connection. There are also many other places that detail installing Linux operating systems in VMWare, feel free to use a different resource if you have one you prefer.</li>
<li>Login to your new Linux operating system as root
<ol>
<li>Add a new user for SSH connections and set a very strong password, let&#8217;s call the user goodbadtechremote2009<br />
<code>/usr/sbin/adduser goodbadtechremote2009</code></li>
<li>I recommend you edit /etc/ssh/sshd_config to lock access down.  Here is a sample config that I like to use.
<pre class="brush: text">Port                            22
Protocol                        2
ListenAddress                   0.0.0.0
AllowUsers                      goodbadtechremote2009
SyslogFacility                  AUTH
LogLevel                        INFO
PermitRootLogin                 no
StrictModes                     yes
RSAAuthentication               yes
PubkeyAuthentication            yes
PasswordAuthentication          yes
PermitEmptyPasswords            no
KerberosAuthentication          no
X11Forwarding                   no
PrintMotd                       yes
PrintLastLog                    yes
KeepAlive                       yes
UseLogin                        no
UsePrivilegeSeparation          no
Subsystem                       sftp            /usr/libexec/openssh/sftp-server
Banner                          /etc/issue
UseDNS                          no</pre>
</li>
<li>I also like to edit the /etc/issue file to include a simple &#8220;keep away&#8221; statement.
<pre class="brush: text">                            NOTICE TO USERS

This computer system is the private property, whether individual,
corporate or government.  It is for authorized use only. Users
(authorized or unauthorized) have no explicit or implicit
expectation of privacy.

Any or all uses of this system and all files on this system may be
intercepted, monitored, recorded, copied, audited, inspected, and
disclosed to your employer, to authorized site, government, and law
enforcement personnel, as well as authorized officials of government
agencies, both domestic and foreign.

By using this system, the user consents to such interception, monitoring,
recording, copying, auditing, inspection, and disclosure at the
discretion of such personnel or officials.  Unauthorized or improper use
of this system may result in civil and criminal penalties and
administrative or disciplinary action, as appropriate. By continuing to
use this system you indicate your awareness of and consent to these terms
and conditions of use. LOG OFF IMMEDIATELY if you do not agree to the
conditions stated in this warning.</pre>
</li>
<li>Configure a static IP address
<ol>
<li>run /sbin/ifconfig and note your current IP address and Network.</li>
<li>In CentOS, edit /etc/sysconfig/network-scripts/ifcfg-eth0, so it looks something like the text below.  Make sure to replace the IP address and Gateway with a valid address in your network.  I&#8217;ll later referece the IP address you set here as SSHIP
<pre class="brush: text">TYPE=Ethernet
DEVICE=eth0
BOOTPROTO=
IPADDR=192.168.0.10
GATEWAY=192.168.0.1
NETMASK=255.255.255.0
USERCTL=yes
IPV6INIT=no
PEERDNS=yes
ONBOOT=yes</pre>
</li>
</ol>
</li>
<li>Restart the SSH server
<pre class="brush: text">/etc/init.d/sshd restart</pre>
</li>
<li>Restart your networking
<pre class="brush: text">/etc/init.d/network restart</pre>
</li>
<li>That&#8217;s it, your Linux setup in Windows should be ready to go.</li>
</ol>
</li>
</ol>
<h3>3. Your home firewall</h3>
<p><em>Disclaimer: Open remote access to an SSH server in your home network at your own risk.   I can&#8217;t cover all the details of this setup process here and there are several security concerns to consider.   Also, your internet provider may NOT allow home servers running over the Internet. </em></p>
<p>In order to access your own computer over the Internet, you&#8217;ll need to allow remote access through your home firewall/router (you are using a firewall on your high speed connection right?).</p>
<p>I use a <a href="&lt;a href=&quot;http://www.amazon.com/gp/product/B000FDOWQK?ie=UTF8&amp;tag=phot011-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000FDOWQK&quot;&gt;#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">LinkSys WRT300N</a> wireless router.  Most of the LinkSys, Belkin, NetGear, etc routers operate pretty much the same.  For me, I logged into the router, went into the Applications &amp; Gaming section and setup single port forwarding.</p>
<p>A little trick I use is to set the external port to 443 instead of 22 (which is the default for SSH connections) because some networks control outbound traffic and port 443 is more likely to be allowed outbound then port 22 is.  Also, if anyone were to glance at the actual traffic it would look like the HTTPS encrypted traffic they&#8217;d expect to see.</p>
<p>Make sure to set the internal port to 22, set the protocol to TCP, and enter the SSHIP address you recorded in earlier and save your settings.</p>
<p>You&#8217;re ready to setup your laptop to open the SSH tunnel.</p>
<h2 style="font-size: 24px;">Laptop Setup</h2>
<hr />On to your laptop configuration.  We&#8217;ll do Windows first this time.</p>
<h3>Windows SSH Tunnels</h3>
<ul>
<li>Download <a href="http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe">putty.exe</a> and save it to your hard drive.  I usually place the executable in my Program Files directory.</li>
<li>Run PuTTY</li>
<li>We need to create a saved session for easily opening an SSH connection with all the right settings in the future
<ul>
<li>Expand the Connection section and click Data and enter goodbadtechremote2009 in teh Auto-Login username field.</li>
<li>Expand Connection-&gt;SSH and click on Tunnels</li>
<li>In the Source Port field type 1080</li>
<li>Leave the Destination field empty</li>
<li>Change the Local radio button to Dynamic</li>
<li>Click on the Session category</li>
<li>Type in the hostname you configured when setting up Dynamic DNS, home.mydomain.com, in my example</li>
<li>Make sure the connection type is SSH</li>
<li>The default port will be 22, change this to 443 if you set your home firewall up the way I did in this example.</li>
<li>In the Saved Sessions text box, type in a name for the session.  I like to use the remote hostname I&#8217;m connecting to, home.mydomain.com.</li>
<li>Click Save</li>
</ul>
</li>
<li>Test the new PuTTY session by clicking open.  If all goes right you&#8217;ll get a terminal session window that opens and it will prompt you for a password.  On your first connection attempt you may be asked to verify that you are connecting to a valid host, you can type yes to authorize the connection.</li>
<li>Shortcut tip:  Create a shortcut on your desktop to the putty.exe application.  Edit the properties of the shortcut and add some information to the target line.  Mine looks like this:
<pre class="brush: text">"C:\Program Files\SSH Client\putty.exe" -load "home.mydomain.com"</pre>
</li>
</ul>
<h3>Windows Web Browser changes</h3>
<p>This is the last step, configuring the browser.  There are a number of different ways to set this up.  I&#8217;m going to keep it simple here.  I use Internet Explorer 8 for my primary web browsing, and I downloaded and installed Firefox to use when I want use my private browsing SSH tunnel.   So here is the process for this approach:</p>
<ul>
<li>Download and install Firefox if it&#8217;s not installed already. <a href="http://www.mozilla.com/en-US/firefox/personal.html" target="_blank">http://www.mozilla.com/en-US/firefox/personal.html</a></li>
<li>Open Firefox and click on Tools -&gt; Options</li>
<li>Click the Advanced Icon at the top of the Options Window</li>
<li>Click the Network Tab</li>
<li>Click the Settings button</li>
<li>Select &#8220;Manual Proxy Configuration&#8221;</li>
<li>Under SOCKS Host, type in, 127.0.0.1</li>
<li>Set the port for SOCKS Host to 1080</li>
<li>Select the SOCKS v5 radio button</li>
<li>Click OK</li>
<li>Click OK again to close the Options window</li>
</ul>
<p>If your SSH connection is still open, you should be able to visit web pages just like you normally would, go ahead and try to visit <a href="http://goodbadtech.com#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">GoodBadTech.com</a> and see if it works.</p>
<p>Now this is the real test, close your SSH tunnel by closing your PuTTY session window.  Try to go to http://goodbadtech.com again.  This time the connection should fail.  If it does, your private web browsing configuration is READY TO GO!</p>
<p>In the future, to use private browsing, open the PuTTY shortcut you configured on your desktop, then open Firefox and no body at your office or in the coffee shop or where ever will be able to detect or restrict what web sites your visiting.</p>
<h3>Mac OS SSH Tunnels</h3>
<p>This is a pretty quick process, here goes&#8230;</p>
<ol>
<li>Open your Applications folder -&gt; Utilities -&gt; Terminal</li>
<li>Type<br />
pico ~/.bash_profile</li>
<li>scroll down to the very bottom of the file</li>
<li>Add this line<br />
alias homessh=&#8221;/usr/bin/sshtunnel -D 1080 -f -C -q N  -p 443 goodbadtechremote2009@home.mydomain.com&#8221;</li>
<li>Type Ctrl+x to exit the Pico editor, type Y, to indicate you want to save the changes</li>
<li>Now at your command prompt type, <code>homessh</code>, this should connect to your home SSH server and prompt you for your password. Type in your password and your tunnel will be ready to go.  \</li>
</ol>
<h3>Mac OS Web Browser changes</h3>
<p>On my MacBook Pro, I find it works best to use the location functionality. <em>Note: This will only effect the Safari browser.  Firefox will ignore these location settings.</em></p>
<ol>
<li>I go into the Apple Menu, Select Location, then select &#8220;Network Preferences&#8221;</li>
<li>In the Location drop-down menu select &#8220;Edit Locations&#8230;&#8221;</li>
<li>Click the + icon at the bottom of the Locations menu that pops up and name your new location, &#8220;Home SSH Proxy&#8221;, click Done.</li>
<li>Back in the Network system preference, select the new &#8220;Home SSH Proxy&#8221; location<br />
<a href="http://goodbadtech.com/wp-content/uploads/2010/01/network_locations.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignnone size-medium wp-image-223" title="network_locations" src="http://goodbadtech.com/wp-content/uploads/2010/01/network_locations-300x262.png" alt="" width="300" height="262" /></a></li>
<li>Click on the Ethernet icon</li>
<li>Click on the Advanced button</li>
<li>Click on the proxies tab</li>
<li>Click the check box next to Web Proxy (HTTP)</li>
<li>In the Web Proxy Server enter, 127.0.0.1, into the first text field and enter, 1080, into the second field.</li>
<li>Now click the check box next to Secure Web Proxy (HTTPS)</li>
<li>In the Secure Web Proxy Server enter, 127.0.0.1, into the first text field and enter, 1080, into the second field.<br />
<a href="http://goodbadtech.com/wp-content/uploads/2010/01/network_proxies.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignnone size-medium wp-image-224" title="network_proxies" src="http://goodbadtech.com/wp-content/uploads/2010/01/network_proxies-300x234.png" alt="" width="300" height="234" /></a></li>
<li>Click OK</li>
<li>Repeat steps 6-12 for your AirPort connection</li>
</ol>
<p>That should be everything.  Just as in the Windows setup, if your SSH connection is still open and your location is set to Home SSH Tunnel, you should be able to visit web pages just like you normally would, go ahead and try to visit <a href="http://goodbadtech.com#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">GoodBadTech.com</a> and see if it works.</p>
<p>Now this is the real test, close your SSH tunnel by typing exit in your terminal window.  Try to go to http://goodbadtech.com again.  This time the connection should fail.  If it does, your private web browsing configuration is READY TO GO!</p>
<p>In the future, to use private browsing, open a terminal window and type homessh, enter your ssh password, then switch your location to &#8220;Home SSH Tunnel&#8221;.  Make sure to switch back to your normal network location when you&#8217;re done.</p>
<hr />Everything in this post may seem elaborate and confusing, and I admit, it kind of is.  But once everything is setup, it&#8217;s very easy to open a connection and start your private web browsing.  Going through this whole setup process will also help your general network understanding a lot, so it&#8217;s a good exercise for anyone looking to increase their networking skills.</p>
<p><span style="text-decoration: underline;">Additional Reading</span></p>
<ul>
<li><a href="http://sial.org/howto/openssh/publickey-auth/" target="_blank">Read the Public Key Setup section on Public Key Authentication</a></li>
</ul>
<p>As always, feel free to post any questions in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://goodbadtech.com/2010/01/05/private-web-browsing-using-ssh-tunnel-and-socks5-proxy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What is my computer doing? pids, IP addresses, tcp, netstat, and lsof</title>
		<link>http://goodbadtech.com/2009/06/22/what-is-my-computer-doing/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://goodbadtech.com/2009/06/22/what-is-my-computer-doing/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 15:00:58 +0000</pubDate>
		<dc:creator>goodbadtech</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[command line]]></category>

		<guid isPermaLink="false">http://goodbadtech.com/?p=152</guid>
		<description><![CDATA[Today I was reviewing the active TCP connections on my Mac Book Pro to before testing some software I was working on.  I was sitting in the office and wanting to monitor traffic to the server at my house.  Checking netstat, I saw a connection I didn&#8217;t expect to see and I had a hard [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was reviewing the active TCP connections on my Mac Book Pro to before testing some software I was working on.  I was sitting in the office and wanting to monitor traffic to the server at my house.  Checking netstat, I saw a connection I didn&#8217;t expect to see and I had a hard time clearly identifying what exactly it was.  As I was tracking it down, I figured the process might be of interest to others out there&#8230;<span id="more-152"></span></p>
<p><strong>So the question is: Who is my computer connected to and what&#8217;s it sending them?</strong></p>
<p>First I needed to know the IP address of my home internet connection.  The home web server is on a Comcast cable modem with DHCP that doesn&#8217;t change its IP address very often, but does every once in a while.  To get started I logged in to the home computer via my <a href="https://secure.logmein.com" target="_blank">LogMeIn</a> connection, opened up the web browser, and hit up <a href="http://www.whatsmyip.org" target="_blank">http://www.whatsmyip.org</a> to verify my IP address, looks like it&#8217;s 12.345.678.9 (no, that&#8217;s not actually my IP address, but I don&#8217;t want to post my real public IP for everyone to see)</p>
<p><em>Note: I actually use <a href="http://www.dyndns.com/" target="_blank">DynDNS</a> to keep track of my home IP address, the whatsmyip.org method is just a little faster if you don&#8217;t already have <a href="http://en.wikipedia.org/wiki/Dynamic_DNS" target="_blank">Dynamic DNS</a> running somewhere.</em></p>
<p>With my remote IP address in hand, I was ready to check out what connections were active.</p>
<p>Open up your Terminal application (Applications -&gt; Utilitys -&gt; Terminal.app) and run,</p>
<p><code>netstat -napt</code></p>
<p>Here is what returned:</p>
<p><code>[goodbadtech@tim:~]$ netstat -napt<br />
netstat: t: unknown or uninstrumented protocol</code></p>
<p>Oh right, that&#8217;s the Linux <a href="http://en.wikipedia.org/wiki/Netstat" target="_blank">netstat</a> syntax, it lists all active TCP connections, their process ID, and turns off DNS translations so just the IP address shows up</p>
<p>To get the same output in Mac OS I had to change the syntax a bit:</p>
<p><code>netstat -na -p tcp</code></p>
<p>The results this time where much better.  I needed to narrow the results down, 46 TCP connections where too many to scan through.</p>
<p><code>netstat -na -p tcp | grep 12.345.678.9</code></p>
<p>Running this command which only outputs connections that contain the IP address I specified, I expected to see an empty result, because I wasn&#8217;t aware of any active connections to my home network.  However, this is what I saw:</p>
<p><code>tcp4       0      0  10.1.1.110.50994       12.345.678.9.4242        ESTABLISHED</code></p>
<p>The destination port was a little suspicious to me, 4242.  I had no idea what the connection was.  I also noticed something else, no process ID was listed.  I forgot about that too.  I&#8217;m so used to the Linux version of netstat including PID information, I forget that Mac OS doesn&#8217;t include PID.</p>
<p>So how to I find the PID of a TCP connection on a Mac?  Here we turn to <a href="http://www.manpagez.com/man/8/lsof" target="_blank">lsof</a>.  Note, lsof requires root permission, so we&#8217;ll be running the commend with <a href="http://en.wikipedia.org/wiki/Sudo" target="_blank">sudo</a></p>
<p><code>sudo lsof -i -Pn</code></p>
<p>-i limits the results to files with Internet connections active<br />
-Pn turns off reverse port and IP address translation which just speeds the results up a bit</p>
<p>Now we&#8217;re getting somewhere, expect the list of files returned is still large, 145, and I don&#8217;t like to look through so many lines, so let&#8217;s get grep involved again to help filter the results</p>
<p><code>sudo lsof -i -Pn | grep 12.345.678.9</code></p>
<p>And the one line I was looking for was displayed</p>
<p><code>java       6756           root   70u  IPv4  0x8c3ce64      0t0    TCP 10.1.1.110:50994-&gt;12.345.678.9:4242 (ESTABLISHED)</code></p>
<p>Okay, process ID 6756, good, that&#8217;s the info I was looking for.  However, I saw the process name was java.  Great, that could be anything.  Why in the world was a java process started by root connected to my home computer network?  We go back to lsof to find the answer.  (That sentence makes me think I&#8217;ve been watching too much History channel lately)</p>
<p><code>sudo lsof -p 6756</code></p>
<p>-p the lower case p limits results to open files in use by process ID 6756.</p>
<p>With a 122 lines returned I saw there was plenty of activity, fortunately, I quickly saw exactly what was going on.</p>
<p><code>java    6756 root   51u     REG       14,2        44   5116740 /Library/Caches/CrashPlan/cpft366842740763787782x</code></p>
<p>There were many lines output similar to this one, so I don&#8217;t need to include the whole output here, the point is, the line segment /Library/Caches/CrashPlan, tells me that CrashPlan had created the connection.  Okay, I&#8217;m cool with that.  I hope you found this useful.  Send me a message on Twitter <a href="http://twitter.com/goodbadtech" target="_blank">@goodbadtech</a> if you have any questions.  Back to my original software testing&#8230;</p>
<p><em>Notes:</em></p>
<p><em>A quick editorial on <a href="http://www.crashplan.com" target="_blank">CrashPlan</a>, its very slick backup software, especially for those of you that have multiple computers in different locations.  The basic concept is, you backup for your office and your office backs up to your house.  Make sure you at least check out the link.</em></p>
<p><em>netstat and lsof are great utilities to get familiar with.  If your computer is running slow or you want to check connections on your web server, they should come to mind right away.  One of my favorites on a Linux web server will list all established connections to your web server (assuming you&#8217;re running Apache)</em></p>
<p><code><em>netstat -atp | grep httpd | grep ESTABLISHED</em></code></p>
<p><em>This will count all the established connections to your web server and output the value</em></p>
<p><code><em>netstat -atp | grep httpd | grep ESTABLISHED | wc -l</em></code></p>
<p><em>Here is a great post of netstat commands to try out if you&#8217;re looking for some additional reading.</em></p>
<p><em><a href="http://www.mydigitallife.info/2007/12/13/how-to-find-and-check-number-of-connections-to-a-server/" target="_blank">http://www.mydigitallife.info/2007/12/13/how-to-find-and-check-number-of-connections-to-a-server</a><br />
</em></p>
<p><em><br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://goodbadtech.com/2009/06/22/what-is-my-computer-doing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iFolder 3.7.2 on openSUSE 10.3 in VMWare ESX (step 3)</title>
		<link>http://goodbadtech.com/2009/06/19/ifolder_opensuse_vmware_3/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://goodbadtech.com/2009/06/19/ifolder_opensuse_vmware_3/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 15:53:06 +0000</pubDate>
		<dc:creator>goodbadtech</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[iFolder]]></category>
		<category><![CDATA[OpenSUSE]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://goodbadtech.com/?p=137</guid>
		<description><![CDATA[Today I had to install a new iFolder server in a VMWare ESX environment. It was a  little more difficult than I expected it to be.  Everything from the mono .Net layer, to openLDAP, to iFolder over SSL had it&#8217;s own little challenges.  Hopefully this step by step will help a few of you out [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had to install a new <a title="iFolder" href="http://ifolder.com/ifolder" target="_blank">iFolder</a> server in a VMWare ESX environment. It was a  little more difficult than I expected it to be.  Everything from the <a href="http://ftp.novell.com/pub/mono/archive/1.2.6/download/suse-103-i586/" target="_blank">mono</a> .Net layer, to openLDAP, to iFolder over SSL had it&#8217;s own little challenges.  Hopefully this step by step will help a few of you out getting this very slick personal backup and file sharing solution installed and running.</p>
<ul>
<li><a href="/2009/06/16/ifolder_opensuse_vmware_1#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Step 1 &#8211; Virtual Machine Setup<br />
</a></li>
<li><a href="/2009/06/18/ifolder_opensuse_vmware_2#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Step 2 &#8211; Finalize the LDAP server</a></li>
<li>Step 3 &#8211; Finalize the iFolder Web server (you are here)<span id="more-137"></span></li>
</ul>
<h2>Step 3 &#8211; Finalize the iFolder Web Server</h2>
<p>As you’ll recall in (if you don’t recall, don’t miss out on) <a href="../2009/06/16/ifolder_opensuse_vmware_1#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">step 1</a>, we created a very basic OpenSUSE 10.3 installation and converted it to a template before the installation process completed.  Then in <a href="/2009/06/18/ifolder_opensuse_vmware_2#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">step 2</a> we created the LDAP server. Here we&#8217;ll get the web server up and running with iFolder installed.</p>
<p>In the VMWare Infrastructure Client, right-clicking on my OPENSUSE10.3 template, I select “Deploy Virtual Machine from this template…”   The settings you enter in the Deploy Template Wizard will be very specific to your environment so I won’t cover them in detail here.</p>
<p>I made two changes after the deployment process completed.  First, I disconnected the CD / DVD ISO because I won’t be needing it anymore.  Second, I added a second virtual disk to be used as my iFolder data store.  I went with a 250GB virtual disk which should hold all my files, at least for a while anyway.</p>
<p>Power on the virtual machine (mine is named IFOLDERWEB01) and open up the console.</p>
<h3><strong>Finish Setup</strong></h3>
<p>OpenSUSE will detect that you have not completed the installation process and load up the YaST First run utility.</p>
<ol>
<li>Set your root password, as always, set a good one.</li>
<li>Hostname and Domain name: This can anything you want, just remember what the settings are.  I always uncheck “Change hostname via DHCP”</li>
<li>Network configuration: You’ll need to set a static IP address, valid DNS servers, and a valid default gateway.</li>
<li>Test Internet Connection: I always skip this</li>
<li>Authentication Method: LDAP
<ol>
<li>LDAP Client Configuration wizard</li>
<li>Address of LDAP server: Enter the address assigned to your LDAP server from step 2</li>
<li>You can use &#8220;Fetch DN&#8221; to get the correct base DN</li>
<li>Uncheck LDAP TLS/SSL</li>
<li>Open Advanced Configuration
<ol>
<li>View Administration Settings</li>
<li>Enter the full Administrator DN as recorded in step 2</li>
<li>Accept</li>
</ol>
</li>
<li>Select Next</li>
<li>Install any missing packages requested by YaST</li>
</ol>
</li>
<li>Release Notes: select Next</li>
<li>Finish</li>
</ol>
<p>At this point you should have a very basic OpenSUSE server up and running and connected to the Internet.  From here, we’ll install the Web server and iFolder services.  You should be back at the login prompt, so login as root, type “yast” (no quotes) and press enter.</p>
<h3><strong>Install required packages</strong></h3>
<p>In the YaST2 Control Center select Software -&gt; Sofware Management.  Your system may update it’s cache at this point.  After a few moments you should see a list of installed software.  You&#8217;ll want to install the following packages and let YaST handle the dependencies:</p>
<ul>
<li>apache2-worker</li>
<li>openssl</li>
<li>wget</li>
<li>log4net</li>
</ul>
<p>After those packages are installed, I recomment creating a temp directory somewhere to download the required iFolder RPM files.  I ran the following&#8230;</p>
<pre class="vb">cd ~
mkdir rpmtmp
cd rpmtmp
mkdir ifolder
mkdir mono
cd mono
wget http://ftp.novell.com/pub/mono/download/x86/mono/1.2.6-4/mono-core-1.2.6-4.novell.i586.rpm
wget http://ftp.novell.com/pub/mono/download/x86/mono/1.2.6-4/mono-data-1.2.6-4.novell.i586.rpm
wget http://ftp.novell.com/pub/mono/download/x86/mono/1.2.6-4/mono-data-sqlite-1.2.6-4.novell.i586.rpm
wget http://ftp.novell.com/pub/mono/download/x86/mono/1.2.6-4/mono-web-1.2.6-4.novell.i586.rpm
wget http://ftp.novell.com/pub/mono/download/x86/mono/1.2.6-4/mono-nunit-1.2.6-4.novell.i586.rpm
wget http://ftp.novell.com/pub/mono/download/x86/mono/1.2.6-4/mono-winforms-1.2.6-4.novell.i586.rpm
wget http://ftp.novell.com/pub/mono/download/noarch/xsp/1.2.6-2/xsp-1.2.6-2.novell.noarch.rpm
wget http://ftp.novell.com/pub/mono/download/suse-103-i586/mod_mono/1.2.6-1/apache2-mod_mono-1.2.6-1.suse103.novell.i586.rpm
rpm -Uvh *.rpm
cd ../ifolder/
wget http://superb-west.dl.sourceforge.net/sourceforge/ifolder3/ifolder3-enterprise-3.7.2.9089.1-0.2.i586.rpm
wget http://superb-east.dl.sourceforge.net/sourceforge/ifolder3/ifolder-enterprise-plugins-3.7.2.9089.1-2.i586.rpm
rpm -Uvh *.rpm</pre>
<p>There, iFolder is installed.  It&#8217;s not too bad once you get the right list of mono packages.  Next we need to configure the iFolder server and link it to our LDAP server. As the ifolder RPM indicates, &#8220;Run /usr/bin/simias-server-setup to configure the server&#8221;.  But wait, before we do that, that new virtual disk I created in VMWare needs to be formatted so it&#8217;s ready to go.</p>
<p><strong>YaST -&gt; System -&gt; Partitioner</strong></p>
<ol>
<li>Create a new Disk</li>
<li>Select the disk you created, in my case, /dev/sdb</li>
<li>Primary Partition</li>
<li>Leave the format defaults as they are.  Note, iFolder requires an Ext3 or Reiser filesystem</li>
<li>Leave the size with it&#8217;s defaults</li>
<li>Set the Mount Point to, /data</li>
<li>Select, OK</li>
<li>Back in the main partitioner window, select Apply</li>
<li>Confirm the changes by selecting Apply again.  Note: I&#8217;ve found selecting Finish often ends up requiring a reboot for some reason, so I shy away from it now.</li>
<li>Also note, don&#8217;t screw this part up or you&#8217;ll be starting over by deploying your VM from template again.</li>
<li>When the formatting is complete, select Quit to exit the Partitioner wizard</li>
</ol>
<p><strong>Now, back to the iFolder setup process, here is what I did:</strong></p>
<pre class="vb">/usr/bin/simias-server-setup
Server Data Path: /data/simias
Server Name: ifolderweb01
SSL: NONSSL
Public URL: http://myip/simias10
Private URL: http://myip/simias10
System Name: ifolder
System Description: iFolder Enterprise System
Use Key Recovery Agent? Y
Recovery Agent Certificate Path? /var/simias/data
Use LDAP? Y
LDAP Server? your ldap server IP
LDAP Secure? N
LDAP Admin DN? This is the full Administrator DN as recorded in step 2
LDAP Admin Password? Your password
System Admin? cn=admin,dc=yourdomain,dc=com (this is a little tricky, just use the same full Administrator DN you used, except swap, admin, in place of, administrator
System Admin Password? whatever you want
LDAP Proxy DN? cn=SimiasProxy,dc=yourdomain,dc=com
LDAP Proxy Password? whatever you want
LDAP Search Context? cn=iFolderUsers,ou=group,dc=mynightowl,dc=com
Naming Attribute? mail
Configure Apache? Y
Ldap Groups Plugin? Y</pre>
<p>Whew, you have no idea how many times I ran the setup process to get that to work.  The problem is all the default values are for non LDAP installations, and while I&#8217;ve very familiar with Windows and Active Directory, I don&#8217;t spend a lot of time looking at what all the specific Distinguished Names are in an LDAP directory.</p>
<p><strong>Web Server Configuration</strong></p>
<ul>
<li>/usr/bin/ifolder-web-setup
<ul>
<li>Web Alias? /ifolder</li>
<li>Require SSL? N</li>
<li>Require Server SSL? N</li>
<li>iFolder URL? http://youripaddress:80/</li>
<li>Redirect URL? leave blank</li>
</ul>
</li>
<li>/usr/bin/ifolder-admin-setup
<ul>
<li>Web Alias? /admin</li>
<li>Require SSL? N</li>
<li>Require Server SSL? N</li>
<li>iFolder URL?  http://youripaddress:80/</li>
<li>Redirect URL? leave blank</li>
</ul>
</li>
<li>/sbin/chkconfig apache2 on</li>
<li>/etc/init.d/apache2 start</li>
</ul>
<p>That is it.  You&#8217;re up and running.  Visit the addresses below in your web browser and start clicking around.  Keep in kind, I disabled ALL encryption for this installation.  In my particular case, all traffic will be contained to a trusted local area network.  If you&#8217;re doing anything over the Internet you&#8217;ll of course want to enable encryption.</p>
<p>I plan to follow up here with a special Step on enabling public encryption.  But up next in this series are the Windows and Mac OS desktop clients for iFolder.  This is where things get really useful.  Check back soon, follow me on Twitter <a href="http://twitter.com/goodbadtech" target="_blank">@goodbadtech</a>, or subscribe to <a href="http://feedburner.google.com/fb/a/mailverify?uri=good/bad/tech">Feedburner email notifications</a> to stay informed of new posts.</p>
<p>User Access:  http://youripaddress/ifolder<br />
Admin Access: http://youripaddress/admin</p>
<p><strong>Authentication</strong></p>
<p>The admin user you created has a username of, cn=admin,dc=yourdomain,dc=com, I know that&#8217;s a little unusual, but it&#8217;s just the default admin.  All other users you add to your LDAP directory will login using their email address.  I suggest logging in as cn=admin,dc=yourdomain,dc=com, then setting that first LDAP user you created as an iFolder admin, then you can use that for administering the system instead of the admin user with the complete distinguished name.</p>
<ul>
<li><a href="/2009/06/16/ifolder_opensuse_vmware_1#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Step 1 &#8211; Virtual Machine Setup<br />
</a></li>
<li><a href="/2009/06/18/ifolder_opensuse_vmware_2#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Step 2 &#8211; Finalize the LDAP server</a></li>
<li>Step 3 &#8211; Finalize the iFolder Web server (you are here)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://goodbadtech.com/2009/06/19/ifolder_opensuse_vmware_3/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>iFolder 3.7.2 on openSUSE 10.3 in VMWare ESX (step 2)</title>
		<link>http://goodbadtech.com/2009/06/18/ifolder_opensuse_vmware_2/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://goodbadtech.com/2009/06/18/ifolder_opensuse_vmware_2/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 15:27:57 +0000</pubDate>
		<dc:creator>goodbadtech</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[iFolder]]></category>
		<category><![CDATA[OpenSUSE]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://goodbadtech.com/?p=91</guid>
		<description><![CDATA[Today I had to install a new iFolder server in a VMWare ESX environment. It was a  little more difficult than I expected it to be.  Everything from the mono .Net layer, to openLDAP, to iFolder over SSL had it&#8217;s own little challenges.  Hopefully this step by step will help a few of you out [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had to install a new <a title="iFolder" href="http://ifolder.com/ifolder" target="_blank">iFolder</a> server in a VMWare ESX environment. It was a  little more difficult than I expected it to be.  Everything from the <a href="http://ftp.novell.com/pub/mono/archive/1.2.6/download/suse-103-i586/" target="_blank">mono</a> .Net layer, to openLDAP, to iFolder over SSL had it&#8217;s own little challenges.  Hopefully this step by step will help a few of you out getting this very slick personal backup and file sharing solution installed and running.</p>
<ul>
<li><a href="/2009/06/16/ifolder_opensuse_vmware_1#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Step 1 &#8211; Virtual Machine Setup<br />
</a></li>
<li>Step 2 &#8211; Finalize the LDAP server (you are here)</li>
<li><a href="/2009/06/19/ifolder_opensuse_vmware_3ifolder_opensuse_vmware_3#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Step 3 &#8211; Finalize the iFolder Web server</a><span id="more-91"></span></li>
</ul>
<h2>Step 2 &#8211; Finalize the LDAP Server</h2>
<p>As you&#8217;ll recall in (if you don&#8217;t recall, don&#8217;t miss out on) <a href="/2009/06/16/ifolder_opensuse_vmware_1#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">step 1</a>, we created a very basic OpenSUSE 10.3 installation and converted it to a template before the installation process completed.  I&#8217;m going to move on from there with the LDAP server first.</p>
<p>In the VMWare Infrastructure Client I brought up the view of all the templates in my environment.  Right-clicking on my OPENSUSE10.3 template, I select &#8220;Deploy Virtual Machine from this template&#8230;&#8221;   The settings you enter in the Deploy Template Wizard will be very specific to your environment so I won&#8217;t cover them in detail here.  The only change I made after the deployment process completed was to disconnect the CD / DVD ISO because I won&#8217;t be needing it anymore.</p>
<p>Power on the virtual machine (mine is named IFOLDERLDAP01) and open up the console.</p>
<h3><strong>Finish Setup</strong></h3>
<p>OpenSUSE will detect that you have not completed the installation process and load up the YaST First run utility.</p>
<ol>
<li>Set your root password, as always, set a good one.</li>
<li>Hostname and Domain name: This can anything you want, just remember what the settings are.  I always uncheck &#8220;Change hostname via DHCP&#8221;</li>
<li>Network configuration: You&#8217;ll need to set a static IP address, valid DNS servers, and a valid default gateway.</li>
<li>Test Internet Connection: I always skip this</li>
<li>Authentication Method: Even though we&#8217;ll be installing openldap, it&#8217;s not installed yet, so set the Authentication Method to local</li>
<li>New Local User: Enter in a default first user</li>
<li>Release Notes: select Next</li>
<li>Finish</li>
</ol>
<p>At this point you should have a very basic OpenSUSE server up and running and connected to the Internet.  From here, we&#8217;ll install the LDAP server.  You should be back at the login prompt, so login as root, type &#8220;yast&#8221; (no quotes) and press enter.</p>
<h3><strong>Install required packages</strong></h3>
<p>In the YaST2 Control Center select Software -&gt; Sofware Management.  Your system may update it&#8217;s cache at this point.  After a few moments you should see a list of installed software.  Open the search field and type &#8220;ldap&#8221;.  A list of results will show up, scroll down to <strong>openldap2</strong> and press Shitf+=, this will place a + sign next to the package to it&#8217;s marked for installation.  Continue scrolling down to &#8220;yast2-ldap-server&#8221; and press Shift+=  Select Accept.  YaST will auto resolve a few dependencies.  You can accept the changes it suggests.    When the packages are finished being installed, you can exit out of Yast.</p>
<p><a href="http://goodbadtech.com/wp-content/uploads/2009/06/3.jpg#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignnone size-medium wp-image-94" title="3" src="http://goodbadtech.com/wp-content/uploads/2009/06/3-300x222.jpg" alt="3" width="300" height="222" /></a></p>
<p>Now is a good time to update any basic system settings you normally would, I always update the sshd_config to it&#8217;s locked down much better than the default settings.  Also, if you&#8217;re running the SuSE Firewall, make sure you have TCP ports 22 and 389 open for SSH and basic LDAP connections.</p>
<h3><strong>Configure LDAP Server</strong></h3>
<p>Open up yast again and navigate to Network Services -&gt; LDAP Server</p>
<p><a href="http://goodbadtech.com/wp-content/uploads/2009/06/4.jpg#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="size-medium wp-image-122 alignnone" title="4" src="http://goodbadtech.com/wp-content/uploads/2009/06/4-300x188.jpg" alt="4" width="300" height="188" /></a></p>
<p>Select &#8220;Yes&#8221; and go into the configuration, then highlight Databases and select &#8220;Add Database&#8230;&#8221;</p>
<p><a href="http://goodbadtech.com/wp-content/uploads/2009/06/5.jpg#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignnone size-medium wp-image-123" title="5" src="http://goodbadtech.com/wp-content/uploads/2009/06/5-300x188.jpg" alt="5" width="300" height="188" /></a></p>
<p>On the Add Database screen, you&#8217;ll need to enter your <a href="http://msdn.microsoft.com/en-us/library/aa366101(VS.85).aspx" target="_blank">Base DN</a>, as well as the LDAP root password.  You can leave the Root DN with it&#8217;s default value if you like. After you&#8217;ve added the Database select Finish to close the LDAP Server Configuration window.</p>
<p><a href="http://goodbadtech.com/wp-content/uploads/2009/06/61.jpg#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignnone size-medium wp-image-125" title="61" src="http://goodbadtech.com/wp-content/uploads/2009/06/61-300x188.jpg" alt="61" width="300" height="188" /></a></p>
<p>Back at the YaST main Control Center screen, I suggest going into Network Servers -&gt; LDAP Browser to verify your LDAP server is running.</p>
<p><strong>Access Credentials</strong></p>
<ul>
<li>LDAP server: 127.0.0.1</li>
<li>Administrator DN: cn=Administrator,dc=yourdomain,dc=com (use the domain name you entered)</li>
<li>Password: the password you entered</li>
</ul>
<p>Note: Make note of the Administrator DN, you&#8217;ll need it again in later steps.  Also, if given an TLS/SSL error, it&#8217;s okay to retry the connection without encryption enabled.</p>
<p>Exit out of YaST.</p>
<p>There are a few useful steps you can review over on <a href="http://en.opensuse.org/Howto_LDAP_server" target="_blank">OpenSUSE.org</a> as well.  I do recommend checking the link out, but I&#8217;ll show you a different way, using YaST, to add users.</p>
<p><strong>LDAP Client Configuration</strong></p>
<p>In the YaST control center, go to Network Services -&gt; LDAP Client.  In the User Authentication box select &#8220;Use LDAP&#8221;.  In the LDAP Client box change the LDAP Base DN to the domain you&#8217;re using, uncheck LDAP TLS/SSL, and then open up &#8220;Advanced Configuration&#8230;&#8221;</p>
<p>Change from the &#8220;Client Configuration&#8221; window you start in to &#8220;Administration Settings&#8221;.  In the Administrator DN field, enter in the same Administrator DN you recorded up in the Access Credentials section above.   Accept the Changes and then select Finish back on the LDAP Client Configuration window.</p>
<p>Here, YaST may notify you that a few missing packages need to be installed, go ahead and continue so they can be installed.</p>
<p><strong>Add a User</strong></p>
<p>First, you need to configure some basic user/group options for LDAP users.  In YaST, navigate to Security and Users -&gt; User Management, then select LDAP Options -&gt; LDAP User and Group Configuration. You&#8217;ll need to authenticate before you can proceed.  Notice the Administrator name is pre-populated with the Administrator DN you entered in the LDAP Client Configuration advanced settings.</p>
<p>A warning appears up that &#8220;No entry with DN&#8221;&#8230; exists, Create it Now? You should select Yes.  Select New, leave the susegroupconfiguration Object selected, enter &#8220;groupconfiguration&#8221;, and select OK</p>
<p><a href="http://goodbadtech.com/wp-content/uploads/2009/06/8.jpg#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignnone size-medium wp-image-128" title="8" src="http://goodbadtech.com/wp-content/uploads/2009/06/8-300x199.jpg" alt="8" width="300" height="199" /></a></p>
<p>Leave all the default settings for the groupconfiguration.  Select New again, notice only the suseuserconfiguration object is availabe.  Enter, &#8220;userconfiguration&#8221;, and select OK.  Now, we&#8217;ll edit two values in the userconfiguration module.  Set suseminuniqueid to 10000, and set susenextuniqueid to 10000.  Select Accept when you&#8217;re finished with the changes.</p>
<p>Set the User Filter to LDAP Users.</p>
<p><a href="http://goodbadtech.com/wp-content/uploads/2009/06/7.jpg#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignnone size-medium wp-image-127" title="7" src="http://goodbadtech.com/wp-content/uploads/2009/06/7-300x198.jpg" alt="7" width="300" height="198" /></a></p>
<p>Two warnings will appear that No entry with DN&#8230;. exists, select Yes for each one and continue.</p>
<p>Select Add, and enter the user information, First Name, Last Name, Username, Password, Confirm Password.  Before selecting Accept, change to the Plug-Ins screen.</p>
<p><a href="http://goodbadtech.com/wp-content/uploads/2009/06/9.jpg#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignnone size-medium wp-image-129" title="9" src="http://goodbadtech.com/wp-content/uploads/2009/06/9-300x198.jpg" alt="9" width="300" height="198" /></a></p>
<p>Highlight the &#8220;Edit Remaining LDAP Attributes&#8221; and select Launch, scroll down to the mail Setting, and enter the user&#8217;s email address.  Accept the changes, and select Accept again to create the user.</p>
<p>Let&#8217;s create a Group too.  The process is pretty much the same as users.  Change over to the groups screen, set the filter to LDAP groups, and Add a new group.  I&#8217;ll call mine, &#8220;iFolderUsers&#8221;, and add the user I just created to the group.</p>
<p>You can add more users and groups here if you like, but at this point, I think I&#8217;m done with the LDAP server.  Time to move on to Step 3.</p>
<ul>
<li><a href="/2009/06/16/ifolder_opensuse_vmware_1#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Step 1 &#8211; Virtual Machine Setup<br />
</a></li>
<li>Step 2 &#8211; Finalize the LDAP server (you are here)</li>
<li><a href="/2009/06/19/ifolder_opensuse_vmware_3ifolder_opensuse_vmware_3#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Step 3 &#8211; Finalize the iFolder Web server</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://goodbadtech.com/2009/06/18/ifolder_opensuse_vmware_2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iFolder 3.7.2 on openSUSE 10.3 in VMWare ESX (step 1)</title>
		<link>http://goodbadtech.com/2009/06/16/ifolder_opensuse_vmware_1/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://goodbadtech.com/2009/06/16/ifolder_opensuse_vmware_1/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 20:47:42 +0000</pubDate>
		<dc:creator>goodbadtech</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[iFolder]]></category>
		<category><![CDATA[OpenSUSE]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://goodbadtech.com/?p=81</guid>
		<description><![CDATA[Today I had to install a new iFolder server in a VMWare ESX environment. It was a  little more difficult than I expected it to be.  Everything from the mono .Net layer, to openLDAP, to iFolder over SSL had it's own little challenges.]]></description>
			<content:encoded><![CDATA[<p>Today I had to install a new <a title="iFolder" href="http://ifolder.com/ifolder" target="_blank">iFolder</a> server in a VMWare ESX environment. It was a  little more difficult than I expected it to be.  Everything from the <a href="http://ftp.novell.com/pub/mono/archive/1.2.6/download/suse-103-i586/" target="_blank">mono</a> .Net layer, to openLDAP, to iFolder over SSL had it&#8217;s own little challenges.  Hopefully this step by step will help a few of you out getting this very slick personal backup and file sharing solution installed and running.</p>
<ul>
<li>Step 1 (you are here)</li>
<li><a href="/2009/06/18/ifolder_opensuse_vmware_2#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Step 2 &#8211; Finalize the LDAP server</a></li>
<li><a href="/2009/06/19/ifolder_opensuse_vmware_3ifolder_opensuse_vmware_3#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Step 3 &#8211; Finalize the iFolder Web server</a><span id="more-81"></span></li>
</ul>
<h2>Step 1 &#8211; The Virtual Machine setup</h2>
<p>Since I&#8217;m using a separate LDAP server from the iFolder web server, I decided to start with an OpenSUSE 10.3 virtual template that I could then use to customize each server.  Also, this would give me a good fall back point if I decided to start over the build process for either one of them.   Its a pretty basic virtual machine setup.  I started with a 4GB disk, 1024 MB of memory, 2 CPUs, 1 NIC, etc.  I set my guest operating system to &#8220;Other Linux 32-bit&#8221;.</p>
<p>I set the full ISO for <a title="openSUSE-10.3-GM-GNOME-i386.iso" href="http://download.opensuse.org/distribution/10.3/iso/cd/" target="_blank"><span style="color: blue;">openSUSE-10.3-GM-GNOME-i386.iso</span></a> to be my Datastore ISO file so I could boot the VM and get the install started.  You could probably get away with the net-install ISO, but this was an ISO I already had a copy of in my datastore. (Note: make sure you set the status of your virtual CD/DVD Drive to both Connected and Connected at power on)</p>
<p><img class="alignnone size-full wp-image-83" title="11" src="http://goodbadtech.com/wp-content/uploads/2009/06/11.jpg" alt="11" width="360" height="269" /></p>
<p>Starting up the VM, I was greated with the OpenSUSE welcome screen.  Even though I have the full ISO downloaded, I like to do network based installs because the CD always seems to be missing a package or two that I&#8217;d like to install.  Also, since I&#8217;m doing very minimal installs, the download time required is pretty small.  So hit F4 to change your source and enter in the details of your <a href="http://mirrors.opensuse.org/list/all.html" target="_blank">preferred mirror</a> and get the install going&#8230;</p>
<p><strong><span style="text-decoration: underline;">Installation Steps</span></strong></p>
<ol>
<li>Select your language</li>
<li>Accept the license agreement</li>
<li>Select New Installation (this will download lots of files the the online mirror you selected on the Welcome screen.  The downloads took about 3 minutes on my network)</li>
<li>Timezone: set your timezone and clock settings</li>
<li>Desktop Selection: I use &#8220;Other &#8211; Text Mode&#8221;</li>
<li>Installation Settings:
<ol>
<li>Partitioning: for me, no changes</li>
<li>Software: Since I&#8217;m only doing a base installation right now, no changes here</li>
<li>Locale Settings: again, no changes</li>
<li>Click Accept, and then confirm on the popup window that appears</li>
</ol>
</li>
<li>Now you get to watch the installation process.  The 210 MB download and install took about 20 minutes for me.  After the install finishes, the system will automatically reboot.  If you want to create a virtual machine template, this is a great spot to do it, power off the virtual machine when it starts the boot up process.</li>
<li>Back in your VMWare Infrastructure Client, right-click on your guest, &#8220;OPENSUSE10.3&#8243; in my case, and select &#8220;Convert to template&#8230;&#8221;</li>
<li>That&#8217;s all for Step 1, in Step 2 we&#8217;ll tackle the rest of the install for the LDAP server and Web server.</li>
</ol>
<ul>
<li>Step 1 (you are here)</li>
<li><a href="/2009/06/18/ifolder_opensuse_vmware_2#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Step 2 &#8211; Finalize the LDAP server</a></li>
<li><a href="/2009/06/19/ifolder_opensuse_vmware_3ifolder_opensuse_vmware_3#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Step 3 &#8211; Finalize the iFolder Web server</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://goodbadtech.com/2009/06/16/ifolder_opensuse_vmware_1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using VMWare to install Ruby on a CentOS5 guest</title>
		<link>http://goodbadtech.com/2009/05/12/using-vmware-to-install-ruby-on-a-centos5-guest/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://goodbadtech.com/2009/05/12/using-vmware-to-install-ruby-on-a-centos5-guest/#comments</comments>
		<pubDate>Tue, 12 May 2009 14:25:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://goodbadtech.com/?p=13</guid>
		<description><![CDATA[Recently I installed CentOS 5 as a guest host on my VMWare server to run a RoR development environment.  This the process I went through.  Much thanks to a post on the Rubyonrails.com wiki that got me going in the right direction. CentOS 5 Download the NetInstall ISO of CentOS 5.2 I created my guest [...]]]></description>
			<content:encoded><![CDATA[<div class="snap_preview">
<p>Recently I installed CentOS 5 as a guest host on my VMWare server to run a RoR development environment.  This the process I went through.  Much thanks to a <a rel="#someid0" href="http://wiki.rubyonrails.org/rails/pages/RailsOnCentos5_mongrel" target="_blank">post on the Rubyonrails.com wiki</a> that got me going in the right direction.</p>
<p align="center"><img class="size-full wp-image-24" title="Ruby On Rails" src="http://goodbadtech.com/wp-content/uploads/2009/05/ror.jpg" alt="ror" width="103" height="122" /> <img class="size-full wp-image-23" title="CentOS" src="http://goodbadtech.com/wp-content/uploads/2009/05/centos_logo_45.png" alt="centos_logo_45" width="208" height="45" /> <img class="size-full wp-image-22" title="VMWare" src="http://goodbadtech.com/wp-content/uploads/2009/05/logo_vmware.jpg" alt="logo_vmware" width="190" height="130" /></p>
<h2><span id="more-13"></span>CentOS 5</h2>
<ol>
<li>Download the NetInstall ISO of <a rel="#someid1" href="http://isoredirect.centos.org/centos/5/isos/i386/" target="_blank">CentOS 5.2</a></li>
<li>I created my guest host using most of the basic Linux settings, 256 MB RAM and an 8GB hard drive (the great thing about VMWare is those values are so easy to change later</li>
<li>I set the VMWare configuration to boot off of the CentOS netinstall ISO and started it up
<ol>
<li>I am installing the text version of CentOS only</li>
<li>Select English language and US keyboard</li>
<li>Installation source -&gt; HTTP</li>
<li>Enable IPv4 w/ DHCP was selected by default, I left that setting in place</li>
<li>HTTP Setup
<ol>
<li>Website Name: mirror.centos.org</li>
<li>CentOS Directory: centos-5/5.2/os/i386</li>
</ol>
</li>
<li>Initialize the hard drive</li>
<li>I selected “Remove all partitions on selected drives and create default layout” because I’m not that concerned with the specific directory structure and I can always add another virtual hard disk if I need more space.</li>
<li>I got a memory warning that there isn’t a lot of memory on my machine, and a swap file is required right away.  I selected, “Yes”</li>
<li>Use GRUB as the book loader</li>
<li>I didn’t add any additional GRUB options or a GRUB password</li>
<li>I left only my CentOS install as the only OS to attempt to boot</li>
<li>Boot Loader goes in the MBR</li>
<li>Configure the eth0 network interface = yes</li>
<li>I turned off IPv6</li>
<li>DHCP IP address</li>
<li>Set my timezone</li>
<li>Set the root password</li>
<li>Software selection -&gt; I selected “Customize Software Selection”
<ol>
<li>Remove everything but Base</li>
<li>Done</li>
</ol>
</li>
<li>Thanks to Comcast, my 540 MB netinstall took less than 10 minutes.</li>
<li>Before you reboot your VM, edit the CD-ROM settings so it’s not connected and is set NOT to connect at power on.</li>
<li>Reboot</li>
<li>After the reboot completes, you will be prompted with some additional configuration options.  These are really up to you. I edited:
<ol>
<li>The firewall settings, leaving it enabled, but opening ports 22, 80, 443, and 1900 (for RoR)</li>
<li>Network settings to use a static IP address</li>
<li>Some of the system services and turned off stuff I don’t need</li>
</ol>
</li>
<li>Login to localhost</li>
<li>type, yum update, to get your system fully up to date</li>
<li>There are a number of additional configuration steps to finish the CentOS install, but what exactly you do from here will be up to you.  I recommend at least creating a user so you can login as someone other than root, and update your SSH settings so that root cannot login.</li>
<li>Next, I change from the VMWare console to an SSH client (keep in mind, that without completing your OS install properly you really are running the server at a greater risk level)…</li>
</ol>
</li>
</ol>
<h2>Ruby on Rails</h2>
<ol>
<li>at the command prompt in your ssh client run, yum -y install ruby ruby-rdoc ruby-devel mysql-devel gcc</li>
<li>next run (check http://rubyforge.org/projects/rubygems/ for latest version), wget http:<code>//rubyforge.rubyuser.de/rubygems/rubygems-1.3.1.tgz</code></li>
<li>tar xzf rubygems-1.3.1.tgz</li>
<li>cd rubygems-1.3.1</li>
<li>ruby setup.rb</li>
<li>gem update –system</li>
<li>gem install mysql –no-rdoc –no-ri — –with-mysql-config=/usr/bin/mysql_config</li>
<li>gem install mongrel_cluster –no-rdoc –no-ri</li>
<li>/usr/sbin/adduser -r mongrel</li>
<li>mkdir /etc/mongrel_cluster</li>
<li>cp /usr/lib/ruby/gems/1.8/gems/mongrel_cluster-1.0.5/resources/mongrel_cluster /etc/init.d/</li>
<li>sudo chmod +x /etc/init.d/mongrel_cluster</li>
<li>/etc/init.d/mongrel_cluster start &amp;&amp; /sbin/chkconfig mongrel_cluster on</li>
<li>mkdir /var/www</li>
<li>mkdir /var/www/apps</li>
</ol>
<p>That should get you far enough to install your first Ruby on Rails app.  I’m sure I’ll follow up this post with more details about that part of the process.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://goodbadtech.com/2009/05/12/using-vmware-to-install-ruby-on-a-centos5-guest/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

