how to block udp ports I am more of linux and windows user, now forced to use mac as testing device, for testing a webrtc app, I want to block all the UDP ports in my macbook, how do I achieve it from commandline( or some tools)
This is a good tutorial for beginning with "pf", because system preferences do not allow you to enter manual rules.

http://krypted.com/mac-security/a-cheat-sheet-for-using-pf-in-os-x-lion-and-up/ 

I used to use the very good firewall fronted "HandsOff!" by metakine (but they sold it), where you can do what you like, but honestly I do not know whether there is a Yosemite update for that.

Update:
https://www.oneperiodic.com/products/handsoff/