<?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>non-random ramble &#187; httpd</title>
	<atom:link href="http://jimbarritt.com/non-random/category/devops/httpd/feed/" rel="self" type="application/rss+xml" />
	<link>http://jimbarritt.com/non-random</link>
	<description>adventures in code</description>
	<lastBuildDate>Tue, 20 Sep 2011 13:16:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Search http logs for unique IP addresses</title>
		<link>http://jimbarritt.com/non-random/2009/08/27/search-http-logs-for-unique-ip-addresses/</link>
		<comments>http://jimbarritt.com/non-random/2009/08/27/search-http-logs-for-unique-ip-addresses/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 07:23:06 +0000</pubDate>
		<dc:creator>Jim Barritt</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[httpd]]></category>

		<guid isPermaLink="false">http://jimbarritt.com/non-random/2009/08/27/search-http-logs-for-unique-ip-addresses/</guid>
		<description><![CDATA[I recently neeeded to whitelist some IP&#8217;s from my apache server. What I wanted to do is grep my access log (/etc/httpd/logs) for a list of IP addresses that are accessing my application. I cam up with: grep "" .log &#124; cut -c 1-10 &#124; uniq So this was possible because i wanted to find [...]]]></description>
			<content:encoded><![CDATA[<p>I recently neeeded to whitelist some IP&#8217;s from my apache server.</p>
<p>What I wanted to do is grep my access log (/etc/httpd/logs) for a list of IP addresses that are accessing my application.</p>
<p>I cam up with:</p>
<pre>
grep "<something unique about my uri>" <my logfilename>.log | cut -c 1-10 | uniq
</pre>
<p>So this was possible because i wanted to find only people who were actually accessing my URI&#8217;s so i picked something to grep for that was in the base URI of my app.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fjimbarritt.com%2Fnon-random%2F2009%2F08%2F27%2Fsearch-http-logs-for-unique-ip-addresses%2F&amp;title=Search%20http%20logs%20for%20unique%20IP%20addresses" id="wpa2a_2"><img src="http://jimbarritt.com/non-random/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://jimbarritt.com/non-random/2009/08/27/search-http-logs-for-unique-ip-addresses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

