Your redbean supports MaxMind GeoLite2 which is a free database you have to download separately, at their website here. It's worth doing because it lets you turn IP addresses into geographical coordinates, addresses, name it. Being able to Lua script this database is going to help you address things like online fraud and abuse.
This script is hard coded to assume the database is at the following paths:
/usr/local/share/maxmind/GeoLite2-City.mmdb
/usr/local/share/maxmind/GeoLite2-ASN.mmdb
Which on Windows basically means the same thing as:
C:\usr\local\share\maxmind\GeoLite2-City.mmdb
C:\usr\local\share\maxmind\GeoLite2-ASN.mmdb
Once you've placed it there, you can fill out the form below to have fun crawling all the information it provides!