Little Snitch can block internet traffic of a particular app. Can I do something similar without (paying) Little Snitch, either by using free alternatives or configuring the OS X firewall directly?
TCPBlock is a lightweight and fast application firewall … you can prevent selected applications on your computer from opening connections to the network.
TCPBlock is free and can be downloaded from MacUpdate, however TCPBlock doesn't appear to work with El Capitan and is no longer being updated.
OS X comes with the PF firewall, which can be configured to block all connections to certain servers in all apps. Blocking all connections from a single app is not possible as far as I am aware without external software.
You can use IceFloor as a GUI for the PF firewall.
LuLu is a great free, shared-source, macOS firewall that can block unknown outgoing connections, unless explicitly approved by the user. It runs on OSX 10.12+ and runs well on macOS Mojave. It can be configured to allow or block Apple signed binaries and has clear GUI based rule set that can be edited. Whilst it is free users are encouraged to support its development - which seems fair.
Use Radio Silence. Very simple application, but does the job nicely, however it costs $9.
If you know which server an application is trying to contact, and want to stop it from doing so, you can reroute all communication to a bogus IP address (like 0.0.0.0) or just reroute traffic to itself (the local host). You need administrator privileges (sudo) for this to work.
# is a reserved character for starting ignored text. All other lines are parsed in space-separated columns. To stop all connections to facebook (blasphemy!):
# Col 1 Col 2 # "routed to" address hostname (dns) 0.0.0.0 www.facebook.com
Usually the effects are immediate, (like right now I just tried to make sure and it was immediate), but you could unload and reload the multicast dynamic naming service manually.
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
launchctl does not support
systemctl restart avahi-daemon:(. That is why you must run two commands.
Example of default /etc/hosts file
The name "localhost" works because it is routed here to the ip local host standard address of 127.0.0.1. The cool thing is, you could change it. But that‘d be deviant of you!
## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost
TCPBlock still works in OS X Yosemite (although it doesn't seem to work on El Capitan). Install it, restart the machine, open System Preferences and select TCPBlock. Unlock the pane then select the plus icon then Select Applications and choose Adobe Photoshop.
(sorry about download.com link)
I think you can through the firewall as stated in this article:
- Click the System Preferences icon in the Dock.
- Click the Security icon.
- Click the Firewall tab.
- Click the Start button to turn on your firewall.
- Click the Advanced button.
- Click the Automatically Allow Signed Software to Receive Incoming Connections radio button to select it.
This enables the firewall. And, by default, virtually all incoming TCP/IP traffic is blocked. You must enable each sharing method that you want to be able to use. When you enable different sharing methods from the Sharing pane in System Preferences (such as File Sharing or FTP Access), you’ll notice that those types of traffic now appear in the Firewall list. (In other words, when you turn on a sharing method, the firewall automatically allows traffic for that sharing method, which Snow Leopard calls a service.)
Click the up/down arrow icon to the right of any service to specify whether the firewall should allow or block connections.
Sometimes, you might want to allow other traffic through your firewall that isn’t on the firewall list of recognized services and applications. At that point, you can click the Add button (which bears a plus sign) to specify the application that your firewall should allow. Snow Leopard presents you with the familiar Add dialog, and you can choose the application that needs access.