<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1511633591133967588</id><updated>2024-11-05T19:01:16.790-08:00</updated><category term="vmware"/><category term="network"/><category term="linux"/><category term="windows"/><category term="ccna"/><category term="powercli"/><category term="error"/><category term="powershell"/><category term="rdp"/><category term="ssh"/><category term="ubuntu"/><category term="wifi"/><title type='text'>My IT area</title><subtitle type='html'>IT helpful thingies</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1511633591133967588.post-2256711194251911588</id><published>2012-08-07T15:20:00.000-07:00</published><updated>2012-08-09T15:54:19.361-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="network"/><category scheme="http://www.blogger.com/atom/ns#" term="powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="wifi"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>BSSID in Windows XP using Powershell</title><content type='html'>&lt;i&gt;Note: If you don&#39;t know what BSSID is, you mostly need to know that it&#39;s the MAC address of the Access Point you&#39;re connected to.&lt;/i&gt;
&lt;br /&gt;
&lt;br /&gt;
Have you ever tried to get the BSSID in Windows XP? It&#39;s kind of difficult to do it, specially when all the Google results end up showing things with &lt;b&gt;netsh wlan&lt;/b&gt; command. &lt;b&gt;netsh wlan&lt;/b&gt; is part of a newer version than the one in Windows XP. It comes in Windows Vista and above. However that&#39;s the fastest way to find out which BSSID you&#39;re using. 

&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
&lt;p&gt;Here&#39;s a workaround I created with Powershell:
&lt;br&gt;
&lt;!-- Stylesheet link --&gt;
&lt;link href=&quot;http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&gt;

&lt;!-- Code --&gt;
&lt;div class=&quot;dp-highlighter&quot; id=&quot;hlDiv&quot;&gt;&lt;div class=&quot;bar&quot;&gt;&lt;/div&gt;&lt;ol start=&quot;1&quot; class=&quot;dp-rb&quot;&gt;&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span class=&quot;variable&quot;&gt;$wmi&lt;/span&gt;&lt;span&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;builtin&quot;&gt;Get-WmiObject&lt;/span&gt;&lt;span&gt;&amp;nbsp;-class&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;MSNdis_80211_BaseServiceSetIdentifier&quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;-namespace&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;root\WMI&quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;-comp&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;variable&quot;&gt;$env&lt;/span&gt;&lt;span class=&quot;symbol&quot;&gt;:computername&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;&quot;&gt;&lt;span&gt;&lt;span class=&quot;variable&quot;&gt;$mac&lt;/span&gt;&lt;span&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;variable&quot;&gt;$wmi&lt;/span&gt;&lt;span&gt;[0].Ndis80211MacAddress&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span class=&quot;variable&quot;&gt;$BSSID&lt;/span&gt;&lt;span&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;&quot;&gt;&lt;span&gt;&lt;span class=&quot;keyword&quot;&gt;foreach&lt;/span&gt;&lt;span&gt;&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;variable&quot;&gt;$num&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;in&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;variable&quot;&gt;$mac&lt;/span&gt;&lt;span&gt;)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;variable&quot;&gt;$digit&lt;/span&gt;&lt;span&gt;&amp;nbsp;=&amp;nbsp;[convert]::ToString(&lt;/span&gt;&lt;span class=&quot;variable&quot;&gt;$num&lt;/span&gt;&lt;span&gt;,&amp;nbsp;16)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt;&lt;span&gt;&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;variable&quot;&gt;$digit&lt;/span&gt;&lt;span&gt;.length&amp;nbsp;-eq&amp;nbsp;1)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;variable&quot;&gt;$digit&lt;/span&gt;&lt;span&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;0&quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;+&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;variable&quot;&gt;$digit&lt;/span&gt;&lt;span&gt;.ToString()&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;variable&quot;&gt;$BSSID&lt;/span&gt;&lt;span&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;variable&quot;&gt;$BSSID&lt;/span&gt;&lt;span&gt;&amp;nbsp;+&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;variable&quot;&gt;$digit&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;&quot;&gt;&lt;span&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span class=&quot;builtin&quot;&gt;Write-Host&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;&amp;nbsp;BSSID:&amp;nbsp;$BSSID&amp;nbsp;&quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;-BackgroundColor&amp;nbsp;Black&amp;nbsp;-ForegroundColor&amp;nbsp;Yellow&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;

&lt;p&gt;Enjoy!</content><link rel='replies' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/2256711194251911588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myitarea.blogspot.com/2012/08/bssid-in-windows-xp-using-powershell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/2256711194251911588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/2256711194251911588'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/2012/08/bssid-in-windows-xp-using-powershell.html' title='BSSID in Windows XP using Powershell'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1511633591133967588.post-8591431044116961134</id><published>2012-04-04T12:45:00.000-07:00</published><updated>2012-04-04T12:49:17.977-07:00</updated><title type='text'>Error: Unable to obtain hardware information for the selected machine.</title><content type='html'>Here&#39;s an odd problem I&#39;ve found in VMware vSphere 4.1 while trying to export a VM. When wizard for export was called, it runs a hardware inspection, and I couldn&#39;t get thru it because it was showing that error:
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;Error: Unable to obtain hardware information for the selected machine.&lt;/div&gt;
&lt;br /&gt;
Like any respectable sysadmin, I googled the solution, but I could only find vConverter stand-alone issues regarding VMs registered as Windows 2008 R2 and software not being able to handle that, so a change to Vista 64 was needed. However, this was not the case.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Digging in the VM settings, I was able to find problem. It was in the NIC configuration. Somehow something changed it and left the distributed switch assigned, but not the port. I looked like this:
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYg4CQDhnfC8-ykb_MEgtgBjQBOOn17yvsQ-riDzPdf-k9a5K4JblV49G6J1Fc6VK2vVezsN-auKEglYQE38VSVhhMKnvAP20I-sgdKLfvNi3RXE2NS9xzUrJXwetZozBOUWwTXrrHMBQ/s1600/1333568505-clip-2kb%255B1%255D.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;118&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYg4CQDhnfC8-ykb_MEgtgBjQBOOn17yvsQ-riDzPdf-k9a5K4JblV49G6J1Fc6VK2vVezsN-auKEglYQE38VSVhhMKnvAP20I-sgdKLfvNi3RXE2NS9xzUrJXwetZozBOUWwTXrrHMBQ/s320/1333568505-clip-2kb%255B1%255D.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
I&#39;m still looking for the reason how it would happen, but it could be that specific port got deleted, or maybe vSphere is just messing with me. Anyway, keep your eyes open for this!</content><link rel='replies' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/8591431044116961134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myitarea.blogspot.com/2012/04/error-unable-to-obtain-hardware.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/8591431044116961134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/8591431044116961134'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/2012/04/error-unable-to-obtain-hardware.html' title='Error: Unable to obtain hardware information for the selected machine.'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYg4CQDhnfC8-ykb_MEgtgBjQBOOn17yvsQ-riDzPdf-k9a5K4JblV49G6J1Fc6VK2vVezsN-auKEglYQE38VSVhhMKnvAP20I-sgdKLfvNi3RXE2NS9xzUrJXwetZozBOUWwTXrrHMBQ/s72-c/1333568505-clip-2kb%255B1%255D.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1511633591133967588.post-5680325878378084832</id><published>2011-10-04T12:09:00.000-07:00</published><updated>2011-10-04T14:26:33.684-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="vmware"/><title type='text'>Installing VMware tools in Linux</title><content type='html'>So installing VMWare tools in Windows it&#39;s pretty easy with a wizard, but on Linux, if you&#39;re a first-timer, you&#39;ll have some issues. Here are the steps (they&#39;re pretty simple).&lt;br /&gt;
&lt;br /&gt;
Select Install VMware tools in Console.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;110&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD2jq7Sm7OsAic6a5ODvwL1NtvhBrm75VWxCtHkQzW5w8QtPdalgO0lbajIzUns4OpcvbAcaVYOm45HIRt064yoTtZ2TUV2xNlNl4smfAIK0Yky7Ar00Uraoon003_ePvq4veThT5TFq0/s1600/vmtools.png&quot; width=&quot;524&quot; /&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
And now run the following commands&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;mkdir /mnt/cdrom&lt;br /&gt;
mount /dev/cdrom /mnt/cdrom&lt;br /&gt;
cp /mnt/cdrom/VMwareTools-*.tar.gz /tmp/&lt;br /&gt;
cd /tmp/&lt;br /&gt;
tar xvfz VMwareTools-*.tar.gz&lt;br /&gt;
cd vmware-tools-distrib/&lt;br /&gt;
sudo ./vmware-install.pl&lt;/div&gt;&lt;br /&gt;
From here on, just follow the wizard and you&#39;re all set. Basically, these commands do the following: create folder where to mount the CD, mount the actual CD, copy the zipped file with the installer to the temp folder, unzip the file, and run the installer. &lt;br /&gt;
&lt;br /&gt;
Let me know if you have any doubts!</content><link rel='replies' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/5680325878378084832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myitarea.blogspot.com/2011/10/installing-vmware-tools-in-linux.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/5680325878378084832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/5680325878378084832'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/2011/10/installing-vmware-tools-in-linux.html' title='Installing VMware tools in Linux'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD2jq7Sm7OsAic6a5ODvwL1NtvhBrm75VWxCtHkQzW5w8QtPdalgO0lbajIzUns4OpcvbAcaVYOm45HIRt064yoTtZ2TUV2xNlNl4smfAIK0Yky7Ar00Uraoon003_ePvq4veThT5TFq0/s72-c/vmtools.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1511633591133967588.post-2518823510201368327</id><published>2011-09-29T08:21:00.000-07:00</published><updated>2011-09-30T06:30:07.631-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="ssh"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Avoiding your proxy at work</title><content type='html'>I bet you wanted to do this since you got hired and saw that there are filters for certain webpages. So here&#39;s the thing, you can create a tunnel between your worstation and a host at home using SSH via SSL port.&lt;br /&gt;
&lt;br /&gt;
Here&#39;s a classic scenario:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCLi2fDlQeFUkv_rCXMkX6RLtYtg1OoKJtpBNmBv6Ovi0exYwUbf9h3msOfdxBU7K7L_ekuctLIvpCnDz-UqxbotEHRL9qUcbq4_qyh5JkqBM20JYB_RF4xcsyIdzSCo4OfdnvXop_8Kc/s1600/WorkConnection.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;100&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCLi2fDlQeFUkv_rCXMkX6RLtYtg1OoKJtpBNmBv6Ovi0exYwUbf9h3msOfdxBU7K7L_ekuctLIvpCnDz-UqxbotEHRL9qUcbq4_qyh5JkqBM20JYB_RF4xcsyIdzSCo4OfdnvXop_8Kc/s320/WorkConnection.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Basically here you have your workstation, and in order to get to the internet, you need to go through an ISA server working as a proxy server filtering your content. Here&#39;s where your facebook, youtube, IRC, and so on, gets filtered. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;We are going to create a tunnel between your workstation and your home computer, and redirect all your internet traffic from your workstation to your home connection, so you don&#39;t have any content filtering involved. For this, here&#39;s the list of components that are part of this solution:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Workstation running Windows (XP/7)&lt;/li&gt;
&lt;li&gt;PuTTY&lt;/li&gt;
&lt;li&gt;Cntlm&lt;/li&gt;
&lt;li&gt;Home computer running OpenSSH (Windows/Linux)&lt;/li&gt;
&lt;li&gt;Router at home with port forwarding capabilities.&lt;/li&gt;
&lt;li&gt;Patience&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;So let&#39;s get started at home.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
As I said, you need a host running OpenSSH. If you&#39;re using Linux, you have the simplest path to install it, and probably, you already have it. If you&#39;re using Windows, you have two options that may suit you:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Try to install OpenSSH in Windows&lt;/li&gt;
&lt;li&gt;Install a Virtual Machine running linux&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
I consider the second option to be the easiest one. Not only because SSH is way simpler to configure, manage and install in Linux, but also because it&#39;s always nice to have a Linux at home to mess around.&lt;br /&gt;
&lt;br /&gt;
If you&#39;re thinking about the first one, you can use this guide that, even though is aimed for Windows server 2003, it works for Windows XP: &lt;a href=&quot;http://www.cs.bham.ac.uk/~smp/projects/ssh-windows/&quot; target=&quot;_blank&quot;&gt;Installing OpenSSH for Windows 2003 Server - How to get it working&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
At the end of the day, what we need is a box listening in port 22 and ready for connections.&lt;br /&gt;
&lt;br /&gt;
Once we have our SSH host, we are going to need our home router to forward our connections from outside to our SSH host. Since ISA server only lets encrypted traffic go through port 443 (SSL), we need to forward port 443 for incoming traffic from internet to port 22 in our SSH host.&lt;br /&gt;
&lt;br /&gt;
There&#39;s too many ways to do this according to which router you have. Basically, every port forward is going to ask you the following info:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Destination IP:&lt;/b&gt; &lt;i&gt;Your SSH Host ip.&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;Source Port:&lt;/b&gt; 443&lt;br /&gt;
&lt;b&gt;Destination Port:&lt;/b&gt; 22&lt;br /&gt;
&lt;br /&gt;
If you want the exact steps for your router, you can use this awesome page: &lt;a href=&quot;http://portforward.com/&quot; target=&quot;_blank&quot;&gt;http://portforward.com/&lt;/a&gt;. Here you&#39;ll find guides for a LOT of routers.&lt;br /&gt;
&lt;br /&gt;
So now you have your home computer waiting for connections. What you will need now is to find out your Public IP so you&#39;ll know where to connect to from your workstation. Just Google &quot;What&#39;s my ip&quot; and you&#39;ll find a zillion results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Now let&#39;s take care of our workstation.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In our workstation we&#39;re going to use two pieces of software: PuTTY and Cntlm. PuTTY is the software that actually builds the tunnel, but there&#39;s a problem: ISA server uses NTLM for authentication which PuTTY doesn&#39;t support. That&#39;s where Cntlm comes as a solution. Cntlm is proxy we install in our own work computers to solve the authentication problem.&lt;br /&gt;
&lt;br /&gt;
First of all, let&#39;s download it from here:&lt;br /&gt;
&lt;a href=&quot;http://cntlm.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;http://cntlm.sourceforge.net/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Once you install it, you&#39;ll see that there&#39;s not much to be done but to edit the &lt;b&gt;cntlm.ini&lt;/b&gt;. Here, you will need to change a few lines:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;Username&amp;nbsp;&amp;nbsp;&amp;nbsp;Your Username at work (e.g. name.lastname)&lt;br /&gt;
Domain&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Domain your workstation is using (e.g. contoso.com)&lt;br /&gt;
Password&amp;nbsp;&amp;nbsp;&amp;nbsp;Password for that same user (e.g. P@ssw0rd)&lt;br /&gt;
Proxy&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Work ISA proxy server (e.g. proxy.contoso.com:8080)&lt;br /&gt;
Listen&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5555&lt;/div&gt;&lt;br /&gt;
Leave the rest for the ini file unedited. Save it, and close it. Now, just run the &lt;b&gt;cntlm.exe&lt;/b&gt;. Don&#39;t worry, you won&#39;t see anything because it runs in the background. You can see it in the Process list in the Task Manager. Now you have CNTLM listening in port 5555 and it will deal with your proxy authentication.&lt;br /&gt;
&lt;br /&gt;
Now let&#39;s deal with our final part of this guide, building the tunnel with PuTTY. First of all, install &lt;a href=&quot;http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html&quot; target=&quot;_blank&quot;&gt;PuTTY&lt;/a&gt; if you don&#39;t have it (duh) and open it.&lt;br /&gt;
&lt;br /&gt;
You start in the Session category. Write down your Public IP in &quot;Host Name&quot; text box and 443 in &quot;Port&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://clip2net.com/clip/m34324/1317309080-clip-5kb.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
Now go to Connection &amp;gt; Proxy. Here you only need to select Proxy Type: HTTP, and then write down the following:&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://clip2net.com/clip/m34324/1317309164-clip-4kb.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
Leave the rest as it is. Now move on to SSH &amp;gt; Tunnels. Here you have to write 1080 in &quot;Source Port&quot;, select Dynamic and click Add. You will have something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://clip2net.com/clip/m34324/1317309268-clip-9kb.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
Now, let&#39;s go back to Session category at the top of the list. In Saved sessions, write something descriptive for this tunnel like &quot;Home&quot; or &quot;SSH tunnel&quot;, whatever you want. Then click Save. This way, next you only have to double click the session and it will connect automatically to it.&lt;br /&gt;
&lt;br /&gt;
And that&#39;s it! You will have a new window showing the following:&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://clip2net.com/clip/m34324/1317309450-clip-876b.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
That means that you&#39;re able to connect to your home SSH host and your tunnel is ready for use. Now you will need to configure your browser proxy settings. &lt;br /&gt;
&lt;br /&gt;
Here&#39;s how it should look:&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://clip2net.com/clip/m34324/1317309598-clip-26kb.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
Now try to open a once-filtered webpage and if you open it, you&#39;ll be using your home connection! I hope you liked this guide and let me know if you have any doubts!</content><link rel='replies' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/2518823510201368327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myitarea.blogspot.com/2011/09/avoiding-your-proxy-at-work.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/2518823510201368327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/2518823510201368327'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/2011/09/avoiding-your-proxy-at-work.html' title='Avoiding your proxy at work'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCLi2fDlQeFUkv_rCXMkX6RLtYtg1OoKJtpBNmBv6Ovi0exYwUbf9h3msOfdxBU7K7L_ekuctLIvpCnDz-UqxbotEHRL9qUcbq4_qyh5JkqBM20JYB_RF4xcsyIdzSCo4OfdnvXop_8Kc/s72-c/WorkConnection.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1511633591133967588.post-4540547811966738963</id><published>2011-09-21T20:46:00.000-07:00</published><updated>2011-09-21T20:48:26.328-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Installing a centralized syslog</title><content type='html'>Remember that I told you about this guide? So here it is. Basically, it explains step by step how to install &lt;span style=&quot;font-weight: bold;&quot;&gt;Adiscon LogAnalyzer&lt;/span&gt; in an Ubuntu box. Let me know if something&#39;s not clear enough:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: medium; font-weight: bold;&quot;&gt;The Prep:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Before we dive into setting up any of this we need to do a little prep work. If you are going to be looking at these logs in a web browser then it might be good if the time stamps you are seeing reflect the appropriate timezone.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You first need to select your timezone so that your system knows where it is located. Look for your timezone in /usr/share/zoneinfo, then copy it to /etc/localtime. Please avoid the /usr/share/zoneinfo/Etc/GMT* timezones as their names do not indicate the expected zones. For instance, GMT-8 is in fact GMT+8.&lt;br /&gt;
&lt;br /&gt;
Suppose you are in the eastern timezone:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;~# cp /usr/share/zoneinfo/EST5EDT /etc/localtime&lt;/div&gt;&lt;br /&gt;
Using your favorite text editor, create the file /etc/cron.daily/ntpdate and insert the following:&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;ntpdate ntp.ubuntu.com&lt;/div&gt;&lt;br /&gt;
Save the file then&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;~# chmod 755 /etc/cron.daily/ntpdate&lt;/div&gt;&lt;br /&gt;
Now let&#39;s run it to get our time corrected:&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;~# /etc/cron.daily/ntpdate&lt;/div&gt;&lt;br /&gt;
Lastly, verify...&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;~# date&lt;/div&gt;&lt;br /&gt;
You should see your current time here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: medium; font-weight: bold;&quot;&gt;The Logging:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Now that we have our clocks synchronized let&#39;s move on to the meat and potatoes of this article. There are some prerequisite software packages that need to be setup here: Apache, MySQL, PHP... aka the LAMP stack. I am not going to go into detail on these but I do to note a couple of things:&lt;br /&gt;
&lt;br /&gt;
On Ubuntu, just run tasksel and pick LAMP from there.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioh_J1lmfUVCByrb86JenZyth_FeJmf1XTvZO0Lh5OP3WH7NIumi8q0vsbolVWJp8BkaNUV1D3qMQaCp2jOZBrgw8NKsHlYPyO3JtXKnvBOuNDYN1D_eGGUvC-NEJuI9LNT_q5oYMeKmc/s1600/tasksel_LAMP.png&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5655021221411756386&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioh_J1lmfUVCByrb86JenZyth_FeJmf1XTvZO0Lh5OP3WH7NIumi8q0vsbolVWJp8BkaNUV1D3qMQaCp2jOZBrgw8NKsHlYPyO3JtXKnvBOuNDYN1D_eGGUvC-NEJuI9LNT_q5oYMeKmc/s320/tasksel_LAMP.png&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 188px; margin: 0px auto 10px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
After installing the LAMP stack, don’t forget to manually restart Apache. I would suggest also setting up phpMyAdmin to simplify managing MySQL.&lt;br /&gt;
&lt;br /&gt;
Ubuntu now comes with rsyslog as its defacto logger but we need to add a little bit of additional functionality to it. Namely, we need to add MySQL output support and add in the Reliable Event Logging Protocol (relp):&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;~# apt-get install rsyslog-mysql rsyslog-relp&lt;br /&gt;
Reading package lists... Done&lt;br /&gt;
Building dependency tree   &lt;br /&gt;
Reading state information... Done&lt;br /&gt;
The following extra packages will be installed:&lt;br /&gt;
dbconfig-common librelp0&lt;br /&gt;
The following NEW packages will be installed:&lt;br /&gt;
dbconfig-common librelp0 rsyslog-mysql rsyslog-relp&lt;br /&gt;
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.&lt;br /&gt;
Need to get 677kB of archives.&lt;br /&gt;
After this operation, 2,335kB of additional disk space will be used.&lt;br /&gt;
Do you want to continue [Y/n]? y&lt;/div&gt;&lt;br /&gt;
During this install’s process you will be prompted to make the tables that are needed in MySQL:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgprYvZjXI7u8CvgVK3tE4vlIA5HM3XLDdgkSUhAjX7lzVPoDzVEBcyqimcHCaA4JjLKk3g6ykdgd197Qkldxv5ajrBOinx_VeD7BzsyS0QvFrBwCehuA9Di5lp1M4h5hWK8HuBDlD6wm4/s1600/Ubuntu-rsyslog-mysql-config.png&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5655021597747458498&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgprYvZjXI7u8CvgVK3tE4vlIA5HM3XLDdgkSUhAjX7lzVPoDzVEBcyqimcHCaA4JjLKk3g6ykdgd197Qkldxv5ajrBOinx_VeD7BzsyS0QvFrBwCehuA9Di5lp1M4h5hWK8HuBDlD6wm4/s320/Ubuntu-rsyslog-mysql-config.png&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 86px; margin: 0px auto 10px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Do this. You will then be asked for your MySQL root password followed by being asked to create a password for rsyslog to use. This is the password that rsyslog will use in its config files.&lt;br /&gt;
&lt;br /&gt;
Now we need to make a couple of tweeks to the config files of rsyslog. Ubuntu takes advantage of the fact that rsyslog can use multiple config files that are merged into one “config.” You have&lt;span style=&quot;font-weight: bold;&quot;&gt; /etc/rsyslog.conf &lt;/span&gt;but you also have a directory named&lt;span style=&quot;font-weight: bold;&quot;&gt; /etc/rsyslog.d/ &lt;/span&gt;that contains additional configs. In there you will now see one named &lt;span style=&quot;font-weight: bold;&quot;&gt;mysql.conf&lt;/span&gt; that contains the needed info to dump our logs into the database. To turn on accepting remote logs though we still have to uncoment a couple of lines in &lt;span style=&quot;font-weight: bold;&quot;&gt;/etc/rsyslog.conf&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;# provides UDP syslog reception&lt;br /&gt;
$ModLoad imudp&lt;br /&gt;
$UDPServerRun 514&lt;br /&gt;
# provides TCP syslog reception&lt;br /&gt;
$ModLoad imtcp&lt;br /&gt;
$InputTCPServerRun 514&lt;/div&gt;&lt;br /&gt;
Now, let&#39;s apply our changes:&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;~# service rsyslog restart&lt;/div&gt;&lt;br /&gt;
It is a little rough to read if your terminal is not wide enough, but you can verify that the logs are going to the database with&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;~# mysql -p -e &quot;SELECT * FROM Syslog.SystemEvents;&quot;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: medium; font-weight: bold;&quot;&gt;RELP: Reliable Event Logging Protocol&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
At this point we have configured our servers to accept messages over TCP &amp;amp; UDP on the standard port of 514, which is what is needed to be compatible with the majority of network devices that can shoot logs to a central server. Now, let&#39;s take it a step farther and add support to the config files for a third protocol: &lt;span style=&quot;font-weight: bold;&quot;&gt;RELP&lt;/span&gt;, which is implemented via librelp. This is supposed to be a much more reliable method of sending syslog data over the network than even TCP. More info about the unreliability of tcp and the creation of RELP can be found on the developer’s blog. Rsyslog has native support for it via the imrelp &amp;amp; omrelp modules.&lt;br /&gt;
&lt;br /&gt;
Use your favorite editor and create &lt;span style=&quot;font-weight: bold;&quot;&gt;/etc/rsyslog.d/relp.conf&lt;/span&gt; and enter the following in it:&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;$ModLoad imrelp&lt;br /&gt;
$InputRELPServerRun 20514&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: medium; font-weight: bold;&quot;&gt;Adding reliability to your logging systems&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
One of the many helpful articles at &lt;a href=&quot;http://rsyslog.com/&quot;&gt;rsyslog.com&lt;/a&gt; explains how to log massive amounts of syslog data to a database by setting up buffering on your server so that messages are less likely to be lost if a system or link is under very high load. To do this you first need to make a working directory that it can store queue files in if needed.&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;~ # mkdir -p /var/rsyslog/work&lt;/div&gt;&lt;br /&gt;
Now we need to add the following to &lt;span style=&quot;font-weight: bold;&quot;&gt;/etc/rsyslog.conf&lt;/span&gt; or &lt;span style=&quot;font-weight: bold;&quot;&gt;/etc/rsyslog.d/mysql.conf&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;# Buffering stuff:&lt;br /&gt;
$WorkDirectory /var/rsyslog/work # default location for work (spool) files&lt;br /&gt;
$ActionQueueType LinkedList # use asynchronous processing&lt;br /&gt;
$ActionQueueFileName dbq    # set file name, also enables disk mode&lt;br /&gt;
$ActionResumeRetryCount -1  # infinite retries on insert failure&lt;/div&gt;&lt;br /&gt;
And now we need to restart rsyslog:&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;~ # service rsyslog restart&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: medium; font-weight: bold;&quot;&gt;The Viewing:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
To view the info that we are now dumping into MySQL via the web we need to setup LogAnalyzer. Step one of this is to download the software from &lt;a href=&quot;http://loganalyzer.adiscon.com/downloads&quot;&gt;http://loganalyzer.adiscon.com/downloads&lt;/a&gt;. As of this writing, the newest version is v3.2.1.&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;~ # wget http://download.adiscon.com/loganalyzer/loganalyzer-3.2.1.tar.gz&lt;br /&gt;
~ # tar -xzf loganalyzer-*.*.*.tar.gz&lt;br /&gt;
~ # cd loganalyzer-3.0.1&lt;br /&gt;
~/loganalyzer-3.0.1# mkdir /var/www/logs&lt;br /&gt;
~/loganalyzer-3.0.1# cp -R src/* /var/www/logs/&lt;br /&gt;
~/loganalyzer-3.0.1# cp contrib/* /var/www/logs/&lt;br /&gt;
~/loganalyzer-3.0.1# cd /var/www/logs/&lt;br /&gt;
/var/www/logs# chmod +x configure.sh secure.sh&lt;br /&gt;
/var/www/logs# ./configure.sh&lt;/div&gt;&lt;br /&gt;
To enable the authentication part of LogAnalyzer we need to make an empty database for users to be stored in and grant privileges on it.&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;/var/www/logs# mysql -p&lt;br /&gt;
mysql&amp;gt; create database LogAnalyzerUsers;&lt;br /&gt;
mysql&amp;gt; show databases;&lt;br /&gt;
mysql&amp;gt; grant all on LogAnalyzerUsers.* to LAUser@&#39;localhost&#39; identified by &#39;password&#39;;&lt;br /&gt;
mysql&amp;gt; quit&lt;/div&gt;&lt;br /&gt;
Now, go to &lt;span style=&quot;font-weight: bold;&quot;&gt;http://yourlogserver/logs/&lt;/span&gt; and you will be pointed to the installation script which will guide you through the process of setting up &lt;span style=&quot;font-weight: bold;&quot;&gt;LogAnalyzer&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Basic Configuration&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can set several basic options here.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Number of syslog messages per page = 50 (default)&lt;/li&gt;
&lt;li&gt;This is the number of syslog messages displayed on each page. You can increase the value (makes LogAnalyzer slower) or decrease the value (makes it faster).&lt;/li&gt;
&lt;li&gt;Message character limit for the main view = 80 (default)&lt;/li&gt;
&lt;li&gt;Set the number of characters per message which will be shown in the last column of the main view. &lt;/li&gt;
&lt;li&gt;Full messages can be reviewed by hovering the mouse over it.&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Many folks prefer to use a setting of &quot;0&quot;, which means complete messages will be displayed&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Show message details popup (default yes) = yes (default). Note that many people find the popups intrusive and prefer to disable them. Use &quot;no&quot; in this case.&lt;/li&gt;
&lt;li&gt;During the setup you will also be prompted to enable the user database. Do so and enter in the information that is requested.&lt;/li&gt;
&lt;li&gt;A couple of pages later you will be prompted for the main (admin) user.&lt;/li&gt;
&lt;li&gt;The defaults on Step 7 demonstrate that it is possible to use this without the database backend. We need to change this to match our setup though.&lt;/li&gt;
&lt;li&gt;Name the source something logical seeing as it is going to be the compiled logs from all your servers.&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Source Type = MYSQL Native&lt;/li&gt;
&lt;li&gt;Select View = Syslog Fields&lt;/li&gt;
&lt;li&gt;Table type = MonitorWare&lt;/li&gt;
&lt;li&gt;Database Host = localhost&lt;/li&gt;
&lt;li&gt;Database Name = Syslog&lt;/li&gt;
&lt;li&gt;Database Tablename = SystemEvents&lt;/li&gt;
&lt;li&gt;Database User = rsyslog&lt;/li&gt;
&lt;li&gt;Enable Row Counting = no&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;Once you finish up, log into your new site and have a look at what has been being logged on your server so far.</content><link rel='replies' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/4540547811966738963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myitarea.blogspot.com/2011/09/installing-centralized-syslog.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/4540547811966738963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/4540547811966738963'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/2011/09/installing-centralized-syslog.html' title='Installing a centralized syslog'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioh_J1lmfUVCByrb86JenZyth_FeJmf1XTvZO0Lh5OP3WH7NIumi8q0vsbolVWJp8BkaNUV1D3qMQaCp2jOZBrgw8NKsHlYPyO3JtXKnvBOuNDYN1D_eGGUvC-NEJuI9LNT_q5oYMeKmc/s72-c/tasksel_LAMP.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1511633591133967588.post-2330834414685677448</id><published>2011-09-19T05:58:00.000-07:00</published><updated>2011-09-21T20:48:30.752-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="network"/><category scheme="http://www.blogger.com/atom/ns#" term="rdp"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Terminal Services Gateway</title><content type='html'>We were looking for some solution where we can centralize every RDP session coming from outside (especially for vendor access), and we ended up with 2 choices: &lt;span style=&quot;font-weight: bold;&quot;&gt;Citrix &lt;/span&gt;or &lt;span style=&quot;font-weight: bold;&quot;&gt;Terminal Services Gateway&lt;/span&gt; (now known as &lt;span style=&quot;font-style: italic;&quot;&gt;Remote Desktop Services Gateway&lt;/span&gt;). Considering we already have licenses for Terminal Services, we are taking the latter. If you don&#39;t know what it is, here&#39;s a brief explanation.&lt;br /&gt;
&lt;br /&gt;
Windows Server Terminal Services uses Remote Desktop Protocol (RDP) to enable the connections from clients to the terminal server, which uses port 3389. If you need to access a terminal server from outside the internal network (intranet), you have two options for doing so. You can either enable port 3389 through your firewall to specific servers (which isn’t a good idea), or, more commonly, clients connect to the corporate network via VPN, which can then enable the RDP session in a secure manner.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
In general, technologies are moving away from requiring VPN connections. For example, remote procedure call (RPC) over HTTP Secure (HTTPS) is used for for Microsoft Exchange Server connections and Microsoft Office SharePoint Server and Microsoft Office Groove access. Windows Server 2008 includes Terminal Services (TS) Gateway, a new technology that allows secure RDP connections from outside a corporate intranet without requiring a VPN connection.&lt;br /&gt;
&lt;br /&gt;
TS Gateway allows RDP traffic to be encapsulated in HTTPS. Essentially the client outside the network makes a configuration change on their Remote Desktop client to instruct the client to communicate via a TS Gateway. The RDP traffic on the client is encapsulated in HTTPS, encrypted using the TS Gateway’s Secure Sockets Layer (SSL) certificate, and sent to the TS Gateway. The TS Gateway extracts the RDP traffic from the HTTPS and forwards it on to the destination target. The Remote Desktop client sends responses via the TS Gateway in normal RDP, and once again the TS Gateway encapsulates the RDP in HTTPS and sends it back to the RDP client. The diagram below illustrates the TS Gateway communications process.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://s376.photobucket.com/albums/oo202/Aresius/?action=view&amp;amp;current=TS01.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Photobucket&quot; border=&quot;0&quot; src=&quot;http://i376.photobucket.com/albums/oo202/Aresius/TS01.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Configuring a system to use TS Gateway is simple. Note that the RDP target can be any Remote Desktop target—it doesn’t have to be a Server 2008 terminal server, and a system can connect to any target via the TS Gateway.&lt;br /&gt;
&lt;br /&gt;
You would normally place the TS Gateway in your network’s demilitarized zone (DMZ). However, an alternative option is to place a Microsoft ISA Server system or other SSL terminator in the DMZ and place the TS Gateway in the internal network to perform the RDP encapsulation and extraction duties.</content><link rel='replies' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/2330834414685677448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myitarea.blogspot.com/2011/09/terminal-services-gateway.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/2330834414685677448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/2330834414685677448'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/2011/09/terminal-services-gateway.html' title='Terminal Services Gateway'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1511633591133967588.post-8841500038120963467</id><published>2011-09-16T12:31:00.000-07:00</published><updated>2011-09-21T20:48:38.578-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="vmware"/><title type='text'>vSphere Syslog Collector</title><content type='html'>I was trying to find a way to create a syslog server where I could centralize all my ESX hosts&#39; logs. I was between options (like Kiwi, phpsyslog-ng, etc.) when I decided to do it with &lt;span style=&quot;font-weight: bold;&quot;&gt;Adiscon LogAnalyzer&lt;/span&gt;, which is a free and opensource solution. I&#39;ll post a guide for its installation in another post (because I actually installed it successfully all the way).&lt;br /&gt;
&lt;br /&gt;
When I was about to add the ESX hosts to my sources list in the syslog server, I found out that vSphere 5 contains a new feature called &lt;span style=&quot;font-weight: bold;&quot;&gt;VMware Syslog Collector&lt;/span&gt;, and since we&#39;ll be migrating to that version in a few weeks, makes no sense to move on with my LogAnalyzer.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#39;t know what Syslog Collector is, let me give you a brief intro:&lt;br /&gt;
&lt;br /&gt;
VMware Syslog Collector is a tool that provides a centralized repository for logs from multiple ESX/ESXi hosts. Having installed Syslog Collector, you can redirect every log entry from your ESX/ESXi hosts to this repo in the network, instead of hosting them locally, easying up our troubleshooting jobs. This is extremely important considering that in ESXi logs are hosted locally by a very limited amount of time.&lt;br /&gt;
&lt;br /&gt;
Syslog Collector can be installed in the same server with vCenter Server, or in a separate one that can connect to vCenter Server, like our current Update Manager server.&lt;br /&gt;
&lt;br /&gt;
If you already have vSphere 5 and want to install it, you can follow the post in VMware Blog explaining it:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://blogs.vmware.com/esxi/2011/07/setting-up-the-esxi-syslog-collector.html&quot;&gt;http://blogs.vmware.com/esxi/2011/07/setting-up-the-esxi-syslog-collector.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let me know what you think and if you installed it, share your experience.</content><link rel='replies' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/8841500038120963467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myitarea.blogspot.com/2011/09/vsphere-syslog-collector.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/8841500038120963467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/8841500038120963467'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/2011/09/vsphere-syslog-collector.html' title='vSphere Syslog Collector'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1511633591133967588.post-1775933407890825343</id><published>2011-09-15T11:27:00.000-07:00</published><updated>2011-09-21T20:47:09.381-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ccna"/><category scheme="http://www.blogger.com/atom/ns#" term="network"/><title type='text'>UDP reference</title><content type='html'>You have to remember diferences between TCP and UDP. Here&#39;s a quick definition of UDP:&lt;br /&gt;
&lt;br /&gt;
UDP is the User Datagram Protocol. It is used to send individual packets across an IP network, in an unreliable fashion. This means that successful, error-free delivery of a message is not guaranteed.&lt;br /&gt;
&lt;br /&gt;
So remember that UDP is not reliable but it&#39;s fast! Examples of protocols that use UDP are TFTP, DNS (it can use TCP too!), DHCP, SNMP, RCP, NFS.&lt;br /&gt;
&lt;br /&gt;
If you&#39;re really interested in its standard and how it&#39;s defined, you should definitely read the RCF doc here: &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.ietf.org/rfc/rfc0768.txt&quot;&gt;RFC 768 - User Datagram Protocol&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And finally a couple of jokes:&lt;br /&gt;
&lt;br /&gt;
&quot;A UDP packet walks into a bar, no one acknowledges him.&lt;br /&gt;
A TCP packet walks into a bar twice because no one acknowledged him the first time.&quot;&lt;br /&gt;
&lt;br /&gt;
&quot;The best thing about UDP jokes is i don’t care if you get it or not.&quot;</content><link rel='replies' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/1775933407890825343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myitarea.blogspot.com/2011/09/udp-reference.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/1775933407890825343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/1775933407890825343'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/2011/09/udp-reference.html' title='UDP reference'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1511633591133967588.post-2220832718471900839</id><published>2011-09-14T10:00:00.000-07:00</published><updated>2011-09-21T20:48:42.894-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="vmware"/><title type='text'>vCenter Error registering vmx</title><content type='html'>I was trying to bring an ESX host to maintenance mode, but it keep failing to migrate a box using vMotion. Being that VM the only one left, I suspended it and migrated it manually. Everything worked ok.&lt;br /&gt;
&lt;br /&gt;
When I came back to that box to power it on again, this error showed up:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;This virtual machine cannot be powered on because its working directory is not valid. Use the configuration editor to set a valid working directory, and then try again.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Reading the not valid working directory, I proceeded to remove from inventory the VM so I can add it again manually registering the vmx file, only when I opened the datastore the folder for that VM was empty. Enter the WTF.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve tried refreshing everything but the result was the same everytime I browsed the datastore. So finally I opened a new vClient for the specific ESX host, opened the datastore and there they were, all the files for that VM. &quot;Everthing&#39;s good now&quot; I thought ingeniously.&lt;br /&gt;
&lt;br /&gt;
I tried to register the vmx but suddenly the same error popped up. This time I found this KB article from VMware:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;amp;cmd=displayKC&amp;amp;externalId=1000114&quot;&gt;http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;amp;cmd=displayKC&amp;amp;externalId=1000114&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Specially where it says that this issue may occur if the name of the virtual machine directory has a space at the beginning or the end of the directory name. You may also experience problems powering on a virtual machine if there are spaces in the virtual machine disk’s name.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve doublechecked and bingo! There was a space at the end of the folder name. I fixed that and vmx was registered with no further problems.</content><link rel='replies' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/2220832718471900839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myitarea.blogspot.com/2011/09/vcenter-error-registering-vmx.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/2220832718471900839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/2220832718471900839'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/2011/09/vcenter-error-registering-vmx.html' title='vCenter Error registering vmx'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1511633591133967588.post-8575616695285348046</id><published>2011-09-10T13:42:00.001-07:00</published><updated>2011-09-21T20:48:47.341-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ccna"/><category scheme="http://www.blogger.com/atom/ns#" term="network"/><title type='text'>Understanding Spanning Tree Protocol</title><content type='html'>If you ever studied CCNA, I bet you had troubles understanding &lt;span style=&quot;font-weight: bold;&quot;&gt;Spanning Tree Protocol (IEEE 802.1D)&lt;/span&gt;. I know I did! Here&#39;s an explanation of it so you can clear your doubts.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;1 - Basic concepts&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Spanning Tree Protocol (STP) is a OSI layer 2 protocol (Data Link).&lt;br /&gt;
&lt;br /&gt;
Its function is to deal with loops presence due to redundant links existence. This protocol grants switches the ability to enable or disable automatically the connection links guaranteeing a loop-free topology.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Imagine two LANs interconnected. Host n is sending a Frame F to an unknown destination.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://clip2net.com/clip/m34324/1315687908-clip-20kb.jpg&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This is what would happen:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Bridge A sends this frame to LAN 2.&lt;/li&gt;
&lt;li&gt;Bridge B sees frame F in LAN 2 (with unknown destination) and sends it to LAN 1.&lt;/li&gt;
&lt;li&gt;Bridge A does the same and the loop begins.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
When there are loops in our network topology, data link layer devices resend frames via &lt;span style=&quot;font-weight: bold;&quot;&gt;broadcast &lt;/span&gt;and &lt;span style=&quot;font-weight: bold;&quot;&gt;multicast&lt;/span&gt;, since there&#39;s no TTL field in layer 2 like in layer 3. A great amount of bandwidth gets consumed and, in many cases, the network is no longer working. Solution consists in allowing redundant physical links existence, but creating a loop-free logic topology. &lt;span style=&quot;font-weight: bold;&quot;&gt;STP&lt;/span&gt; allows only one active way at a time between two network devices (this prevents loops from happening) but keeps redundant links as reserved to activate them in case something fails in the main way.&lt;br /&gt;
&lt;br /&gt;
Spanning tree is valid until any change happens in the topology which it detects automatically. STP maximum duration is 5 minutes. When one of these changes ocurred, root bridge redefines STP topology or a new root brigde is elected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;2 - How it works&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This algorithm changes a mesh physical network with loops to a logic tree-shaped loop-free one. Bridges talk to each other using configuration messages called &lt;span style=&quot;font-weight: bold;&quot;&gt;Bridges Protocol Data Units&lt;/span&gt; (BPDU).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;3 - Ports status&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Blocking&lt;/span&gt; Port can only receive BPDUs. Frames are discarded and MAC address table doesn&#39;t get updated.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Listening:&lt;/span&gt; The switch processes BPDUs and awaits possible new information that would cause it to return to the blocking state.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Learning:&lt;/span&gt; While the port does not yet forward frames (packets) it does learn source addresses from frames received and adds them to the filtering database (switching database).&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Forwarding:&lt;/span&gt; A port receiving and sending data, normal operation. STP still monitors incoming BPDUs that would indicate it should return to the blocking state to prevent a loop.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Disabled:&lt;/span&gt; Not strictly part of STP, a network administrator can manually disable a port&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;4 - STP in theory&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Algorithm has three parts and it requires that every switch has an ID and that it may know each port status:&lt;br /&gt;
&lt;div&gt;&lt;ol&gt;&lt;li&gt; Bridge with smaller ID gets elected as root.&lt;/li&gt;
&lt;li&gt;Each bridge calculates shortest path to root bridge and marks that port as a root port.&lt;/li&gt;
&lt;li&gt;For each LAN, every bridge connected to it must agree in which of them will be the designated. In order to it, BPDUs are interchanged. Designated bridge will be:&lt;br /&gt;
&lt;div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;Closest to root bridge or...&lt;/li&gt;
&lt;li&gt;Closest to root bridge and with lowest ID.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;4 - STP in real life&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Bridges syncronize sending each other packets called BPDU that contain:&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Sender ID&lt;/li&gt;
&lt;li&gt;Suspected root bridge ID.&lt;/li&gt;
&lt;li&gt;Distance between switch and root bridge.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you still have some doubts, please, take a look at the following video that Radia Perlman, inventor of the STP algorithm, created.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;345&quot; src=&quot;http://www.youtube.com/embed/iE_AbM8ZykI&quot; width=&quot;420&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/8575616695285348046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myitarea.blogspot.com/2011/09/understanding-spanning-tree-protocol.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/8575616695285348046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/8575616695285348046'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/2011/09/understanding-spanning-tree-protocol.html' title='Understanding Spanning Tree Protocol'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/iE_AbM8ZykI/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1511633591133967588.post-69767289475558274</id><published>2011-09-08T14:49:00.000-07:00</published><updated>2011-09-21T20:47:46.556-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="powercli"/><category scheme="http://www.blogger.com/atom/ns#" term="vmware"/><title type='text'>PowerOff-VM function</title><content type='html'>Following my previous post, here&#39;s the PowerOff-VM function:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;Function PowerOff-VM($vm, $id){&lt;br /&gt;
$getvm = Get-VM -Id $id&lt;br /&gt;
Shutdown-VMGuest -VM $getvm -Confirm:$false | Out-Null&lt;br /&gt;
Write-Host &quot;$vm is stopping!&quot; -ForegroundColor Yellow&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
do {&lt;br /&gt;
$vmview = Get-VM -Id $id | Get-View&lt;br /&gt;
$getvm = Get-VM -Id $id&lt;br /&gt;
$powerstate = $getvm.PowerState&lt;br /&gt;
$toolsstatus = $vmview.Guest.ToolsStatus&lt;br /&gt;
&lt;br /&gt;
Write-Host &quot;$vm is stopping with powerstate $powerstate and toolsStatus $toolsstatus!&quot; -ForegroundColor Yellow&lt;br /&gt;
sleep 5&lt;br /&gt;
&lt;br /&gt;
}until($powerstate -match &quot;PoweredOff&quot;)&lt;br /&gt;
Write-Host &quot;$vm is powered-off&quot;&lt;br /&gt;
}&lt;/div&gt;&lt;br /&gt;
This function is a little more straightforward. It basically calls the VMGuest to shutdown and work from there. As the previous function, it imports the same two variables ($vm and $id) for the same purposes.&lt;br /&gt;
&lt;br /&gt;
If you plan on scripting for powering off a VM, don&#39;t use Stop-VM! It powers off the VM cold, and it will give an error next time you boot. Only use it if you don&#39;t care about the next boot (e.g. VM is in IndependentNonPersistent).</content><link rel='replies' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/69767289475558274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myitarea.blogspot.com/2011/09/poweroff-vm-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/69767289475558274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/69767289475558274'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/2011/09/poweroff-vm-function.html' title='PowerOff-VM function'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1511633591133967588.post-9133170859047233272</id><published>2011-09-08T13:05:00.000-07:00</published><updated>2011-09-08T14:44:07.890-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="powercli"/><category scheme="http://www.blogger.com/atom/ns#" term="vmware"/><title type='text'>PowerOn-VM function</title><content type='html'>Messing around with PowerCLI, I always had problems to power on and off cleanly/reliably. However, after a few tries, i&#39;ve come up with two functions i use a lot now for almost every script that involves those two actions. Today i&#39;m going to post the first one.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here&#39;s the function for &lt;span style=&quot;font-weight:bold;&quot;&gt;PowerOn&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;code&quot;&gt;Function PowerOn-VM($vm, $id){&lt;br /&gt;  $getvm = Get-VM -Id $id&lt;br /&gt;  Start-VM -VM $getvm -Confirm:$false -RunAsync | Out-Null&lt;br /&gt;  Write-Host &quot;$vm is starting!&quot; -ForegroundColor Yellow&lt;br /&gt;  sleep 10&lt;br /&gt;&lt;br /&gt;  do {&lt;br /&gt;     $vmview = Get-VM -Id $id | Get-View&lt;br /&gt;     $getvm = Get-VM -Id $id&lt;br /&gt;     $powerstate = $getvm.PowerState&lt;br /&gt;     $toolsstatus = $vmview.Guest.ToolsStatus&lt;br /&gt;&lt;br /&gt;     Write-Host &quot;$vm is starting, powerstate is $powerstate and toolsstatus is $toolsstatus!&quot; -ForegroundColor Yellow&lt;br /&gt;     sleep 5&lt;br /&gt;     #NOTE that if the tools in the VM get the state toolsNotRunning this loop will never end. There needs to be a timekeeper variable to make sure the loop ends&lt;br /&gt;&lt;br /&gt;   }until(($powerstate -match &quot;PoweredOn&quot;) -and (($toolsstatus -match &quot;toolsOld&quot;) -or ($toolsstatus -match &quot;toolsOk&quot;) -or ($toolsstatus -match &quot;toolsNotInstalled&quot;)))&lt;br /&gt;&lt;br /&gt;   if (($toolsstatus -match &quot;toolsOk&quot;) -or ($toolsstatus -match &quot;toolsOld&quot;)){&lt;br /&gt;      $Startup = &quot;OK&quot;&lt;br /&gt;      Write-Host &quot;$vm is started and has ToolsStatus $toolsstatus&quot;&lt;br /&gt;   }&lt;br /&gt;   else{&lt;br /&gt;      $Startup = &quot;ERROR&quot;&lt;br /&gt;      [console]::ForegroundColor = &quot;Red&quot;&lt;br /&gt;      Read-Host &quot;The ToolsStatus of $vm is $toolsstatus. This is unusual. Press &lt;ctrl&gt;+C to quit the script or press &lt;enter&gt; to continue&quot;&lt;br /&gt;      [console]::ResetColor()&lt;br /&gt;   }&lt;br /&gt;   return $Startup&lt;br /&gt;}&lt;br /&gt;&lt;/enter&gt;&lt;/ctrl&gt;&lt;/div&gt;&lt;br /&gt;As you can see, the function will return a code (&lt;span style=&quot;font-weight:bold;&quot;&gt;OK&lt;/span&gt; or &lt;span style=&quot;font-weight:bold;&quot;&gt;ERROR&lt;/span&gt;) and you can use it as you&#39;d like in the main script. &lt;span style=&quot;font-weight:bold;&quot;&gt;ERROR &lt;/span&gt;will happen when VMTools are not detected and $toolsstatus is &quot;toolsNotInstalled&quot;.&lt;br /&gt;&lt;br /&gt;In order to run this function, you would need to call two variables: &lt;span style=&quot;font-weight:bold;&quot;&gt;$vm&lt;/span&gt; and &lt;span style=&quot;font-weight:bold;&quot;&gt;$id&lt;/span&gt;. Here are the reasons for using this variables:&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;$id: I used this variable importing the id of a VM (e.g. VirtualMachine-vm-1234) because this way i could avoid having problems when i have two VMs with the same name. It&#39;s a bit tedious to add it to a script, but it was needed.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;$vm: This one is pretty simple. Originally i was importing the VM name from a CSV file, and that&#39;s why I left it basically for aesthetic purposes (i.e. Write-Host cmdlets).&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Here&#39;s an example for this function:&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;code&quot;&gt;$vm = Get-VM -Name VM2134 | Select Name&lt;br /&gt;$id = Get-VM -Name VM2134 | Select Id&lt;br /&gt;&lt;br /&gt;PowerOn-VM $vm $id&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Let me know if you think I can improve it or if you have any doubts.</content><link rel='replies' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/9133170859047233272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myitarea.blogspot.com/2011/09/poweron-vm-and-poweroff-vm-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/9133170859047233272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/9133170859047233272'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/2011/09/poweron-vm-and-poweroff-vm-functions.html' title='PowerOn-VM function'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1511633591133967588.post-3133404759660687977</id><published>2011-09-08T11:32:00.001-07:00</published><updated>2011-09-08T11:32:19.349-07:00</updated><title type='text'>Welcome!</title><content type='html'>Hello all!&lt;br /&gt;
I&#39;m Aresius and I&#39;m an IT guy. I&#39;ve been working in IT for a few years now, and I&#39;ve learned a thing or two. I&#39;ve worked with a lot of different stuff including Windows/Linux servers, Cisco routing and switching, Cisco ASA, Cisco VoIP, VMware ESX and vCenter, PowerCLI, SAN, NAS, Exchange, OCS, AD, and so on.&lt;br /&gt;
&lt;br /&gt;
I&#39;ll try to post about stuff that have been useful for me, and hopefully, for you!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Thanks for stopping by, and please, come back!&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://myitarea.blogspot.com/feeds/3133404759660687977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myitarea.blogspot.com/2011/09/welcome.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/3133404759660687977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1511633591133967588/posts/default/3133404759660687977'/><link rel='alternate' type='text/html' href='http://myitarea.blogspot.com/2011/09/welcome.html' title='Welcome!'/><author><name>Aresius</name><uri>http://www.blogger.com/profile/13354537261834563279</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihcKcfGSdA3nc6nw4JcAVdEtWPVI_FY0TqedWXwSQo7UDd47UK1tiRAVs7SWCW5yNFp8GLMEXhTdCygUJfSbyV0ShgFZcr9NMRJqi6lHRlGMgfJeBKLIphcBxBB3H4S6c/s113/ninja.jpg'/></author><thr:total>0</thr:total></entry></feed>