Skip to content

Commit

Permalink
add docs for opnsense/core#3856
Browse files Browse the repository at this point in the history
  • Loading branch information
AdSchellevis committed Dec 29, 2019
1 parent 5314627 commit 93f3e9d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
28 changes: 28 additions & 0 deletions source/manual/aliases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,34 @@ region.
.. image:: images/firewall_geoip_alias.png
:width: 100%

To use GeoIP, you need to configure a source in the :menuselection:`Firewall --> Aliases -> GeoIP settings` tab, the most commonly
used source is MaxMind, for which we have a how-to available : :doc:`how-tos/maxmind_geo_ip`

The configured url should point to a zip file containing the following csv files:

.. list-table:: Title
:widths: 50 25 25 25
:header-rows: 1

* - Filename
- Purpose
- Format
- Example
* - %prefix%-locations-en.csv
- maps geo locations to iso countries
- geoname_id,,,,country_iso_code
- 1,,,,NL
* - %prefix%-IPv4.csv
- IPv4 networks
- network,geoname_id
- 2.21.241.0/28,1
* - %prefix%-IPv6.csv
- IPv6 networks
- network,geoname_id
- 2001:470:1f15:210::/64,1

The :code:`%prefix%` can be used to identify the product and/or vendor, in MaxMind's case these files are named
:code:`GeoLite2-Country-Locations-en.csv`, :code:`GeoLite2-Country-Blocks-IPv4.csv`, :code:`GeoLite2-Country-Blocks-IPv6.csv` for example.

.. Tip::

Expand Down
5 changes: 2 additions & 3 deletions source/manual/how-tos/maxmind_geo_ip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Goto https://www.maxmind.com/en/geolite2/signup and create your account. Note th
Generate Licence Key
######################

Once you have created an account you'll need to create a license key. Click in the "My Licence Key" link and generate a key. Save the key ID somewhere safe!!!
Once you have created an account you'll need to create a license key. Click in the "My Licence Key" link and generate a key. Save the key ID somewhere safe!!!

You do not need to download the config at this point.

Expand All @@ -26,12 +26,11 @@ Now we need to create the link we'll need in OPNsense, all you need to do now is

https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&licence_key=My_Licence_key&suffix=zip

You can check that you have done it correctly by just pasting the link into a browser, it should download the zip file.
You can check that you have done it correctly by just pasting the link into a browser, it should download the zip file.


##########
OPNsense
##########

In OPNsense, goto Firewall:Aliases and select the GeoIP settings tab. Enter the URL you have created into the URL box and click Apply, and that's it.

0 comments on commit 93f3e9d

Please sign in to comment.