LinuxQuestions.org
Review your favorite Linux distribution.
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, 03: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
How to save routing table entries? drgowans Linux - Networking 7 02-26-2019 06:16 PM
forced reconnect creates multiple ppp0 entries in snmp table vimico Linux - Networking 0 11-07-2005 05:01 AM
/var/log/messages weird entries blizunt7 Linux - Security 5 11-01-2005 05:56 PM
Adding entries to route table in C? kuronai Programming 2 04-04-2005 02:42 PM
Route table loses entries filth Linux - Networking 3 05-05-2003 05:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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