• IP2Location Support

    From apam@21:1/125 to All on Mon Apr 29 17:26:06 2019
    Hi

    I just added support to Magicka to work with a database called
    IP2Location.

    It adds 2 lua functions you can use in your scripts:

    bbs_ip_address

    will return the ip address as a string.

    bbs_ip_info

    will return the countrycode, country, region and city of the ip address.

    I've included a sample login_stanza_ipdata.lua (which should be renamed
    to login_stanza.lua if you want to use it..)

    The data base isn't included in magicka git, as zipped up it's about 60Mb (unzipped about 250Mb)

    You can download a prepared sqlite3 database here:

    https://magickabbs.com/index.php/source-code

    This site or product includes IP2Location LITE data available from http://www.ip2location.com.

    You will need to add the location of the database into the paths section
    of your bbs.ini

    eg:

    IPData Database = /home/andrew/MagickaBBS/ipdata.sq3

    if you don't want to use it, just comment that out or don't put it in
    your ini file :)

    Andrew

    --- MagickaBBS v0.12alpha (Linux/x86_64)
    * Origin: The Fat Sandwich - sandwich.hopto.org:2023 (21:1/125)
  • From apam@21:1/125 to apam on Mon Apr 29 17:29:58 2019
    I just added support to Magicka to work with a database called
    IP2Location.

    I should also mention, that I haven't tested ipv6 support. It should
    work, but I can't test :(

    Andrew

    --- MagickaBBS v0.12alpha (Linux/x86_64)
    * Origin: The Fat Sandwich - sandwich.hopto.org:2023 (21:1/125)
  • From deon@21:2/116.1 to apam on Mon Apr 29 08:29:14 2019
    On 29 Apr 2019, apam said the following...
    I should also mention, that I haven't tested ipv6 support. It should
    work, but I can't test :(

    You can with ZT :)

    ...deon

    _--_|\ | Deon George
    / \ | Chinwag BBS - A BBS on a PI in Docker!
    \_.__.*/ |
    V | Coming from the 'burbs of Melbourne, Australia

    --- Mystic BBS v1.12 A43 2019/02/23 (Raspberry Pi/32)
    * Origin: Chinwag | MysticBBS in Docker! (21:2/116.1)
  • From apam@21:1/125 to deon on Mon Apr 29 19:12:35 2019
    On 29 Apr 2019, apam said the following...
    I should also mention, that I haven't tested ipv6 support. It sho work, but I can't test :(

    You can with ZT :)

    Doesn't ZT use private IPs?

    Andrew

    --- MagickaBBS v0.12alpha (Linux/x86_64)
    * Origin: The Fat Sandwich - sandwich.hopto.org:2023 (21:1/125)
  • From Tiny@21:1/130.4 to apam on Mon Apr 29 05:47:26 2019
    The data base isn't included in magicka git, as zipped up it's about 60Mb (unzipped about 250Mb)

    I'm adding this to the checklist of things to do eventually. I need to
    get Magicka onto the new 64bit vm I've been trying to do for over a year
    LOL.

    Shawn

    --- MagickaBBS v0.12alpha (Linux/armv7l)
    * Origin: A Tiny slice o pi (21:1/130.4)
  • From deon@21:2/116.1 to apam on Mon Apr 29 10:32:32 2019
    On 29 Apr 2019, apam said the following...
    Doesn't ZT use private IPs?

    Yes, but they are IPv6 and IPv4 IDs, so anybody "connected" to the same ZT interface can communicate with your interface...

    ...deon

    _--_|\ | Deon George
    / \ | Chinwag BBS - A BBS on a PI in Docker!
    \_.__.*/ |
    V | Coming from the 'burbs of Melbourne, Australia

    --- Mystic BBS v1.12 A43 2019/02/23 (Raspberry Pi/32)
    * Origin: Chinwag | MysticBBS in Docker! (21:2/116.1)
  • From apam@21:1/125 to deon on Mon Apr 29 20:51:51 2019
    On 29 Apr 2019, apam said the following...
    Doesn't ZT use private IPs?

    Yes, but they are IPv6 and IPv4 IDs, so anybody "connected" to the
    same ZT interface can communicate with your interface...

    Yeah, but private ips wont resolve in the database to a specific
    city/country etc.

    Andrew

    --- MagickaBBS v0.12alpha (Linux/x86_64)
    * Origin: The Fat Sandwich - sandwich.hopto.org:2023 (21:1/125)
  • From deon@21:2/116.1 to apam on Mon Apr 29 11:06:39 2019
    On 29 Apr 2019, apam said the following...
    Yeah, but private ips wont resolve in the database to a specific city/country etc.

    Ahh, I was thinking you were wanted to test TCP connectivity! Argh, sorry, my bad...

    ...deon

    _--_|\ | Deon George
    / \ | Chinwag BBS - A BBS on a PI in Docker!
    \_.__.*/ |
    V | Coming from the 'burbs of Melbourne, Australia

    --- Mystic BBS v1.12 A43 2019/02/23 (Raspberry Pi/32)
    * Origin: Chinwag | MysticBBS in Docker! (21:2/116.1)
  • From apam@21:1/125 to deon on Mon Apr 29 21:50:50 2019
    On 29 Apr 2019, apam said the following...
    Yeah, but private ips wont resolve in the database to a specific city/country etc.

    Ahh, I was thinking you were wanted to test TCP connectivity! Argh,
    sorry, my bad...

    No problem, I should have been more specific sorry :)

    Andrew

    --- MagickaBBS v0.12alpha (Linux/x86_64)
    * Origin: The Fat Sandwich - sandwich.hopto.org:2023 (21:1/125)
  • From deon@21:2/116.1 to apam on Mon Apr 29 21:20:47 2019
    On 29 Apr 2019, apam said the following...
    Yeah, but private ips wont resolve in the database to a specific city/country etc.

    Actually, I've wanted to figure out how GeoIP can be taught about
    local/private IP resolution. I know it can be done, but I just dont know how.

    IE: When I get a connect from fd00:...2:64:0, I want it to return "Hub 2" instead of unknown.

    Have you looked at this? Is it easy?

    ...deon

    _--_|\ | Deon George
    / \ | Chinwag BBS - A BBS on a PI in Docker!
    \_.__.*/ |
    V | Coming from the 'burbs of Melbourne, Australia

    --- Mystic BBS v1.12 A43 2019/02/23 (Raspberry Pi/32)
    * Origin: Chinwag | MysticBBS in Docker! (21:2/116.1)
  • From apam@21:1/125 to deon on Tue Apr 30 08:06:36 2019
    On 29 Apr 2019, apam said the following...
    Yeah, but private ips wont resolve in the database to a city/country etc.

    Actually, I've wanted to figure out how GeoIP can be taught about local/private IP resolution. I know it can be done, but I just dont
    know how.

    I'm not using GeoIP, rather IP2Location, which is just a database, so you
    could just add / modify it.

    Andrew

    --- MagickaBBS v0.12alpha (Linux/x86_64)
    * Origin: The Fat Sandwich - sandwich.hopto.org:2023 (21:1/125)