Caddy-maxmind-geolocation reverse_proxy

Im tryning to use the plugin.

 Standard modules: 106


  Non-standard modules: 1

  Unknown modules: 0

I read similar topics but… i cant make it work.

caddy version: 2.7.6

This is my config: {
  @mygeofilter {
    maxmind_geolocation {
      db_path "/root/GeoLite2_db/GeoLite2-Country.mmdb"
      allow_countries AR

        reverse_proxy @mygeofilter

        log {
        output file /var/log/caddy/trilium-access.log {
        roll_size 10mb
        roll_keep 20
        roll_keep_for 720h

I dont get a file of the log. I dont know if caddy just crash, because i dont get any response in the web browser, and dont see nothing in the log file (i delete it too see the change, and the file is not created. If i delete all the maxmind-geolocation in the config the log file is created and all is working fine)

What i can do?

This happen to me a lot… i ask after search and try, search and try… and after post the question i found the solution…:
was the path. It seems that /root… is not a good path. I just change the db to other path /usr/share/Geoip and… is working.

But anyway, i have some problems. Now i cant reach my webs from inside my LAN.
I have in my pcs the /etc/hosts file like this:

but, after this geoip implementation i cant reach the web from inside my LAN. ( is caddy)
What can i do?


1 Like

Obviously the problem is that the maxmind_geolocation matcher doesn’t consider your LAN IP as coming from that country.

You could use another matcher to allow your private IP ranges with the remote_ip matcher.