Thank Viktar,
By using '-j ACCEPT', all the packets matching the pattern will be
accept? or just the packets matched will be accepted?
For example, a http request composed of multiple lines, usually 'GET
....' followed by other HTTP header lines. In this case, will all the
http connection traffic be accepted?
And, which is the better way to parse the matched data and write to log
in a user defined format?
Should I use ulogd plugin? Is there any sample show me how to write a
custom log?
Thank again,
Xiong
Viktar Sakovich2038490794 写�:
> On Friday 18 August 2006 13:13 (E-Mail Removed) wrote:
>
> > Hi all,
> >
> > Can anyone give me pointer to how to log http requset to a file by
> > iptables and ulogd?
> > Is there any ulogd plugin can parse the traffic and just log the
> > needed HTTP request information(eg. some http header field)?
> > Some sample source code will be great!
> >
> > Thanks in advance!
> >
> > Xiong
> >
> >
>
> Without ULOG:
> To match some string
> iptables -A INPUT -p tcp --dport 80 -m string --string "Some String"-j
> ACCEPT
>
> or better use l7-filter to match some regex:
> put in /etc/l7-protocols/extra/ httpmypatern.pat with content:
> httpmypatern
> some_rexexp.*
>
> and use
> iptables -A INPUT -p tcp --dport 80 -m layer7 --l7proto httpmypatern -j
> ACCEPT