Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Hello
Is there a way to get ipchains to log to a seperate file?
At the moment it is logging into /var/log/messages, but I would like it done in a file just for ipchains.
Thank you
Are you familiar with grep, awk, sed, tr and so on?
If not, you might have a look at a logchecker like logcheck ;-) http://www.psionic.com/
And if you are there, you might also take a look at portsentry.
Ok grep is good enough, but I'm also wondering if anyone has come up with a way to do this. It would be a nice feature since I always take a quick look a /var/log and seeing a file called ipchains with a positive file size would be a quick tip off that someone is trying something...
Why do you want to put it in a file? Okay i still prefer the "logchecker" software but you can do it also with a little script.
My firewall logs everything (scans, stealth-scans, connection-attempts etc.) to the /var/log/messages file.
So i would write a little script, that also includes a line like this:
cat messages | grep -i "Packet log:" | awk '{print $12}'
In my case this would give me the ip-address of a poosible intruder. You should finetune this with "sed".
Create a cronjob and wait for mail that will inform you on what's going on!
Thanks. I tried that with no difference. However, I have since discovered that by starting klogd with the ?s option, it forces the system call interface as its messaging source. Now it works.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.