Skip to contentSkip to conversation

queue and HTTP

DISCUSSION miguel Angel Vazquez 2 participants 2 messages Nov 9, 2006 netfilter

lore
Share & tools
lore
#0 lore raw

Hello mates.

I'm trying to intercept my own HTTP packages in the OUTPUT hook (I don't want to use sniffers or ethereal). For that reason I've decided to use the iptables-queue-modules...recently I can get all the IP-header information using iphdr struct...but now I don't know how to continue in order to get the INFO (HTTP packet).

Maybe using ethernet structs??mmmm Using these structs I think I can get MAC information but I don't know if I can obtain the HTTP packet.

Thanks!

#1 lore raw
Quoted 7 lines · miguel Angel Vazquez

Hello mates.

I'm trying to intercept my own HTTP packages in the OUTPUT hook (I don't want to use sniffers or ethereal). For that reason I've decided to use the iptables-queue-modules...recently I can get all the IP-header information using iphdr struct...but now I don't know how to continue in order to get the INFO (HTTP packet).

payload_offset = iph->ihl * 4 + tcph->doff * 4

Signature · 1 line
The dawn of the fourth age of Linux firewalling is coming; a time of great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris