LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 11: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, 12:22 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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 12:23 PM.
 
Old 02-17-2008, 12:24 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,877

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
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, 12:27 PM   #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, 12:36 PM   #5
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,877

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
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, 04: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, 05:09 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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, 05:31 PM   #8
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 03:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration