Block Application over Interface

BigToeKnee810
New Contributor II

Hello,

Might be a weird request, but I am looking to block all incoming and outgoing connections from a specific application through a specific interface (like VPN). If anyone is familiar with Windows you can do this by application over the interface. I am looking to do the similar.

Any way to do this?

2 REPLIES 2

thoule
Valued Contributor II

Mac has an application level firewall (ALF) in System Preferences -> Firewall. It does have a command line to configure as well. I haven't used it myself, but here's a weblink to get you started.

http://krypted.com/mac-security/command-line-firewall-management-in-os-x-10-10/

BigToeKnee810
New Contributor II

Unfortunately, this isn't as granular as I would like and you can only block incoming connections. I know macOS uses PF now and I am currently researching how to use that since it is a little more complex.