So here is a perfect solution:
What you need:
- linux router for your network
- iptables firewall at least v1.3.7
Here are the rules:
Deny Yahoo Messenger packets:
iptables -I FORWARD -m string --string 'YMSG' --algo bm -j DROP
iptables -I FORWARD -m string --string 'messenger' --algo bm -j DROP
iptables -I FORWARD -m string --string 'meebo' --algo bm -j DROP
iptables -I FORWARD -m string --string 'buddy' --algo bm -j DROP
iptables -I FORWARD -m string --string 'webmessenger' --algo bm -j DROP
iptables -I FORWARD -m string --string 'web-messenger' --algo bm -j DROP
Deny facebook traffic rule:
iptables -I FORWARD -m string --string 'facebook' --algo bm -j DROP
Deny hi5 traffic rule:
iptables -I FORWARD -m string --string 'hi5' --algo bm -j DROP
and so on… you can modify these rules to fit your needs, you just need to edit the –string parameter
--string '
Using this solution to filter specified traffic you don’t have to worry about port, protocol, application , source or destination.
Hope it helps someone.