weakforced and GeoIP lookups
14 May
2019
14 May
'19
3:58 p.m.
Hi list
hope it's okay to ask weakforced questions here as well, but I could not find a dedicated mailinglist for wforce.
I want to enable GeoIP lookups in my wforce daemon. In a first step I installed luarocks and lua-compat53 to install mmdblua module. Then I added
newGeoIP2DB("country", "/usr/local/share/GeoIP/GeoLite2-Country.mmdb") local mygeodb = getGeoIP2DB("country") if(mygeodb:lookupCountry(lt.remote) == 'XX') then return -1, "country blocked", "country blocked", { country="XX" } end
to wforce.conf and tried to restart wforce but that ends up in a
Fatal Lua error: [string "chunk"]:28: attempt to call global 'newGeoIP2DB' (a nil value)
Any ideas what I could be missing here?
Cheers
tobi
2015
Age (days ago)
2015
Last active (days ago)
0 comments
1 participants
participants (1)
-
Tobi