Help me regain control of my server logs! (squid logging)
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Help me regain control of my server logs! (squid logging)
Hi there
This has been frustrating me for a while so I hope someone can help. I have a Mandrake machine kernel 2.4.18
I realise that In order to keep track of what is happening on your machine you need to review dmesg, /var/log/messages and /var/log/syslog.
However I use [edit] iptables [/edit] on this server, and I set the log level pretty high so I can keep tabs on my network and Internet usage.
Unfortunately, [edit] iptables [/edit] uses the system logs for logging, rendering them unusable for system administration. Here's an example of what "tail /var/log/messages" looks like:
Try looking at ulogd which is a separate daemon able to handle the logging of firewall rules separate from syslog. It also lets you manipulate the data a little more, though I've never actually used it myself.
Well I have a log parser that allows me to examine my internet usage data, but what I want is to be able to type "dmesg" and NOT have all that stuff come up. There are NO system messages in dmesg unless, you type it IMMEDIATELY and I mean immediately after bootup, before the network traffic gets going.
Unfortunately I'm not a linux "guru." I looked at ulogd but I didn't really understand it's purpose.
In that case, you'll likely need a specialized logging daemon. The standard syslog doesn't really support complex logging like that and really the only way to do it is to have a script parse the log file and pull out the iptables log mesgs. It usually is kind of an ugly hack, so using a specialized logging utility (like ulogd or syslog-ng) is a better solution. Syslog-ng is basically a robust version of the normal system logger, while ulogd interfaces more directly with iptables by using the iptables ULOG target (instead of LOG) which hands the iptables log mesgs over to a set of userland utilities that process them instead of the normal kernel and system logging facility.
But I didn't really understand its website very much. Would all I have to do is install it, then change my IPTABLES to read ULOG whereever it says LOG?
If it's not that easy, do you know of any user manuals or howtos for it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.