Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How to block a specific protocol using iptables firewall? For example block Yahoo messenger?

share|improve this question
add comment

1 Answer 1

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).

share|improve this answer
    
it didn't work :/ –  alsadi90 Jul 29 '12 at 10:14
    
I didn't say it would, you need to find out which ports are being used right now, and if there isn't a current list, use something like Wireshark. It's complicated, sorry... –  izx Jul 29 '12 at 10:15
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.