<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://briansnelson.com/index.php?action=history&amp;feed=atom&amp;title=How_use_GeoIP_on_the_command_line_Centos7</id>
		<title>How use GeoIP on the command line Centos7 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://briansnelson.com/index.php?action=history&amp;feed=atom&amp;title=How_use_GeoIP_on_the_command_line_Centos7"/>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=How_use_GeoIP_on_the_command_line_Centos7&amp;action=history"/>
		<updated>2026-06-04T06:19:50Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://briansnelson.com/index.php?title=How_use_GeoIP_on_the_command_line_Centos7&amp;diff=923&amp;oldid=prev</id>
		<title>Brian: /* GeoIP on Command Line */</title>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=How_use_GeoIP_on_the_command_line_Centos7&amp;diff=923&amp;oldid=prev"/>
				<updated>2018-03-28T23:12:02Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;GeoIP on Command Line&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 23:12, 28 March 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; geoiplookup 209.126.31.213&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; geoiplookup 209.126.31.213&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; GeoIP Country Edition: US, United States&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; GeoIP Country Edition: US, United States&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key briansne_wiki-wiki_:diff:version:1.11a:oldid:922:newid:923 --&gt;
&lt;/table&gt;</summary>
		<author><name>Brian</name></author>	</entry>

	<entry>
		<id>https://briansnelson.com/index.php?title=How_use_GeoIP_on_the_command_line_Centos7&amp;diff=922&amp;oldid=prev</id>
		<title>Brian: Created page with &quot;==How use GeoIP on the command line Centos7==  When parsing logs, I sometimes want to know more information about the ip address.  This can be done using GeoIP and bash.  ===I...&quot;</title>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=How_use_GeoIP_on_the_command_line_Centos7&amp;diff=922&amp;oldid=prev"/>
				<updated>2018-03-28T23:11:43Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;==How use GeoIP on the command line Centos7==  When parsing logs, I sometimes want to know more information about the ip address.  This can be done using GeoIP and bash.  ===I...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==How use GeoIP on the command line Centos7==&lt;br /&gt;
&lt;br /&gt;
When parsing logs, I sometimes want to know more information about the ip address.  This can be done using GeoIP and bash.&lt;br /&gt;
&lt;br /&gt;
===Installing GeoIP===&lt;br /&gt;
&lt;br /&gt;
 yum install GeoIP GeoIP-data&lt;br /&gt;
&lt;br /&gt;
Sad but true, the GeoIP rpms installed are always out of date and need updated.&lt;br /&gt;
&lt;br /&gt;
 geoipupdate&lt;br /&gt;
&lt;br /&gt;
===GeoIP on Command Line===&lt;br /&gt;
&lt;br /&gt;
 geoiplookup 209.126.31.213&lt;br /&gt;
&lt;br /&gt;
 GeoIP Country Edition: US, United States&lt;br /&gt;
&lt;br /&gt;
Now you can check your logs and grab ips that you would like checked.&lt;br /&gt;
&lt;br /&gt;
Get a list of ips that hit your site the most&lt;br /&gt;
&lt;br /&gt;
 # cat /var/log/apache/access_log | awk '{print $1}' | sort | uniq -c | sort -rn | head&lt;br /&gt;
  63292 176.9.50.244&lt;br /&gt;
  45355 75.128.184.187&lt;br /&gt;
  23009 209.126.31.213&lt;br /&gt;
  19214 216.244.66.203&lt;br /&gt;
  17756 216.244.66.250&lt;br /&gt;
  17359 192.240.191.2&lt;br /&gt;
  11685 84.201.133.28&lt;br /&gt;
   8692 23.237.4.26&lt;br /&gt;
   7912 46.229.168.68&lt;br /&gt;
   7854 46.229.168.67&lt;br /&gt;
&lt;br /&gt;
Now use it with geoiplookup&lt;br /&gt;
&lt;br /&gt;
 # for x in $(cat /var/log/apache/access_log | awk '{print $1}' | sort | uniq -c | sort -rn | head | awk '{print $2}'); do echo &amp;quot;IP ADDRESS: &amp;quot; $x; geoiplookup $x; done&lt;br /&gt;
 &lt;br /&gt;
 IP ADDRESS:  176.9.50.244&lt;br /&gt;
 GeoIP Country Edition: DE, Germany&lt;br /&gt;
 IP ADDRESS:  75.128.184.187 &lt;br /&gt;
 GeoIP Country Edition: US, United States&lt;br /&gt;
 IP ADDRESS:  209.126.31.213 &lt;br /&gt;
 GeoIP Country Edition: US, United States&lt;br /&gt;
 IP ADDRESS:  216.244.66.203 &lt;br /&gt;
 GeoIP Country Edition: US, United States&lt;br /&gt;
 IP ADDRESS:  216.244.66.250&lt;br /&gt;
 GeoIP Country Edition: US, United States&lt;br /&gt;
 IP ADDRESS:  192.240.191.2&lt;br /&gt;
 GeoIP Country Edition: US, United States&lt;br /&gt;
 IP ADDRESS:  84.201.133.28&lt;br /&gt;
 GeoIP Country Edition: RU, Russian Federation&lt;br /&gt;
 IP ADDRESS:  23.237.4.26&lt;br /&gt;
 GeoIP Country Edition: US, United States&lt;br /&gt;
 IP ADDRESS:  46.229.168.68&lt;br /&gt;
 GeoIP Country Edition: US, United States&lt;br /&gt;
 IP ADDRESS:  46.229.168.67&lt;br /&gt;
 GeoIP Country Edition: US, United States&lt;br /&gt;
&lt;br /&gt;
Now I know the most popular ip address is from Germany!!&lt;/div&gt;</summary>
		<author><name>Brian</name></author>	</entry>

	</feed>