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
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.
A better idea is probably is to use client.socket.local_ip_address to get the currently connected/used server IP address.
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
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.
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.
Sysop: | MarisaG |
---|---|
Location: | South San Francisco, CA |
Users: | 82 |
Nodes: | 15 (0 / 15) |
Uptime: | 225:50:29 |
Calls: | 1,436 |
Calls today: | 1 |
Files: | 7 |
Messages: | 22,036 |