Giter Club home page Giter Club logo

littlesnitch-country-blocklists's Introduction

LittleSnitch Country Block Lists

A collection of LittleSnitch rule sets to block outbound connections to a given country.

These lists are not updated regularly and are just for experimentation. If you wish to maintain your own lists, please fork the repo.

Subscribing to lists

You can subscribe to a block list via the LittleSnitch rules UI by following the steps below.

  1. Open the Little Snitch Rules either by opening the application or selecting 'Little Snitch Rules...' from the menu bar icon.
  2. Click the plus symbol found at the bottom left side of the window and select "New Rule Group Subscription...".
  3. From the ./blocklists_by_country directory, choose the lists you want to subscribe to and view as "raw".
  4. Use the raw.githubusercontent.com url as the subscription URL in the Little Snitch UI.
  5. Follow the instructions presented. Note that IP lists can be sizable and can cause LS to slow down for a bit as it loads the blocklist.
  6. After subscribing, make sure to approve all the new rules via the "Unapproved" tab.

Updating lists

Update block lists from MaxMind (all countries)

  1. Install GoLang.
  2. Download "GeoLite2 Country" from https://www.maxmind.com/en/accounts/867497/geoip/downloads and unzip.
  3. Run the following command when converting GeoLite2 CSV files ./maxmind_convert_all.sh ~/path/to/GeoLite2-Country-Locations-en.csv ~/path/to/GeoLite2-Country-Blocks-IPv4.csv

Update block lists from IP2Location (single country)

  1. Install GoLang.
  2. Download a country list in CIDR format from https://www.ip2location.com/free/visitor-blocker.
  3. Run the following command when converting IP2Location single country CIDR list. The country name and code is used in the output filename and LS Rules description. ./ip2location_cidr_list_convert.sh ~/path/to/firewall.txt "{COUNTRY_NAME}" "{COUNTRY_CODE}"

Update block lists from IPInfo (single country)

  1. Install GoLang.
  2. Sign up for an IPInfo account, download the Free Country CSV GZ file from https://ipinfo.io/account/data-downloads and extract.
  3. Run the following command to convert the IPInfo DB into a LittleSnitch blocklist for a single country. The country name and code is used in the output filename and LS Rules description. The country code must match the country code used in the source file. ./ipinfo_convert_single.sh ~/path/to/country.csv "{COUNTRY_NAME}" "{COUNTRY_CODE}"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.