• Getting the BBS IP address

    From Codefenix@VERT/CONCHAOS to All on Friday, September 08, 2023 07:57:57
    If I want to know the IP address of my own BBS, is this the simplest/best way to go about obtaining it?

    resolve_ip(system.inet_addr)

    Just making sure I'm not overlooking something simpler.

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...A critic is a legless man who teaches running.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
  • From Digital Man@VERT to Codefenix on Friday, September 08, 2023 13:03:12
    Re: Getting the BBS IP address
    By: Codefenix to All on Fri Sep 08 2023 07:57 am

    If I want to know the IP address of my own BBS, is this the simplest/best way to go about obtaining it?

    resolve_ip(system.inet_addr)

    Just making sure I'm not overlooking something simpler.

    server.interface_ip_address

    Or (if you have multiple IP addresses), server.interface_ip_addr_list
    --
    digital man (rob)

    Synchronet "Real Fact" #42:
    Rob Swindell was laughed out of a FidoNet Net103 (OC, Calif.) meeting in 1992 Norco, CA WX: 92.6øF, 25.0% humidity, 0 mph E wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Codefenix@VERT/CONCHAOS to Digital Man on Sunday, September 10, 2023 12:22:28
    Re: Getting the BBS IP address
    By: Digital Man to Codefenix on Fri Sep 08 2023 01:03 pm

    server.interface_ip_address

    Isn't that deprecated?

    Or (if you have multiple IP addresses), server.interface_ip_addr_list

    I just have one, so I assume I would do: server.interface_ip_addr_list[0]

    When I try that though, it returns 0.0.0.

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...Interchangable devices won`t.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
  • From Digital Man@VERT to Codefenix on Sunday, September 10, 2023 14:50:01
    Re: Getting the BBS IP address
    By: Codefenix to Digital Man on Sun Sep 10 2023 12:22 pm

    Re: Getting the BBS IP address
    By: Digital Man to Codefenix on Fri Sep 08 2023 01:03 pm

    server.interface_ip_address

    Isn't that deprecated?

    It still works and I have no plans to remove it.

    Or (if you have multiple IP addresses), server.interface_ip_addr_list

    I just have one, so I assume I would do: server.interface_ip_addr_list[0]

    When I try that though, it returns 0.0.0.

    And that would be correct if your BBS is only listening on IPv4 "any". I would expect the IPv6 "any" interface address (::) to be listed in that array too, but default.

    A better idea is probably is to use client.socket.local_ip_address to get the currently connected/used server IP address.
    --
    digital man (rob)

    Synchronet/BBS Terminology Definition #50:
    LF = Line Feed (ASCII 10, Ctrl-J)
    Norco, CA WX: 93.6øF, 37.0% humidity, 4 mph SE wind, 0.01 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Codefenix@VERT/CONCHAOS to Digital Man on Monday, September 11, 2023 14:29:58
    Re: Getting the BBS IP address
    By: Digital Man to Codefenix on Sun Sep 10 2023 02:50 pm

    A better idea is probably is to use client.socket.local_ip_address to get the currently connected/used server IP address.

    Same outcome as before, unfortunately. Getting 0.0.0.0

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...The God's play games with men as balls.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
  • From Digital Man@VERT to Codefenix on Monday, September 11, 2023 16:34:42
    Re: Getting the BBS IP address
    By: Codefenix to Digital Man on Mon Sep 11 2023 02:29 pm

    Re: Getting the BBS IP address
    By: Digital Man to Codefenix on Sun Sep 10 2023 02:50 pm

    A better idea is probably is to use client.socket.local_ip_address to get the currently connected/used server IP address.

    Same outcome as before, unfortunately. Getting 0.0.0.0

    Is there a client connected? It's certainly not 0.0.0.0 for me:
    ;eval
    Parameter(s): client.socket.local_ip_address
    Result (string): 71.95.196.36
    --
    digital man (rob)

    Sling Blade quote #11:
    Doyle Hargraves (to Karl): What in the hell you doin' with that hammer?
    Norco, CA WX: 87.7øF, 45.0% humidity, 8 mph S wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Codefenix@VERT/CONCHAOS to Digital Man on Tuesday, September 12, 2023 09:03:25
    Re: Getting the BBS IP address
    By: Digital Man to Codefenix on Mon Sep 11 2023 04:34 pm

    Is there a client connected? It's certainly not 0.0.0.0 for me:

    Yes, mine. :) I'm running a script containing the client.socket.local_ip_address while logged into the BBS.

    ;eval
    Parameter(s): client.socket.local_ip_address
    Result (string): 71.95.196.36

    Interesting. I get a different result when I call client.socket.local_ip_address that way as opposed to calling it within a script.

    ;EVAL
    Parameter(s): client.socket.local_ip_address
    Result (string): 192.168.1.9

    Also, it's returning the behind-the-router IP for me, rather than the outward-facing IP, which it seems like it's supposed to do given your output.

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...A pnp transistor will be an npn.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
  • From Digital Man@VERT to Codefenix on Tuesday, September 12, 2023 12:02:07
    Re: Getting the BBS IP address
    By: Codefenix to Digital Man on Tue Sep 12 2023 09:03 am

    Re: Getting the BBS IP address
    By: Digital Man to Codefenix on Mon Sep 11 2023 04:34 pm

    Is there a client connected? It's certainly not 0.0.0.0 for me:

    Yes, mine. :) I'm running a script containing the client.socket.local_ip_address while logged into the BBS.

    Running a script how? What's in the script?

    I created exec/test.js containing a single line:
    print(client.socket.local_ip_address);

    And then when I run that script from the BBS, I get the IP address I expect: ;exec ?test.js
    71.95.196.36

    ;eval
    Parameter(s): client.socket.local_ip_address
    Result (string): 71.95.196.36

    Interesting. I get a different result when I call client.socket.local_ip_address that way as opposed to calling it within a script.

    I do not.

    ;EVAL
    Parameter(s): client.socket.local_ip_address
    Result (string): 192.168.1.9

    Also, it's returning the behind-the-router IP for me, rather than the outward-facing IP, which it seems like it's supposed to do given your output.

    My servers aren't behind NAT, so that's expected. I guess if you want to find the *public* IP address associated with your hostname and your server is behind a NAT, then I guess the method you originally provided is (only?) way.
    --
    digital man (rob)

    Rush quote #47:
    All of us get lost in the darkness, dreamers learn to steer by the stars
    Norco, CA WX: 83.4øF, 45.0% humidity, 0 mph E wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Tracker1@VERT/TRN to Digital Man on Friday, September 15, 2023 19:26:35
    Re: Getting the BBS IP address
    By: Digital Man to Codefenix on Tue Sep 12 2023 12:02:07

    My servers aren't behind NAT, so that's expected. I guess if you want to find the *public* IP address associated with your hostname and your server is behind a NAT, then I guess the method you originally provided is (only?) way.

    IP Only
    http://ipv4.bbs.land/
    http://ipv6.bbs.land/

    Split on comma, second part is IP
    http://ip4.me/api/
    http://ip6.me/api/

    The ip(4|6) I found while looking for such a service... the bbs.land ones are mine... Mostly in preparation for setting up some of the domains I have for BBS related dyndns support.


    --
    Michael J. Ryan
    +o roughneckbbs.com
    tracker1@roughneckbbs.com

    ---
    þ Synchronet þ Roughneck BBS - roughneckbbs.com