[fpc-pascal] iptableslogparser released was Re: IPTables log parser?

Reinier Olislagers reinierolislagers at gmail.com
Mon Jan 23 09:20:28 CET 2012


On 19-1-2012 10:51, ik wrote:
> On Thu, Jan 19, 2012 at 11:37, Reinier Olislagers
> <reinierolislagers at gmail.com <mailto:reinierolislagers at gmail.com>> wrote:
>     I noticed ik has started a project to manipulate Linux iptables firewall
>     rules... which got me thinking.
> 
>     Is there any FreePascal/Delphi code lying around to parse IPtables log
>     output (e.g. in the /var/log/messages syslog file), e.g. into CSV
>     format?

I just finished a parser - iptlogtablescsv - in FPC that spits out CSV
files (ran it, ironically enough, on Windows).
https://bitbucket.org/reiniero/smalltools/

It seems to work ok and should compile/run on Linux/OSX/FreeBSD.

Bug reports/improvement requests/patches welcome.

> 
> Not to my knowledge, but there are ways to get the content inside your
> program in
> realtime and do what you wish from it:
> http://netfilter.org/projects/libnetfilter_log/index.html

I wrote my own parser as I am forwarding firewall events from a router
(and possibly other machines in future) to a log host, then parsing the
results, so libnetfilter won't work in that situation.

> If you willing in binding it, and add it to my project/

If I do get around to it, I'll let you know...

Regards,
Reinier



More information about the fpc-pascal mailing list