Forum Moderators: phranque

Message Too Old, No Replies

What is the Net.WhoisIP.log

         

csdude55

4:05 am on Jan 20, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I recently discovered this ~2G log file in my /tmp/ directory (in CentOS). What the heck is it? And how do I make it stop logging?

Using "less", here's an example of the file:


~ less Net.WhoisIP.log
Mon Mar 24 12:55:46 2014|looking up 192.187.106.42|
Mon Mar 24 12:55:46 2014|do lookup 192.187.106.42 at ARIN|
Mon Mar 24 12:55:46 2014|Entering loop 1|
Mon Mar 24 12:55:47 2014|parens match ! NET-192-187-96-0-1 ARIN --> trying again|
Mon Mar 24 12:55:47 2014|parens match ! NET-192-187-106-40-1 ARIN --> trying again|
Mon Mar 24 12:55:47 2014|ip was 192.187.106.42 -- new ip is ! NET-192-187-106-40-1|
Mon Mar 24 12:55:47 2014|registrar was ARIN -- new registrar is ARIN|
Mon Mar 24 12:55:47 2014|Entering loop 2|
Mon Mar 24 12:55:48 2014|sub -- # available at -- https://www.arin.net/whois_tou.html|
Mon Mar 24 12:55:48 2014|sub -- Address -- 201 E. 16th st|
Mon Mar 24 12:55:48 2014|sub -- CIDR -- 192.187.106.40/29|
Mon Mar 24 12:55:48 2014|sub -- City -- North Kansas City|
Mon Mar 24 12:55:48 2014|sub -- Country -- US|
Mon Mar 24 12:55:48 2014|sub -- CustName -- urhostscom|
Mon Mar 24 12:55:48 2014|sub -- NetHandle -- NET-192-187-106-40-1|
Mon Mar 24 12:55:48 2014|sub -- NetName -- DS-106-42-46|
Mon Mar 24 12:55:48 2014|sub -- NetRange -- 192.187.106.40 - 192.187.106.47|
Mon Mar 24 12:55:48 2014|sub -- NetType -- Reassigned|
Mon Mar 24 12:55:48 2014|sub -- OrgAbuseEmail -- security@datashack.net|

Andy Langton

9:06 am on Jan 20, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well, the perl script [metacpan.org] is easy enough to find. Presumably it's from some sort of analytics tracker or similar?

csdude55

8:22 am on Jan 26, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



For any future readers...

Andy is right, this is related to the Net::Whois Perl module, but I can't find any way to turn off the logging feature. The only solution I've come up with is to create a cron as root to truncate the file every so often.

To do so in Linux, go to /etc/crontab and add this to the bottom of the file:


59 1 31 * * root > /tmp/Net.WhoisIP.log


This runs > /tmp/Net.WhoisIP.log (which truncates the file) as "root" at 1:59am on the 31st of the month (so, every other month, skipping months with less than 31 days). You can change those numbers to whatever suits your needs if you want.