way to flush /var/log/message

Bill Davidsen davidsen at tmr.com
Tue May 22 20:05:12 UTC 2012


Paul Allen Newell wrote:
> On 5/21/2012 5:07 PM, Max Pyziur wrote:
>>
>> One more suggestion; if I understand correctly, you want to tail -f a logfile,
>> but you only want to see certain events; perhaps this is what you need:
>>
>> tail -f /path/to/some/logfile | grep certain_event
>>
>>
>>> Paul
>>>
>>
>>
>> fyi,
>>
>> Max Pyziur
>> pyz at brama.com
>
> Max:
>
> Thanks for email. Actually, I want to be able to see the message in context of
> whats around it as I am still learning about iptables and /var/log/messages. I
> tried a grep and it was even harder to see if anything was happening as I could
> do an action which I knew would leave a message right then and there.
>
> To be honest, now that I found out that the problem with ssh from F16 to Cygwin
> was POM on the Windows side (and notice I am not limiting to just Cygwin
> (smile)), it has become "not so important". But some of the suggestions look
> worth looking at as I've wanted a way to get debug messages out of iptables into
> a file other than /var/log/messages as I try to learn more about usign iptables.
>
 From part of my firewall startup, a few LOG calls wehich might help.

#   LOG and REJECT anything which looks like a probe
iptables -N PROBE
iptables -A PROBE -j LOG --log-level debug --log-prefix PROBE:
iptables -A PROBE -j REJECT --reject-with icmp-host-unreachable



-- 
Bill Davidsen <davidsen at tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot


More information about the users mailing list