Is there the equivalent command for Mac OS X?
I don't believe so. They used to have ipfw
and ipfw6
, but that's been marked as deprecated. I have not been able to find a replacement either. See, for example, Firewall and Blocking [More] Traffic.
Essentially, Apple has taken nearly all control away from the users.