LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-17-2007, 08:49 PM   #1
esaym
Member
 
Registered: Nov 2006
Distribution: Lots of Debian
Posts: 165

Rep: Reputation: 32
How to prevent local IP's in apache log?


I would like to know how to prevent my local network ip's from showing up in the apache access logs. I can't find any documentation on it. I know there must be a way!


Thanks
Sam
 
Old 02-17-2007, 10:26 PM   #2
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
You can use grep to remove your local ip addresses if you view the logs with cat:
Code:
cat /var/log/apache/access.log | grep -v "192.168"
--Ian
 
Old 02-17-2007, 10:53 PM   #3
esaym
Member
 
Registered: Nov 2006
Distribution: Lots of Debian
Posts: 165

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by IBall
You can use grep to remove your local ip addresses if you view the logs with cat:
Code:
cat /var/log/apache/access.log | grep -v "192.168"
--Ian
Oh I didn't think about that.

However I did find out how to set apache right. I just had to add this to block my network ip's:

Code:
	SetEnvIf Remote_Addr "10\.36\.36" dontlog
	CustomLog /var/log/apache2/access.log combined env=!dontlog
Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I block IP's to prevent unauthorized SSH login attempts? leofoxx Linux - Security 6 05-23-2005 09:36 PM
find out ip's in your local network ody1 Linux - Networking 3 03-23-2005 11:02 AM
stopping specific ip's from accessing apache lawadm1 Linux - Software 7 09-26-2004 02:40 PM
Allow only specific IP's to log to FTP server ganninu Linux - Security 5 12-11-2003 07:26 AM
Apache and Dynamic IP's ranixlb Linux - Networking 3 05-24-2002 01:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration