LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 12-14-2004, 04:45 PM   #1
don_wombat
LQ Newbie
 
Registered: Nov 2004
Posts: 26

Rep: Reputation: 15
filter /etc/messages for certain IP table entries


I have specific iptables chains that if traffic matches, it will drop the packet and log the event. No problem setting that up.

What I want to do is setup a script (perl/.sh or the sort) to filter through /etc/messages and write a seperate logfile with all the information matching the iptables --log-prefix messages. So could I do something like:

grep $RULE /etc/messages > /var/log/iptables.log

Then setup a cron to do this every 24hrs while rotating the file before the update.

Anyone think this will work? I think it should.....
 
  


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
forced reconnect creates multiple ppp0 entries in snmp table vimico Linux - Networking 0 11-07-2005 06:01 AM
/var/log/messages weird entries blizunt7 Linux - Security 5 11-01-2005 06:56 PM
Adding entries to route table in C? kuronai Programming 2 04-04-2005 03:42 PM
How to save routing table entries? drgowans Linux - Networking 6 09-23-2003 03:35 PM
Route table loses entries filth Linux - Networking 3 05-05-2003 06:27 PM


All times are GMT -5. The time now is 03:17 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration