In windows we have Base Filtering Engine which helps applications to monitor network traffic. Is there any similar service which runs in Linux too. Something similar to a packet filtering service. I want to filter http links based on mime types contained in their headers.
1 Answer
That would be iptables (built into the kernel). But it is not always a good idea to do application layer stuff with iptables. Maybe squid in an option for you. It can run as a reverse proxy.
-
I googled a bit and had some hands on with "libnetfilter_queue" library. We can only access meta header with this library or iptables. I want to access the http header to look for contents like mime-type, referrer etc. Is it possible at all! Commented Sep 26, 2012 at 13:59
-
I'm sure you can access the whole payload. Reassemble the tcp segments (take care of the sequence numbers) and analyze the resulting stream. Good luck! Really, squid or snort are better approaches to this.– wnrphCommented Sep 26, 2012 at 19:25
-
-
You should post another question on Stackoverflow regarding this.– wnrphCommented Sep 27, 2012 at 9:57