Re: custom netfilter module

From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 09/04/03


Date: Thu, 04 Sep 2003 15:57:23 +0200

Paul Spink wrote:
>
> Hi there,
>
> I am trying to create a module that will examine all HTTP GET requests. My
> problem is whenever I insert my module, it only ever sees the first TCP
> packet of the connection (for the same <source IP:port> / <destination
> IP:port> combination), I never get to see the HTTP GET requests or
> subsequent TCP packets.
>
> The hook is registered on the NF_IP_POST_ROUTING hook. I set skb->nfcache |=
> NFC_UNKNOWN in my hook before returning NF_QUEUE. The queue handler prints
> out the source and destination IPs and ports into the system log, then calls
> nf_reinject with NF_ACCEPT to accept the packets.
>
> Any advice you can give me as to what I am doing wrong? And how I can log
> all the HTTP requests?

AFAIK routing is only done for the first packet of each connection,
afterwards the list of established connections is used for the rest
of the packets. I think you need to put it in the filter table, and
make sure not to put it after a rule that accepts all established
packets.

-- 
Kasper Dupont -- der bruger for meget tid paa usenet.
For sending spam use mailto:aaarep@daimi.au.dk
Their business was zero and it was shrinking.


Relevant Pages

  • Re: Wireless module bcm43xx in 2.6.17 kernel
    ... There is a line in dmesg that says "Cleared all keys" before the card starts sending out sending out dhcp requests, so I'm guessing that is what the problem is. ... I used a packet sniffer to see what was going on and my browser will send http get requests, the site will return a few packets, my browser will continue to send http requests on an intermittent bases because no response is recieved for a while, and then for every occasional packet that is returned in response to the http requests I will also get duplicate packets. ... The only problem I had with it was that every once in a while it would drop a connection if I let the connection sit idle for a while yet my wireless card was reporting a successful connection. ...
    (Debian-User)
  • RE: HTTP DDoS attack on our servers
    ... First guess is that the machines you NMAP'd are victims of W32/Graps ... HTTP DDoS attack on our servers ... Basically,> 8.000 IP numbers are sending HTTP requests to our server on ... handle HTTP requests at all and immediately closed the connection after ...
    (Incidents)
  • Re: Messaging Protocol
    ... Client makes tcp connection to server, sends some data, and waits ... HTTP is probably a good choice. ... that has well defined requests and replies. ...
    (comp.os.linux.networking)
  • Re: Usage based billing
    ... HTTP packets? ... just want to know how to do it, i mean, a successful web download has ... though we're expecting many requests with different request for the ...
    (comp.os.linux.networking)
  • Re: Streaming over http
    ... or does the client send requests? ... So let's assume you mean requests with long ... Protocol-wise you can keep the connection if you use an HTTP ...
    (comp.lang.java.programmer)