How To Block Host Files Little Snitch

Rule group subscriptions use a .lsrules file, which is a JSON format specified in this chapter. Such files can be exported using Little Snitch Configuration or created using a text editor or a script.

A simple example

The Windows Hosts file is a file that Windows uses to control and map IP addresses. Dane cook i did my best free mp3 download sites. By editing the Hosts file, Windows can be customized to block or redirect specific websites and even protocols that are used by programs and applications.

How To Block Host Files Little Snitch Free

Let’s start with a simple example that specifies a single rule for allowing software updates for LaunchBar:


A common use case for rule group subscriptions are blocklists that contain a lot of domains, hosts, or IP addresses for which access should be flat out denied. Using the above syntax, you’d have to repeat 'process': 'any' and 'action': 'deny' for each domain, host, or IP address. For thousands of rules, that can lead to unnecessarily large files that in turn lead to unnecessarily large downloads for every single subscriber.

Starting in Little Snitch 4.2, you can use a more compact format that looks like this:

Top-level keys

The top level of an .lsrules file is a JSON dictionary with the following keys:

How To Snitch Properly

  1. While we work on getting our iOS/iPadOS application approved through Apple, the links below are provided for those that wish to use Little Snitch to block ads, trackers, miners, etc. As for the look of the site, we wanted to get something up so those with Little Snitch could start using the rules.
  2. Basic Steps to Uninstall Little Snitch Configuration on Mac. Before uninstalling any app on OS X, you should quite all related running process(es). To quite Little Snitch Configuration, you need to right click on its icon on the Dock, choose the Quit option, and click on the Quit button in the pop-up dialog.
  3. The Windows HOSTS file allows you to block some of this content very easily and for free. However, this is not a complete internet security solution. It is still recommended that you run anti-virus software on your computer and be careful of the websites you visit.
nameStringThe name of the group.
descriptionStringA description of the rule grouop.
rulesArray of DictionariesThe list of rules. See below for rule-level keys.

To efficiently support blocklists, the following keys were added in Little Snitch 4.2:

denied-remote-domainsArray of StringsA list of domain names.
denied-remote-hostsArray of StringsA list of hostnames.
denied-remote-addressesArray of StringsA list of IP addresses. See Anatomy of a rule > Server (remote computer) for supported syntax.
denied-remote-notesStringThe notes that should be repeated for each rule. The placeholder %REMOTE% will be replaced with the respective domain, host, or IP-address for each rule.

You can mix all of these keys in a single .lsrules file, i.e. you can define arbitrary rules in a rules array next to a list of domains in denied-remote-domains and a list of IP addresses in denied-remote-addresses.

Rule keys

Each rule defined in the file is a JSON dictionary with the following keys:

How to get back to mac os from boot camp. You can go back and forth between OS X and Windows on your Mac, but you can’t run both operating systems simultaneously under Boot Camp. Instead, you have to boot one operating system or the other — thus, the name Boot Camp. Restart your Mac, and hold down the Option key until icons for each operating system appear onscreen.

Specifying the process

To define which processes a rule should match, you specify the executable of the process using the following keys:

  • To match any process, use:

    • 'process': 'any'
  • To match a specific process, use:
    • 'process' (String): A String containing the full path to the executable. For apps, this is path to the app’s executable, not the app wrapper. For example: /Applications/
    • 'via' (String, optional): If the rule should only match if the executable uses a specific helper tool, you can specify its path. For example, you could create a rule that matches “Terminal via ping” by setting 'path' to Terminal’s path and 'via' to ping’s path. Note that a rule for Terminal that has no 'via' will also match connections of “Terminal via ping”.

Specifying the remote


The remote for the rule can be specified in multiple ways. You can only provide one of the following keys:

  • 'remote-addresses': A String containing one or more IP addresses in the format described in Anatomy of a rule > Server (remote computer).
  • 'remote-hosts': Either a String with a hostname, or an Array of Strings of hostnames.
  • 'remote-domains': Either a String with a domain name, or an Array of Strings of domain names.
  • 'remote': A String with exactly one of the following values. For a description of each of these values, see Anatomy of a rule > Server (remote computer).
    • 'any'
    • 'local-net'
    • 'multicast'
    • 'broadcast'
    • 'bonjour'
    • 'dns-servers'
    • 'bpf' (Berkeley Packet Filter, available starting in Little Sntich 4.4.3)

Other keys

directionString, optionalThe connection direction. 'incoming' or 'outgoing', defaults to 'outgoing'.
actionString, optionalThe rule action. 'allow', 'deny', or 'ask'. Defaults to 'ask'.
priorityString, optionalThe rule priority. 'regular' or 'high'. Defaults to 'regular'.
disabledBoolean, optionalWhether or not the rule is disabled by default. Defaults to false.
portsString, optionalThe ports the rule matches. Can be 'any' for any port (the default), a single port (e.g. '443'), or a range of ports (e.g. '123-456').
protocolString, optionalThe protocol the rule matches. Can be a numeric value as defined in /etc/protocols, like '6' for TCP, or the actual protocol name, like 'tcp'. Defaults to any protocol.
notesString, optionalThe notes for the rule.

Was this help page useful? Send feedback.
© 2016-2020 by Objective Development Software GmbH