Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
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! –  adnan kamili Sep 26 '12 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. –  artistoex Sep 26 '12 at 19:25
    
How to access the payload –  adnan kamili Sep 27 '12 at 7:04
    
You should post another question on Stackoverflow regarding this. –  artistoex Sep 27 '12 at 9:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.