Under CentOS, how can I filter traffic by protocol rather than by port?

For example, I would like to filter ftp traffic regardless of the port being used in order to prevent users on the network from using ftp.

I would like to drop the packet, not reject them.

link|improve this question
Why the downvotes? This is a legitimate, although rudimentary, question. – kce Feb 2 at 20:09
Agreed. It seems entirely on target for serverfault. – larsks Feb 2 at 20:15
feedback

1 Answer

up vote 4 down vote accepted

What you are asking about is typically called an "application layer" firewall or "layer 7" firewall because it operates at layer 7 of the OSI model. A layer 7 filter operates by inspecting all packets passing through the firewall in order to identify the protocol in use.

There is a layer 7 classifier available for use with Netfilter, the Linux firewall implementation. It doesn't appear to be an especially active project, but neither is completely stale -- the last update on the main page appears to be from January of last year.

I don't have any personal experience with this module.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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