Skip to content

Source IP filtering

psunix edited this page Jun 16, 2021 · 1 revision

Cryptopus has an included source ip filter for restricting access to certain countries. You need to download the MaxMind IP database to use this feature.

MaxMind IP DB

Cryptopus includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com. To use this Database a license is required. With this database Cryptopus can block IP's from unwanted country's. The license is freely available on the MaxMind Website.

Once a license is acquired, the geo ip db can be installed with rake or automatically in Docker.

Fetch DB File

  1. $ export GEO_IP_LICENSE_KEY=<license_key>
  2. $ rake geo:fetch

Docker

  1. Follow the Docker wiki

Whitelist

After enabling the source ip filter, you need to add the needed countries to the whitelist setting. Otherwise all non internal IP's will be blocked.

  1. $ rails c
  2. Setting.find_by(key: 'general_country_source_whitelist').update!(value: ['CH'])

You can add more country codes under Settings in the UI

Clone this wiki locally