<?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>Aaron&#039;s Worthless Words &#187; linux</title>
	<atom:link href="http://aconaway.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://aconaway.com</link>
	<description>It&#039;s possible that someone somewhere needs to see this.</description>
	<lastBuildDate>Wed, 01 Feb 2012 02:07:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>A Quick Intro to Google&#8217;s Capirca</title>
		<link>http://aconaway.com/2010/04/10/a-quick-intro-to-googles-capirca/</link>
		<comments>http://aconaway.com/2010/04/10/a-quick-intro-to-googles-capirca/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 01:51:04 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[capirca]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://aconaway.com/?p=638</guid>
		<description><![CDATA[I finally took some time to check out Capirca.  It may be useful.]]></description>
			<content:encoded><![CDATA[<p>Yeled left a comment earlier this week asking if I&#8217;d seen <a href="http://code.google.com/p/capirca/">Google&#8217;s Capirca</a>.  I&#8217;d heard of it and checked out some presentation slides on it, but I&#8217;d never actually tried it out, so, in keeping with the script, I downloaded it to see what it could do.  Remember, now, that I&#8217;ve been playing with it for about 2 hours now, so I&#8217;m no expert on its use.</p>
<p>Capirca is a Python-based solution that Google came up with to automate ACL creation on their many thousands of routers around the world.  You can&#8217;t blame them for wanting to automate it, either.  How many times do you think they ran into problems with typos or keying errors from their network guys across those devices?</p>
<p>Capirca is configured similarly to Snort.  The concept is that you define objects like hosts, networks, groups, and services, then you define policies based on those objects.  You run the app against your definitions, and it pukes out ACLs for you.  It can do Cisco ACLs, Juniper ACLs, or IPTables rules, so that may come in handy, but I only care about the Cisco stuff right now.</p>
<p>Like I said, I haven&#8217;t messed with it before, but I got it working with very little frustration.  From the root of the application (<em>~/capirca-1.0</em> in my case), I edited <em>def/NETWORK.net</em> and added some custom objects to it to mess around.  I added my home networks, my public IP address at home, and some of the work networks that I would use to access home services.  Here&#8217;s what I added to the sample file.</p>
<blockquote>
<pre>...SNIP...
GUESTS = 10.0.2.0/24
USERS = 10.84.8.0/24
HOMENETS = GUESTS
          USERS

WORKNETS = 192.0.2.0/24

MYPUBLICIP = 192.0.2.1
...SNIP...</pre>
</blockquote>
<p>Now I can use those objects to define some rules for the ACL.  The rules are defined in the <em>policies/</em> directory and are a little more complicated than the objects, but it&#8217;s not that hard.  There are two types of entries in the policy files &#8211; headers and terms.  Headers define the beginning of a new ACL and define what the platform (Cisco, Juniper, IPTables) you&#8217;re using and the name of the list.  The terms sections define the details of the ACL like source, destination, protocol, port, and action.  Here&#8217;s the policy file (that I called <em>home.pol</em>) that I added to simulate letting my work IPs get to SSH on my public IP, everybody get to HTTP on the same, and deny everything else.</p>
<blockquote>
<pre>header {
  comment:: "F0/0 Inbound"
  target:: cisco F00IN
}

term permit-ssh-services {
  destination-address:: MYPUBLICIP
  protocol:: tcp
  destination-port:: SSH
  source-address:: WORKNETS
  action:: accept
}

term permit-http-services {
  destination-address:: MYPUBLICIP
  protocol:: tcp
  destination-port:: HTTP
  action:: accept
}

term default-deny {
  action:: deny
}</pre>
</blockquote>
<p>That creates a new Cisco ACL called F00IN (for F0/0 inbound) that allows our interesting traffic and denies everything else.  Now that the policy is configured, all I had to do was run the executable and see what happens.  In the root directory of the application, there&#8217;s a Python file called <em>aclgen.py</em> that you run.  Since we put all our definitions and policies in the default location, all I had to do is run that with no arguments.  The output told me to look in <em>filters/home.acl</em> for my new ACL.  That&#8217;s where I found this.</p>
<blockquote>
<pre>no ip access-list extended F00IN
ip access-list extended F00IN
remark F0/0 Inbound

remark permit-ssh-services
 permit 6 192.0.2.0 0.0.0.255  host 192.0.2.1 eq 22

remark permit-http-services
 permit 6 any  host 192.0.2.1 eq 80

remark default-deny
 deny ip any  any</pre>
</blockquote>
<p>Looks fine to me.  I pasted this into a lab router, and it worked like a champ.  I think I&#8217;ll put some more time into Capirca to see if I can find a use for it at work.</p>
<p>Send any <del>misspelled Battlestar Galactica references</del> questions my way.</p>
<p>Director&#8217;s Commentary:  I need to get a better mic if I want to keep doing this.</p>
<div class="wp-about-author-containter-around" style="background-color:#ffffff;"><div class="wp-about-author-pic"><img alt='' src='http://1.gravatar.com/avatar/14352aa939196349e4b9f2a272ca5112?s=100&amp;d=&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-about-author-text"><h3><a href='http://aconaway.com/author/jac/' title='Aaron Conaway'>Aaron Conaway</a></h3><p>I like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.</p><p><a href='http://aconaway.com' title='Aaron Conaway'>Website</a> - <a href='http://aconaway.com/author/jac/' title='More posts by Aaron Conaway'>More Posts</a> </p></div></div>]]></content:encoded>
			<wfw:commentRss>http://aconaway.com/2010/04/10/a-quick-intro-to-googles-capirca/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://aconaway.com/wp-content/uploads/2010/04/A-Quick-Intro-to-Googles-Capirca.mp3" length="2137971" type="audio/mpeg" />
		</item>
		<item>
		<title>An Interesting Problem with Multiple DCs on a Stick</title>
		<link>http://aconaway.com/2009/03/24/an-interesting-problem-with-multiple-dcs-on-a-stick/</link>
		<comments>http://aconaway.com/2009/03/24/an-interesting-problem-with-multiple-dcs-on-a-stick/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 15:08:25 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[csm]]></category>
		<category><![CDATA[datacenter]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[RIP]]></category>
		<category><![CDATA[route]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[VIP]]></category>
		<category><![CDATA[vlan]]></category>
		<category><![CDATA[vserver]]></category>

		<guid isPermaLink="false">http://aconaway.com/?p=286</guid>
		<description><![CDATA[We talked about running multiple data centers on a stick back in August, which is where you have multiple logical pairs of client and server VLANs on a single CSM for different tiers or functions.  The big point of the article was that you had to do some fancy forwarding to get a server-initiated connection from one server VLAN to appear out the appropriate client VLAN.  Well, we ran into an interesting issue with the given solution. Let&#8217;s set up a scenario.  Check the diagram for an overview.  We have many pairs of client and server VLANs each with a firewall interface as the gateway into the DCOAS.  Let&#8217;s just focus on just one, though &#8212; client VLAN 101 and server VLAN 102.  In VLAN 101 is ServerA (not pictured) with an IP of 1.1.101.45; in VLAN 102 is our web farm that needs to connect to ServerA to drop off some data.  We add a static route on ServerA pointing traffic for 1.1.102.0/24 back through the CSM. When you try to connect from the web farm, though, it just times out.  Why is that? Remember that weird forwarding vserver that we had to use to get traffic to come [...]]]></description>
			<content:encoded><![CDATA[<p>We talked about <a title="AConaway.com -- Running Multiple Data Centers on a Stick" href="http://aconaway.com/2008/08/12/running-multiple-data-centers-on-a-stick-with-the-csm/">running multiple data centers on a stick</a> back in August, which is where you have multiple logical pairs of client and server VLANs on a single CSM for different tiers or functions.  The big point of the article was that you had to do some fancy forwarding to get a server-initiated connection from one server VLAN to appear out the appropriate client VLAN.  Well, we ran into an interesting issue with the given solution.</p>
<p>Let&#8217;s set up a scenario.  Check the diagram for an overview.  We have many pairs of client and server VLANs each with a firewall interface as the gateway into the DCOAS.  Let&#8217;s just focus on just one, though &#8212; client VLAN 101 and server VLAN 102.  In VLAN 101 is ServerA (not pictured) with an IP of 1.1.101.45; in VLAN 102 is our web farm that needs to connect to ServerA to drop off some data.  We add a static route on ServerA pointing traffic for 1.1.102.0/24 back through the CSM.</p>
<p><img class="alignnone" title="Multiple Data Centers on a Stick" src="http://aconaway.com/static/DCOAS-2.png" alt="" width="406" height="421" /></p>
<p>When you try to connect from the web farm, though, it just times out.  Why is that?</p>
<p>Remember that weird forwarding vserver that we had to use to get traffic to come out of the right client VLAN?  Well, that&#8217;s stabbing you in the eye right now.  When the web server initiates a connection, it sends traffic to the server VLAN IP of the CSM.  The forwarding vserver grabs the new connection and load balances it to its only RIP, which is the IP of the firewall.  What happens when any good firewall accepts traffic destined on an interface destined for a host out of the same interface?  It drops the packet, and, eventually, the server times out.</p>
<p>What&#8217;s the fix, then?  There are a few that come to mind.  The first may be to just move ServerA to another network segment.  Another may be to change the process around a bit by having ServerA pull the data instead of it being pushed since client-initiated connections will work like a champ.</p>
<p>A really outrageous one would be to set up another forwarding vserver that has only ServerA as it&#8217;s serverfarm.  You would then add a static route in the web servers pointing to ServerA through that VIP, which would foward it over.</p>
<p>On the CSM, you&#8217;d do something like this.</p>
<blockquote>
<pre>serverfarm SERVERA-SF
 no nat server
 no nat client
 real 1.1.101.45  &lt;--- ServerA
  inservice

vserver SERVERA-VS
 virtual 1.1.102.5 any
 vlan 102
 serverfarm SERVERA-SF
 inservice</pre>
</blockquote>
<p>On the server, you would add a static route to ServerA through 1.1.102.5.  If you&#8217;re using some brand of Linux, you&#8217;d do this.</p>
<blockquote>
<pre>route add 1.1.101.45 gw 1.1.102.5</pre>
</blockquote>
<p>Don&#8217;t forget the static route on ServerA.</p>
<p>Send any <a title="MarshmallowPeeps.com -- Marshmallow Peeps" href="http://www.marshmallowpeeps.com/"><span style="text-decoration: line-through;">Peeps</span></a> questions my way.</p>
<div class="wp-about-author-containter-around" style="background-color:#ffffff;"><div class="wp-about-author-pic"><img alt='' src='http://1.gravatar.com/avatar/14352aa939196349e4b9f2a272ca5112?s=100&amp;d=&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-about-author-text"><h3><a href='http://aconaway.com/author/jac/' title='Aaron Conaway'>Aaron Conaway</a></h3><p>I like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.</p><p><a href='http://aconaway.com' title='Aaron Conaway'>Website</a> - <a href='http://aconaway.com/author/jac/' title='More posts by Aaron Conaway'>More Posts</a> </p></div></div>]]></content:encoded>
			<wfw:commentRss>http://aconaway.com/2009/03/24/an-interesting-problem-with-multiple-dcs-on-a-stick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VLANs on Linux</title>
		<link>http://aconaway.com/2009/02/19/vlans-on-linux/</link>
		<comments>http://aconaway.com/2009/02/19/vlans-on-linux/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 20:44:39 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dot1q]]></category>
		<category><![CDATA[lan]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[trunk]]></category>
		<category><![CDATA[vlan]]></category>

		<guid isPermaLink="false">http://aconaway.com/?p=205</guid>
		<description><![CDATA[My home network has a Linux box running IPTables as it&#8217;s center point, and, since there are four networks, it has 4 NICs and 4 cables into the switch.  I kept running into problems with the NICs (they would reorder depending on what flavor of Linux was installed), so I wanted to consolidate the NICs down to 2 &#8212; one for the Internet link and one for the LAN segments with 802.1q tagging. Disclosure:  I have only labbed this stuff out, and it seems to work, but I have yet to implement it.  Use at your own risk in the wild. Configuring VLAN tagging on Linux is pretty simple, actually.  One way to do it is to use the vconfig command to add and remove VLANs from interfaces.  As a demonstration, say you want to run VLANs 20 and 30 on eth0.  You would just do something like this.  Note that the interface you mention here has to be in an UP state, so do an ifconfig eth0 up if you need to get it into a good state. vconfig add eth0 20 vconfig add eth0 30 Now, whenever eth0 comes up, you&#8217;ll have the interfaces eth0.20 and eth0.30.  You [...]]]></description>
			<content:encoded><![CDATA[<p>My home network has a Linux box running IPTables as it&#8217;s center point, and, since there are four networks, it has 4 NICs and 4 cables into the switch.  I kept running into problems with the NICs (they would reorder depending on what flavor of Linux was installed), so I wanted to consolidate the NICs down to 2 &#8212; one for the Internet link and one for the LAN segments with <a title="Wikipedia.com -- IEEE 802.1q" href="http://en.wikipedia.org/wiki/IEEE_802.1Q">802.1q tagging</a>.</p>
<p><span style="text-decoration: line-through;">Disclosure:  I have only labbed this stuff out, and it seems to work, but I have yet to implement it.  Use at your own risk in the wild.</span></p>
<p>Configuring VLAN tagging on Linux is pretty simple, actually.  One way to do it is to use the <em>vconfig </em>command to add and remove VLANs from interfaces.  As a demonstration, say you want to run VLANs 20 and 30 on eth0.  You would just do something like this.  Note that the interface you mention here has to be in an <em>UP </em>state, so do an <em>ifconfig eth0 up</em> if you need to get it into a good state.</p>
<blockquote><p>vconfig add eth0 20<br />
vconfig add eth0 30</p></blockquote>
<p>Now, whenever eth0 comes up, you&#8217;ll have the interfaces eth0.20 and eth0.30.  You can give them IP addresses through the command line with <em>ifconfig</em>.</p>
<blockquote><p>ifconfig eth0.20 192.168.20.1 netmask 255.255.255.0 up<br />
ifconfig eth0.30 192.168.30.1 netmask 255.255.255.0 up</p></blockquote>
<p>I didn&#8217;t expect them to do so, but the IP addresses actually stay across network restarts; as long on the physical interface comes up, the VLANs come up with IPs and everything.  Speaking of network restarts, the &#8220;downfall&#8221; with using vconfig is that VLAN interfaces don&#8217;t show as coming up or going down during network restarts;  I don&#8217;t like that at all.</p>
<p>Another way to configure the VLANs is through the old-fashioned <em>network-scripts</em> directory.  Copy your interface config (<em>ifcfg-eth0</em>) to the same name but with the VLAN extension (<em>ifcfg-eth0.20</em>) and edit it.  Change the device field appropriately along with the IP address subnet mask info.  For the final touch, at the end of the file, add this line.</p>
<blockquote><p>VLAN=yes</p></blockquote>
<p>Personally, this is the way I would do it.  It lets you change configurations through the configuration files just like physical interfaces instead of trusting the configuration that resides out in the ether that is the Linux kernel.  Also, when you restart network, the interface itself actually goes up and down, so you can see what&#8217;s going on with it.  If you need some help with this, check out <a title="Redhat.com -- Interface Configuration Files" href="http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/ref-guide/s1-networkscripts-interfaces.html">Redhat&#8217;s manual</a> on it.  Let me know if you&#8217;re still having problems with it.</p>
<p>Remember to set the box&#8217;s switch port to a matching 802.1q <a title="AConaway.com -- Trunking" href="http://aconaway.com/category/lan/switching/trunking/">trunk</a>.  You&#8217;ve seen that before, but here&#8217;s a refresher, assuming the Linux box is plugged into f0/1 on the switch.</p>
<blockquote><p>int f0/1<br />
switchport<br />
switchport trunk encapsulation dot1q<br />
switchport mode trunk</p></blockquote>
<p>To check the status of your VLANs, look in <em>/proc/net/vlan</em>.  You&#8217;ll see the <em>config </em>file, which lists all your VLANs.  You&#8217;ll also see a device file (like eth0.20) with the statistics for that VLAN device (interface).</p>
<p>Let&#8217;s talk security, though.  First of all, I could argue that a Linux box shouldn&#8217;t be participating in any trunking at all.  There will be exceptions, but, in my experience, a Linux box (read: server) should only be on one network at a time and shouldn&#8217;t straddle networks.  Do you really trust the Linux guys to keep their boxes from doing bad things on more than one network? I don&#8217;t. Heh.</p>
<p>If, however, you need to use VLANs on a Linux box, you&#8217;ll need to make sure you have only the proper VLANs running across this port (like we did with the <a title="AConaway.com -- Configuring Dedicated Trunks for the CSM" href="http://aconaway.com/2008/11/24/configuring-dedicated-trunks-for-the-csm/">CSM VLAN</a>).  If a box were to be compromised, the bad guy could simply start adding VLANs to the server and suddenly get around your routers and firewalls.  Awesome, right?  Make sure you put in the <em>switchport trunked allowed vlan x </em>directive so the server only has access to those VLANs.</p>
<p>As always, send me any <span style="text-decoration: line-through;">four-leaf clovers</span> questions you have.</p>
<p><span style="text-decoration: line-through;">P.S.:  For the record, since I haven&#8217;t tried this in the field yet, I can&#8217;t tell you how well it works with IPTables, but, from what I&#8217;ve been reading, it should work fine.  Good luck.</span></p>
<p>For the record, I&#8217;ve got this working at my house connected to a Cisco Catalyst 2950 trunk port.  I&#8217;m happy to report that it works like a champ with IPTables and everything.</p>
<div class="wp-about-author-containter-around" style="background-color:#ffffff;"><div class="wp-about-author-pic"><img alt='' src='http://1.gravatar.com/avatar/14352aa939196349e4b9f2a272ca5112?s=100&amp;d=&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-about-author-text"><h3><a href='http://aconaway.com/author/jac/' title='Aaron Conaway'>Aaron Conaway</a></h3><p>I like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.</p><p><a href='http://aconaway.com' title='Aaron Conaway'>Website</a> - <a href='http://aconaway.com/author/jac/' title='More posts by Aaron Conaway'>More Posts</a> </p></div></div>]]></content:encoded>
			<wfw:commentRss>http://aconaway.com/2009/02/19/vlans-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unix Epoch + 1234567890 = Next Friday</title>
		<link>http://aconaway.com/2009/02/03/unix-epoch-1234567890-next-friday/</link>
		<comments>http://aconaway.com/2009/02/03/unix-epoch-1234567890-next-friday/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 16:20:32 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[epoch]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://aconaway.com/?p=196</guid>
		<description><![CDATA[I&#8217;m kind of an obsessive-compulsive when it comes to numbers (1, 2, 3, 4, 5&#8230;), so I&#8217;m fairly excited about next Friday (..6, 7, 8, 9, 10&#8230;) when Epoch time reaches 1234567890 at 18:31:30 on 13 February(&#8230;11, 12, 13, 14, 15&#8230;).  I&#8217;m sure my ADD will kick in (Oh, look.  A squirrel!) right before, but I&#8217;ll try to remember to run to a Linux box and type date +%s (&#8230;16, 17, 18, 19, 20!  Made it!). Aaron ConawayI like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.Website - More Posts]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m kind of an <a title="Wikipedia.com -- OCD" href="http://en.wikipedia.org/wiki/Obsessive-compulsive_disorder">obsessive-compulsive</a> when it comes to numbers (1, 2, 3, 4, 5&#8230;), so I&#8217;m fairly excited about next Friday (..6, 7, 8, 9, 10&#8230;) when <a title="MatthewHelmke.net -- Unix Time - 1234567890" href="http://matthewhelmke.net/2009/01/15/unix-time-1234567890/">Epoch time reaches 1234567890</a> at 18:31:30 on 13 February(&#8230;11, 12, 13, 14, 15&#8230;).  I&#8217;m sure my ADD will kick in (<a title="CrazyDotTshirts.com - Shirts Built By Dog Robots" href="http://www.crazydogtshirts.com/servlet/the-1135/squirrel-t-dsh-shirt,-funny-shirt,/Detail">Oh, look.  A squirrel!</a>) right before, but I&#8217;ll try to remember to run to a Linux box and type <em>date +%s</em> (&#8230;16, 17, 18, 19, 20!  Made it!).</p>
<div class="wp-about-author-containter-around" style="background-color:#ffffff;"><div class="wp-about-author-pic"><img alt='' src='http://1.gravatar.com/avatar/14352aa939196349e4b9f2a272ca5112?s=100&amp;d=&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-about-author-text"><h3><a href='http://aconaway.com/author/jac/' title='Aaron Conaway'>Aaron Conaway</a></h3><p>I like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.</p><p><a href='http://aconaway.com' title='Aaron Conaway'>Website</a> - <a href='http://aconaway.com/author/jac/' title='More posts by Aaron Conaway'>More Posts</a> </p></div></div>]]></content:encoded>
			<wfw:commentRss>http://aconaway.com/2009/02/03/unix-epoch-1234567890-next-friday/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Leap Second</title>
		<link>http://aconaway.com/2009/01/02/leap-second/</link>
		<comments>http://aconaway.com/2009/01/02/leap-second/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 14:34:48 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://aconaway.com/?p=179</guid>
		<description><![CDATA[Did anyone notice (or care about) the leap second?  I did neither.  Here&#8217;s some cool output from Kevin Oberman on the NANOG list, though. bash-2.05b# date Thu Jan  1 00:59:58 CET 2009 bash-2.05b# date Thu Jan  1 00:59:59 CET 2009 bash-2.05b# date Thu Jan  1 00:59:60 CET 2009 bash-2.05b# date Thu Jan  1 01:00:00 CET 2009 bash-2.05b# date Thu Jan  1 01:00:01 CET 2009 bash-2.05b# Aaron ConawayI like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.Website - More Posts]]></description>
			<content:encoded><![CDATA[<p>Did anyone notice (or care about) the leap second?  I did neither.  Here&#8217;s some cool output from Kevin Oberman on the <a title="NANOG.org -- Welcoem to NANOG!" href="http://nanog.org/">NANOG </a>list, though.</p>
<blockquote><p>bash-2.05b# date<br />
Thu Jan  1 00:59:58 CET 2009<br />
bash-2.05b# date<br />
Thu Jan  1 00:59:59 CET 2009<br />
bash-2.05b# date<br />
Thu Jan  1 00:59:60 CET 2009<br />
bash-2.05b# date<br />
Thu Jan  1 01:00:00 CET 2009<br />
bash-2.05b# date<br />
Thu Jan  1 01:00:01 CET 2009<br />
bash-2.05b#</p></blockquote>
<div class="wp-about-author-containter-around" style="background-color:#ffffff;"><div class="wp-about-author-pic"><img alt='' src='http://1.gravatar.com/avatar/14352aa939196349e4b9f2a272ca5112?s=100&amp;d=&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-about-author-text"><h3><a href='http://aconaway.com/author/jac/' title='Aaron Conaway'>Aaron Conaway</a></h3><p>I like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.</p><p><a href='http://aconaway.com' title='Aaron Conaway'>Website</a> - <a href='http://aconaway.com/author/jac/' title='More posts by Aaron Conaway'>More Posts</a> </p></div></div>]]></content:encoded>
			<wfw:commentRss>http://aconaway.com/2009/01/02/leap-second/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free and Awesome Network Tools</title>
		<link>http://aconaway.com/2007/11/17/free-and-awesome-network-tools/</link>
		<comments>http://aconaway.com/2007/11/17/free-and-awesome-network-tools/#comments</comments>
		<pubDate>Sun, 18 Nov 2007 01:39:44 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://aconaway.com/2007/11/17/free-and-awesome-network-tools/</guid>
		<description><![CDATA[We all have limited budgets these days. Long gone are the days of unlimited resources and uncontrollable expansion of the network, so it&#8217;s important that any network dude or dudette pay attention to the open-source world. Below is a list of stuff I use at the office and at home to monitor, trend, and alert the network. All this stuff is free and runs on Linux to save even more cash. Cacti &#8211; This is a system for trending pretty much anything. If it has an SNMP value, Cacti can trend it. It&#8217;s also really flexible, allowing multiple displays of data and even a mechanism to get values from scripts you write. At the office, we use it to monitor utilization of the circuit and Ethernet ports, CPU and memory of the gear, and the number of connections on the load-balancer. At home, I use it to watch utilization and track the number of connections to the wireless networks. Nagios &#8211; This is a monitoring and alerting system for all sorts of stuff. It watches hosts and applications for availability and response time, then alerts based on threshold. This is one of the most complicated apps to configure, but, once [...]]]></description>
			<content:encoded><![CDATA[<p>We all have limited budgets these days.  Long gone are the days of unlimited resources and uncontrollable expansion of the network, so it&#8217;s important that any network dude or dudette pay attention to the open-source world.  Below is a list of stuff I use at the office and at home to monitor, trend, and alert the network.  All this stuff is free and runs on Linux to save even more cash.</p>
<ul>
<li><a href="http://cacti.net/" title="Cacti -- Home Page">Cacti </a>&#8211;  This is a system for trending pretty much anything.  If it has an SNMP value, Cacti can trend it.  It&#8217;s also really flexible, allowing multiple displays of data and even a mechanism to get values from scripts you write.  At the office, we use it to monitor utilization of the circuit and Ethernet ports, CPU and memory of the gear, and the number of connections on the load-balancer.  At home, I use it to watch utilization and track the number of connections to the wireless networks.</li>
<li><a href="http://www.nagios.org/" title="Nagios -- Home Page">Nagios </a>&#8211; This is a monitoring and alerting system for all sorts of stuff.  It watches hosts and applications for availability and response time, then alerts based on threshold.  This is one of the most complicated apps to configure, but, once it&#8217;s  up, it rocks.  I use it at home to monitor all the network gear and systems for response times. I also use it to monitor the web servers and restart them if they&#8217;re down.</li>
<li><a href="http://www.apache.org/" title="Apache -- Home Page">Apache </a>&#8211;  You know what Apache is.  You use it already.  About 71% of webservers on the Internet are Apache.</li>
<li><a href="http://www.squid-cache.org/" title="Squid -- Home Page">Squid </a>&#8211;  A caching proxy server by the same guys who do Apache.  It can be configured for both inbound and outbound application acceleration.  It&#8217;s great to put in front of a CMS like Drupal or Joomla.  It has a mess of built-in functions that can look for bad requests, do redirects, or completely rewrite requests. At work, it fronts our application and CMS servers so users don&#8217;t have access directly to them. At home, it runs on the firewall to serve pages to the Internet.  The real webserver actually sits on a box behind the firewall for security.</li>
<li><a href="http://subversion.tigris.org/" title="Subversion -- Home Page">Subversion </a>&#8211; This is a version control system. Subverions lets you create repositories, check out the contents, edit them, and check them back in.  This is good for keeping track of configuration files or scripts you write.  We use it at work to track configuration files for Apache, NTP, yum, etc.  At home, I use it to keep track of my scripts and <a href="http://ntci.sourceforge.net" title="NTCI -- Sourceforge Page">Perl module</a>.</li>
<li><a href="http://www.shrubbery.net/rancid/" title="Shrubbery Networks -- Rancid">Rancid </a>&#8211; This is configuration management for Cisco (and other network) devices.  It gets configs from devices and checks them for changes.  It&#8217;s got built-in alerting and is easy to set up.  I use it at home to keep track of the configs on the switches and access points.</li>
<li><a href="http://nfsen.sourceforge.net/" title="nfsen -- Sourceforge Page">nfsen</a>/<a href="http://nfdump.sourceforge.net/" title="nfdump -- Sourceforge Page">nfdump </a>&#8211; These are [tag]netflow[/tag] tools.  Nfdump is a suite for collecting the data, while nfsen is for displaying the information.  Check out netflow if you&#8217;ve never worked with it&#8230;it&#8217;s pretty cool.</li>
<li><a href="http://www.ipflow.utc.fr/index.php/Cisco_7200_Simulator" title="Dynamips -- Home Page">Dyanmips</a>/<a href="http://www.dynagen.org/" title="Dynagen -- Home Page">dynagen </a>&#8211; These apps let you run virtual Cisco routers on a machine.  You can set up full network deployments for testing and configuration experimentation.  It takes a good bit of resources, but it&#8217;s well worth it for the functionality.  I use it all the time at work to test or tweak configs.  I also use it to simulate certification labs.</li>
</ul>
<div class="wp-about-author-containter-around" style="background-color:#ffffff;"><div class="wp-about-author-pic"><img alt='' src='http://1.gravatar.com/avatar/14352aa939196349e4b9f2a272ca5112?s=100&amp;d=&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-about-author-text"><h3><a href='http://aconaway.com/author/jac/' title='Aaron Conaway'>Aaron Conaway</a></h3><p>I like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.</p><p><a href='http://aconaway.com' title='Aaron Conaway'>Website</a> - <a href='http://aconaway.com/author/jac/' title='More posts by Aaron Conaway'>More Posts</a> </p></div></div>]]></content:encoded>
			<wfw:commentRss>http://aconaway.com/2007/11/17/free-and-awesome-network-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Simple BGP Lab with Dynamips/Dynagen</title>
		<link>http://aconaway.com/2007/11/09/a-simple-bgp-lab-with-dynamipsdynagen/</link>
		<comments>http://aconaway.com/2007/11/09/a-simple-bgp-lab-with-dynamipsdynagen/#comments</comments>
		<pubDate>Sat, 10 Nov 2007 04:23:38 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://aconaway.com/2007/11/09/a-simple-bgp-lab-with-dynamipsdynagen/</guid>
		<description><![CDATA[I assume you take every word I say to heart and that you&#8217;ve been using Dynamips/Dynagen for a few days now, right? Good. That&#8217;s a start, but let&#8217;s break down a simple lab to make sure everyone&#8217;s on the same page. I run my labs on Linux most of the time, so you&#8217;ll see my commands for that platform. You&#8217;re a smart one, so you can figure out what to do on Windows. :) First of all, everyone download the lab file. This is a very simple lab that I created to do some experimentation with BGP. I modified it a bit to save resources for the general public, though; it&#8217;s a lot easier to run 2 2651XMs than 2 7206s, right? Let&#8217;s go through the lines. autostart = False [localhost] Yes, that means don&#8217;t start up the routers when you fire up dynagen. The second line is the dynamips server you want to use. This will always be localhost unless you&#8217;re leveraging another box to use as the emulator. That&#8217;s an advanced topic that I&#8217;m not going to cover right now, though. [[2651XM]] image = /home/jac/labs/images/c2600-adventerprisek9-mz.124-17.img ram = 96 These lines define the parameters for any 2651Xm that we&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>I assume you take every word I say to heart and that you&#8217;ve been using Dynamips/Dynagen for a few days now, right?  Good.  That&#8217;s a start, but let&#8217;s break down a simple lab to make sure everyone&#8217;s on the same page.  I run my labs on Linux most of the time, so you&#8217;ll see my commands for that platform.  You&#8217;re a smart one, so you can figure out what to do on Windows.  :)</p>
<p>First of all, everyone download <a href="http://aconaway.com/static/labs/bgp/bgp.net" title="AConaway.com -- BGP Lab">the lab file</a>.  This is a very simple lab that I created to do some experimentation with BGP.  I modified it a bit to save resources for the general public, though; it&#8217;s a lot easier to run 2 2651XMs than 2 7206s, right?  Let&#8217;s go through the lines.</p>
<blockquote><p>autostart = False<br />
[localhost]</p></blockquote>
<p>Yes, that means don&#8217;t start up the routers when you fire up dynagen.  The second line is the dynamips server you want to use.  This will always be localhost unless you&#8217;re leveraging another box to use as the emulator.  That&#8217;s an advanced topic that I&#8217;m not going to cover right now, though.</p>
<blockquote><p>[[2651XM]]<br />
image = /home/jac/labs/images/c2600-adventerprisek9-mz.124-17.img<br />
ram = 96</p></blockquote>
<p>These lines define the parameters for any 2651Xm that we&#8217;ll be using.  The image file is the actual IOS image to use. I can&#8217;t provide an IOS file for you, so you&#8217;ll have to download one yourself and change this line to where you put the file.  Guess what the &#8220;ram&#8221; line is.  Wow&#8230;you&#8217;re a genius if you said it was the amount of RAM to give each 2651XM.  :)</p>
<blockquote><p>[[ROUTER R1]]<br />
s0/0 = R2 s0/0<br />
f0/0 = LAN 1<br />
model = 2651XM</p>
<p>[[ROUTER R2]]<br />
f0/0 = LAN 2<br />
model = 2651XM</p></blockquote>
<p>Here&#8217;s the meat of the lab.  We&#8217;re creating 2 2651XMs, called R1 and R2, that each have s0/0 and f0/0 interfaces.</p>
<p>The 2651XM has 2 FastEthernets, so, when you fire up the lab, the routers will have those interfaces, but we don&#8217;t care about f0/1 in the scope of this lab.  We&#8217;ll just ignore it for now.  The &#8220;LAN&#8221; keyword in the f0/0 lines tell how you want the FastEthernets cabled up.  We&#8217;re trying to do BGP here, so the FastEthernet interfaces are connected to different network (R1 to LAN 1 and R2 to LAN 2).</p>
<p>Notice that, in the R1 configuration, we say that R1&#8242;s s0/0 is connected to R2&#8242;s s0/0.  This lets the routers talk across the serial interfaces in the virtual world.  In our lab, this is the link that we&#8217;re going to run BGP over to share the paths to the f0/0 interfaces.  Very simple setup.</p>
<p>So, let&#8217;s fire this guy up.  First, make sure you&#8217;ve started your dynamips server.   I run mine in a <a href="http://en.wikipedia.org/wiki/GNU_Screen" title="Wikipedia -- Screen">screen</a> session to get it out of the way, but it&#8217;s your choice.  Run &#8220;dynamips -H 7200&#8243; to get going and listening on port 7200.  When that&#8217;s up and running, you simply run dynagen against your lab file with a &#8220;dynagen bgp.net&#8221;.</p>
<p>If everything is right, you&#8217;ll be see the &#8220;=&gt;&#8221; prompt.  Remember that we set autostart to false, so we have to start up our routers.  You can type &#8220;start R1&#8243; and &#8220;start R2&#8243; to get them going, but it can be easier to do a &#8220;start /all&#8221;.  You may run into problems with CPU or memory if you do that, though, so be careful.</p>
<p>If you do a &#8220;list&#8221; at the dynagen prompt, you should see both of the routers in a &#8220;running&#8221; state.  That&#8217;s good, but now what?  Time to get on the console.  If you&#8217;re running your lab on your workstation (the box that&#8217;s attached to the keyboard you&#8217;re typing on), you can do a &#8220;console /all&#8221; to bring up all the consoles at once.  If you&#8217;re doing the lab remotely, you&#8217;ll have to telnet to the right port to get a console.  That info&#8217;s in the last column of the &#8220;list&#8221; command.</p>
<p>Now comes the configuration, so get to it.  Configure these guys to share their routes on the f0/0 interface via BGP.  Experiment a little.  Experiment a lot.  You&#8217;re not going to break anything, but remember to save the configuration when you&#8217;re done.  You can reuse the lab later.</p>
<p>&#8212;&#8211;</p>
<p>If you&#8217;re lazy, you can use the configs that I used for this lab.  They&#8217;re very, very simple, but they work.</p>
<ul>
<li><a href="http://aconaway.com/static/labs/bgp/R1.cfg" title="AConaway.com -- R1 Config for BGP Lab">R1</a></li>
<li><a href="http://aconaway.com/static/labs/bgp/R2.cfg" title="AConaway.com -- R2 Config for BGP Lab">R2</a></li>
</ul>
<div class="wp-about-author-containter-around" style="background-color:#ffffff;"><div class="wp-about-author-pic"><img alt='' src='http://1.gravatar.com/avatar/14352aa939196349e4b9f2a272ca5112?s=100&amp;d=&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-about-author-text"><h3><a href='http://aconaway.com/author/jac/' title='Aaron Conaway'>Aaron Conaway</a></h3><p>I like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.</p><p><a href='http://aconaway.com' title='Aaron Conaway'>Website</a> - <a href='http://aconaway.com/author/jac/' title='More posts by Aaron Conaway'>More Posts</a> </p></div></div>]]></content:encoded>
			<wfw:commentRss>http://aconaway.com/2007/11/09/a-simple-bgp-lab-with-dynamipsdynagen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Finding Hosts on Layer 2</title>
		<link>http://aconaway.com/2007/09/27/44/</link>
		<comments>http://aconaway.com/2007/09/27/44/#comments</comments>
		<pubDate>Thu, 27 Sep 2007 13:32:58 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://aconaway.com/2007/09/27/44/</guid>
		<description><![CDATA[Most firewalls should block [tag]ICMP[/tag] requests to them, so how do you know that your router or server has layer-2 connectivity to one? It&#8217;s pretty elementary, actually, but I&#8217;ve found that not a lot of people know this trick. If you ping the firewall, it will receive the ICMP packet and drop it per the rulebase. In this process, though, the firewall has to answer [tag]ARP[/tag] requests, which will be stored in the router or server&#8217;s ARP table. If you see it in there, you have connectivity. On [tag]IOS[/tag]: show arp On [tag]Linux[/tag]: /sbin/arp -an This won&#8217;t help you if you&#8217;re not on the same network as the firewall, but it&#8217;s very helpful &#8212; especially if the firewall group is separate from the group you&#8217;re in. These commands have saved me a lot of time by not having to get a bunch of people on the phone to sniff packets as I generate them only to find that the firewall isn&#8217;t talking to my router. Aaron ConawayI like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.Website - More Posts]]></description>
			<content:encoded><![CDATA[<p>Most firewalls should block [tag]ICMP[/tag] requests to them, so how do you know that your router or server has layer-2 connectivity to one?  It&#8217;s pretty elementary, actually, but I&#8217;ve found that not a lot of people know this trick.  If you ping the firewall, it will receive the ICMP packet and drop it per the rulebase.  In this process, though, the firewall has to answer [tag]ARP[/tag] requests, which will be stored in the router or server&#8217;s ARP table.  If you see it in there, you have connectivity.</p>
<p>On [tag]IOS[/tag]:</p>
<blockquote><p>show arp</p></blockquote>
<p>On [tag]Linux[/tag]:</p>
<blockquote><p>/sbin/arp -an</p></blockquote>
<p>This won&#8217;t help you if you&#8217;re not on the same network as the firewall, but it&#8217;s very helpful &#8212; especially if the firewall group is separate from the group you&#8217;re in.  These commands have saved me a lot of time by not having to get a bunch of people on the phone to sniff packets as I generate them  only to find that the firewall isn&#8217;t talking to my router.</p>
<div class="wp-about-author-containter-around" style="background-color:#ffffff;"><div class="wp-about-author-pic"><img alt='' src='http://1.gravatar.com/avatar/14352aa939196349e4b9f2a272ca5112?s=100&amp;d=&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-about-author-text"><h3><a href='http://aconaway.com/author/jac/' title='Aaron Conaway'>Aaron Conaway</a></h3><p>I like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.</p><p><a href='http://aconaway.com' title='Aaron Conaway'>Website</a> - <a href='http://aconaway.com/author/jac/' title='More posts by Aaron Conaway'>More Posts</a> </p></div></div>]]></content:encoded>
			<wfw:commentRss>http://aconaway.com/2007/09/27/44/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a Linux Box as a File Server</title>
		<link>http://aconaway.com/2007/08/29/using-a-linux-box-as-a-file-server/</link>
		<comments>http://aconaway.com/2007/08/29/using-a-linux-box-as-a-file-server/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 01:15:36 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://aconaway.com/2007/08/29/using-a-linux-box-as-a-file-server/</guid>
		<description><![CDATA[Ever heard of Samba? You should. Samba is an open-source project &#8220;that provides seamless file and print services to SMB/CIFS clients.&#8221; That&#8217;s from the project&#8217;s website, but what the hell does it mean? In a nutshell, it&#8217;s an open-source application that lets non-Windows machines share files and printers with Windows machines. In most cases, people use Samba to share files on a Linux box in a really simple setup. I&#8217;ve read about several cases, though, where superhuman admins have used Samba machines to set up a Windows domain. I&#8217;m talking full-scale domain login, domain machine registration, and everything. I tried that once and all my Windows machines stopped working. It sucked. I&#8217;m going to be lazy again and not tell you how to configure it. Or am I smart and efficient and saving it for another article? Either way, I wanted to talk about what Samba can get you. Samba lets you provide a way to store files on a network share. If you set up a share for everyone to use, everyone can edit an address spreadsheet or view a home inventory sheet. You can set up Samba to share your home directories to every machine on the network. [...]]]></description>
			<content:encoded><![CDATA[<p>Ever heard of <a href="http://us3.samba.org/samba/" title="Samba -- Official Site">Samba</a>?  You should.</p>
<p>Samba is an open-source project &#8220;that provides seamless file and print services to SMB/CIFS clients.&#8221; That&#8217;s from the project&#8217;s website, but what the hell does it mean?  In a nutshell, it&#8217;s an open-source application that lets non-Windows machines share files and printers with Windows machines.  In most cases, people use Samba to share files on a Linux box in a really simple setup.  I&#8217;ve read about several cases, though, where superhuman admins have used Samba machines to set up a <a href="http://www.samba.netfirms.com/PDC.htm" title="Using Samba as a Domain Controller">Windows domain</a>.  I&#8217;m talking full-scale domain login, <a href="http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/domain-member.html" title="Samba -- Machine Trust Accounts">domain machine registration</a>, and everything.  I tried that once and all my Windows machines stopped working.  It sucked.</p>
<p>I&#8217;m going to be lazy again and not tell you how to configure it.  Or am I smart and efficient and saving it for another article?  Either way, I wanted to talk about what Samba can get you.  Samba lets you provide a way to store files on a network share.  If you set up a share for everyone to use, everyone can edit an address spreadsheet or view a home inventory sheet.  You can set up Samba to share your home directories to every machine on the network.   Everything&#8217;s on the same machine.  Think about that for a second.  If everyone&#8217;s files are on the same box, it&#8217;s easy as pie to back everything up, and, since everything&#8217;s on the network, you can have access to your stuff from everywhere.</p>
<p>I use Samba for file sharing.  Home directories for me and the wife are shared out to local drives on our laptops.  If I log in to hers and I see my home drive.  I also took some time and put in a <a href="http://www.highpoint-tech.com/" title="Highpoint Tech -- Official Page">Highpoint Tech </a>1740 with <a href="http://flickr.com/photos/aconaway/614715051/" title="Flickr -- My File Server Guts">a set of 4 300G SATA drives attached to it</a> (hot-swappable and full fault-tolerant, by the way).  These guys are put into a RAID5 array to provide about 900G of space to the operating system.  I used Logical Volume Manager to split this beast up into a bunch of different volumes &#8212; images, music, videos, and a share.  Samba shares all these guys out, and our machines have each of these mapped to a drive.  When the wife has new images to share, she just drops them on the images drive.  When I finish a new video, I drop them in the videos drive.</p>
<p>Samba works well and is easy to set up.  Give it a try.  It doesn&#8217;t really scale very well, though, so using it in an enterprise may cause problems.  There&#8217;s a whole new article brewing in there about file locking and sharing, but I won&#8217;t go there yet.</p>
<p>&#8212;-</p>
<p>Remember that I mentioned backing stuff up if everything&#8217;s on the same box?  It&#8217;s not related to Samba technically, but  I wrote a quick and dirty bash script that takes a list of directories and tars them all up to a 400G external drive I have attached to the file server.  If I didn&#8217;t implement Samba, I&#8217;d really have no easy way to back it all up in one fell swoop.</p>
<div class="wp-about-author-containter-around" style="background-color:#ffffff;"><div class="wp-about-author-pic"><img alt='' src='http://1.gravatar.com/avatar/14352aa939196349e4b9f2a272ca5112?s=100&amp;d=&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-about-author-text"><h3><a href='http://aconaway.com/author/jac/' title='Aaron Conaway'>Aaron Conaway</a></h3><p>I like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.</p><p><a href='http://aconaway.com' title='Aaron Conaway'>Website</a> - <a href='http://aconaway.com/author/jac/' title='More posts by Aaron Conaway'>More Posts</a> </p></div></div>]]></content:encoded>
			<wfw:commentRss>http://aconaway.com/2007/08/29/using-a-linux-box-as-a-file-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Port Knocking</title>
		<link>http://aconaway.com/2007/08/11/port-knocking/</link>
		<comments>http://aconaway.com/2007/08/11/port-knocking/#comments</comments>
		<pubDate>Sat, 11 Aug 2007 17:51:05 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://aconaway.com/2007/08/11/port-knocking/</guid>
		<description><![CDATA[A few months ago, a friend of mine told me about the concept of port knocking, where you send packets to a server on certain ports to authenticate access to the box. A daemon running on your server detects the sequence of packets that you send and runs a script (usually IPtables commands), waits a certain amount of time, then runs another script (usually to take the IPtables commands out). This seems like a good way to get access to your home firewall from anywhere without having to open up access to the whole Internet. To set it up, you have to install knock, which is the daemon that listens to the port knocking. Just use yum or apt-get to install it and you&#8217;ll wind up with the configuration file in /etc/knockd.conf. This is where you set up one or more knock sequences to do what you want. I won&#8217;t go into the internals of how it works or how you should set it up but I will go into a few examples. I use port knocking on my home network to protect administrative access to everything on the network. I wrote a custom IPtables script that, when activated, open [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago, a friend of mine told me about the concept of <a href="http://en.wikipedia.org/wiki/Port_knocking" title="Wikipedia Article">port knocking</a>, where you send packets to a server on certain ports to authenticate access to the box.  A daemon running on your server detects the sequence of packets that you send and runs a script (usually IPtables commands), waits a certain amount of time, then runs another script (usually to take the IPtables commands out).  This seems like a good way to get access to your home firewall from anywhere without having to open up access to the whole Internet.</p>
<p>To set it up, you have to install <em>knock</em>, which is the daemon that listens to the port knocking.  Just use <em>yum</em> or <em>apt-get</em> to install it and you&#8217;ll wind up with the configuration file in <em>/etc/knockd.conf</em>.  This is where you set up one or more knock sequences to do what you want.   I won&#8217;t go into the internals of how it works or how you should set it up but I will go into a few examples.</p>
<p>I use port knocking on my home network to protect administrative access to everything on the network.  I wrote a custom IPtables script that, when activated, open access from my IP on the wireless network to SSH (TCP/22) on my firewall, file server, access point, and switch.  After 30 seconds, another script runs, and those rules are removed.  Here&#8217;s an example of a config file that opens up SSH when you hit ports 1234, 5678, 9876, and 5432.  After 30 seconds, it kills the rule.</p>
<blockquote><p> [options]<br />
logfile = /var/log/knockd.log</p>
<p>[openssh]<br />
sequence    = 1234, 5678, 9876, 5432<br />
seq_timeout = 5<br />
tcpflags    = syn<br />
start_command     = -A INPUT -s %IP% -d 192.168.1.1 &#8211;dport 22 -j ACCEPT<br />
cmd_timeout   = 30<br />
stop_command      = -D INPUT -s %IP% -d 192.168.1.1 &#8211;dport 22 -j ACCEPT</p></blockquote>
<p>So, how do you generate these packets?  On my CentOS boxes,  you get the <em>knock</em> command which is the port knocking client.  On Windows, I use <a href="http://sourceforge.net/projects/knockknock/" title="Sourceforge -- KnockKnock"><em>KnockKnock</em></a>.  I have no clue about Macs, but there are lots and lots of clients out there, so just look around and I&#8217;m sure you&#8217;ll find one.</p>
<div class="wp-about-author-containter-around" style="background-color:#ffffff;"><div class="wp-about-author-pic"><img alt='' src='http://1.gravatar.com/avatar/14352aa939196349e4b9f2a272ca5112?s=100&amp;d=&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-about-author-text"><h3><a href='http://aconaway.com/author/jac/' title='Aaron Conaway'>Aaron Conaway</a></h3><p>I like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.</p><p><a href='http://aconaway.com' title='Aaron Conaway'>Website</a> - <a href='http://aconaway.com/author/jac/' title='More posts by Aaron Conaway'>More Posts</a> </p></div></div>]]></content:encoded>
			<wfw:commentRss>http://aconaway.com/2007/08/11/port-knocking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

