Skip to contentSkip to conversation

HTTP info filter

DISCUSSION [email protected] 3 participants 3 messages Aug 4, 2005 – Aug 5, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

Hi all,

I want to filter an outgoing HTTP request using its info field.
ex : HTTP "GET /toto://hello/xxx"
For every HTTP request with toto in info field, I wan't to get the xxx field. This request can be dropped. Can I do this with iptables ?
Is there another tool for this ?

Thanks in advance for your help,
Joe

-------------------------------------------------------------
NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar... Web/Wap : www.netcourrier.com
Téléphone/Fax : 08 92 69 00 21 (0,34 € TTC/min)
Minitel: 3615 NETCOURRIER (0,16 € TTC/min)

#1 lore raw
Quoted 7 lines

Hi all,

I want to filter an outgoing HTTP request using its info field.
ex : HTTP "GET /toto://hello/xxx"
For every HTTP request with toto in info field, I wan't to get the xxx field. This request can be dropped. Can I do this with iptables ?
Is there another tool for this ?

-j DROP -m layer7 --l7proto mytoto

Have a /etc/l7-protocols/mytoto:
GET /toto://hello/xxx

This will drop these packets, but I currently do not know of a way to capture the xxx for further logging.

Jan Engelhardt

#2 lore raw
Quoted 2 lines · Jan Engelhardt

This will drop these packets, but I currently do not know of a way to capture the xxx for further logging.

One way is to use QUEUE instead of DROP and write a small QUEUE handler application taking care of the logging.

Another is to write your own netfilter target for the logging purpose.

Regards
Henrik