GeoIP Redirect for Magento 2

or search frequently asked questions:

How can I test redirects for different countries in M2?
How can I make Varnish Cache compatible with redirects?
How to fix the execution time limit of PHP scripts when importing the database?