LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-17-2008, 10:41 AM   #1
nightcat
LQ Newbie
 
Registered: Apr 2007
Posts: 4

Rep: Reputation: 0
Question help with script


looking for a pre written script that I could edit to suite my exact needs. Im trying to keep a log of the other computers on the network(sites visited) and have them emailed to me at the end of the day. Does anyone kow where I can look, Ive searched everywhere, thanks.
 
Old 02-17-2008, 11:22 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Sites visited with your browser? That will be in the history file.

for logging of more general network traffic, take a look here:
http://www.google.com/search?q=log+n...L_enUS177US235

PS: You might also try searching in the Advanced Bash Scripting Guide (free at http://tldp.org)

Last edited by pixellany; 02-17-2008 at 11:23 AM.
 
Old 02-17-2008, 11:24 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Sounds like you would need the browser history from each browser on each machine. So your script will have to cycle through each machine, and each browser hidden folder for each user on each machine.
 
Old 02-17-2008, 11:27 AM   #4
nightcat
LQ Newbie
 
Registered: Apr 2007
Posts: 4

Original Poster
Rep: Reputation: 0
thanks for the help will take a look

Hey Bigrigdriver, I did also think about that issue too which would make the script alot more difficult but I was hoping there was another way. thanks
 
Old 02-17-2008, 11:36 AM   #5
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
There might be an easier way. Assuming the network accesses the internet through only one port in the firewall, you could monitor outbound traffic, watching for URLs, and record them.
 
Old 02-17-2008, 03:48 PM   #6
nightcat
LQ Newbie
 
Registered: Apr 2007
Posts: 4

Original Poster
Rep: Reputation: 0
hmmm good idea. I guess I can start there cause thats the exact same setup that I have. Ill worry about seperating the logs later.
 
Old 02-17-2008, 04:09 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
You might also want to look at forcing all Web traffic through a Squid proxy (can be done via firewall rules or simply blocking port 80 outbound except from the proxy machine and requiring all workstations to connect through it). I haven't ever used Squd, but from what I've hear it has pretty good logging capabilities. Relying on browser histories isn't a good idea because they can be turned off or tampered with by the user.
 
Old 02-17-2008, 04:31 PM   #8
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
We use squid with dansguardian helper which means the client machines are pointed to port 8080 instead of 3128 which squid uses.
Both squid and dansguardian create an access.log which is nice but not very easy to read.
For that reason, I use a perl script to read the access.log and output to html file. Make that executable and run from a crontab ( once and hour for me ).
There is a nice sample at dansguardian add-on section.
I also recommend webmin for thingies like squid and dg. On my fedora box, the paths were incorrect which is easy to fix.

# Also, it needed to have Zlib for Dansguardian logfiles in webmin ...
smart install perl-Compress-Zlib

# I also download a bigger blacklist from
http://squidguard.shalla.de/shallalist.html

# Automate shallalist with this script
shalla_update script

The tampering part is disabled in Active Directory group policy which you can fine tune quite nicely.

To email myself the html file, I use mutt command line as it is nice for attachments ( -a ) and blind carbon copies ( -b )
 
  


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 to execute a ssh script on Linux server from Windows through a bat script? wanna13e Programming 13 10-23-2009 02:41 AM
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
i get an error message running php script inside a cgi script. repolona Linux - Software 0 02-22-2007 09:10 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:30 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