userInThisWorld Asked: 2012-07-30 01:02:42 +0800 CST2012-07-30 01:02:42 +0800 CST 2012-07-30 01:02:42 +0800 CST How do I block a protocol using iptables firewall 772 How to block a specific protocol using iptables firewall? For example block Yahoo messenger? firewall 1 Answers Voted ish 2012-07-30T01:50:39+08:002012-07-30T01:50:39+08:00 Well, in this case you probably want to block the ports Yahoo Messenger uses, not the protocol (which is TCP/UDP, used by almost everything else). Based on this list, I would start with port 5050 outbound and perhaps add more: sudo iptables -A OUTPUT -p tcp --dport 5050 -j DROP Once you have a set of rules that you have determined is sufficient, don't forget to save them with iptables-save (or they will be lost upon reboot).
Well, in this case you probably want to block the ports Yahoo Messenger uses, not the protocol (which is TCP/UDP, used by almost everything else).
Based on this list, I would start with port 5050 outbound and perhaps add more:
Once you have a set of rules that you have determined is sufficient, don't forget to save them with
iptables-save
(or they will be lost upon reboot).