• Telnet Server

    From Digital Man@1:103/705 to deon on Mon Apr 8 02:22:43 2024
    Re: Telnet Server
    By: deon to Digital Man on Mon Apr 08 2024 02:24 pm

    Perhaps you could implement a startup delay/wait? - since it is quite easy to trip you up if you dont have it and its not the default.

    There already is a port bind retry/delay (upon failure), and it's configurable. See the settings in sbbs.ini.
    --
    digital man (rob)

    Synchronet "Real Fact" #55:
    Synchronet Terminal Server introduced RLogin support w/v3.00c (2000)
    Norco, CA WX: 46.3øF, 80.0% humidity, 0 mph ESE wind, 0.00 inches rain/24hrs --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From phigan@1:103/705 to deon on Mon Apr 8 18:25:25 2024
    Re: Telnet Server
    By: deon to Digital Man on Mon Apr 08 2024 02:24 pm

    I guess I've never seen this scenari
    (on Linux anyway). I have started TC

    I was going to say: On Linux, wouldn't
    the second instance or whatever else
    trying to take port 23 fail, and give
    an error that the port is already in
    use? That's what happens to me any time
    I try to run two things on the same
    port, anyway.

    ---
    þ Synchronet þ TIRED of waiting 2 hours for a taco? GO TO TACOPRONTO.bbs.io
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Apam@1:103/705 to phigan on Mon Apr 8 19:48:06 2024
    Re: Telnet Server
    By: phigan to deon on Mon Apr 08 2024 06:25 pm

    I was going to say: On Linux, wouldn't
    the second instance or whatever else
    trying to take port 23 fail, and give
    an error that the port is already in
    use? That's what happens to me any time
    I try to run two things on the same
    port, anyway.

    Yeah, unless you set the REUSEADDR socket option i think, then it can reuse the socket.

    I wasn't aware that it could take over a socket that was actually in use, I had thought it just reused ones that were in the process of closing, but it sounds like my thinking is wrong.

    So I think, using that socket option could be a bad thing most likely with SSH as synchronet could clobber sshd if it's running. It's unlikely that your setup is running a telnetd server, so in that instance it's unlikely to be a problem - but from what i understand in this thread, it's better to be safe than sorry.

    Andrew
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From apam@1:103/705 to Digital Man on Tue Apr 9 09:50:09 2024
    Re: Telnet Server
    By: Digital Man to Apam on Sun Apr 07 2024 01:33 pm

    By default, the Synchronet ctrl/sockopts.ini file does not enable the REUSEADDR option. Is this option now enabled? If it is, then a second process (e.g. a second invocation of sbbs) could "take over" the port.

    Setting this worked. I was a bit confused because IPv6 was still running, but now that I think about it, I've noticed in the past using the sockets makes them get released a bit later, so I guess because I use IPv4 and not IPv6 the old process was hanging on just a bit longer.

    Andrew

    ---
    þ Synchronet þ HappyLand - happylnd.synchro.net
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to phigan on Tue Apr 9 12:42:35 2024
    Re: Telnet Server
    By: phigan to deon on Mon Apr 08 2024 06:25 pm

    I guess I've never seen this scenari (on Linux anyway). I have started TC

    I was going to say: On Linux, wouldn't the second instance or whatever else trying to take port 23 fail, and give an error that the port is already in use? That's what happens to me any time I try to run two things on the same port, anyway.

    Yup, that's my experience.


    ...ëîåï

    ---
    þ Synchronet þ AnsiTEX bringing back videotex but with ANSI
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to Apam on Tue Apr 9 13:24:50 2024
    Re: Telnet Server
    By: Apam to phigan on Mon Apr 08 2024 07:48 pm

    Howdy,

    So I think, using that socket option could be a bad thing most likely with SSH as synchronet could clobber sshd if it's running. It's unlikely that your setup is running a telnetd server, so in that instance it's unlikely to be a problem - but from what i understand in this thread, it's better to be safe than sorry.

    My understanding and experience, is that this is doesnt happen on Linux, probably was an issue on Windows (I read references to it) - and possibly other OSes as well?

    If my reading is correct, when a socket is closed (it goes into TIME_WAIT for upto a minute or two - depending on the OS) and *without* REUSEADDR, the OS will not let another process bind to the port.

    With REUSEADDR, it ignores sockets in TIME_WAIT (on Linux anyway) and lets you bind to the port. (You still cant bind to a port that is already LISTENING by another process, but I guess you could on Windows?)


    ...ëîåï

    ---
    þ Synchronet þ AnsiTEX bringing back videotex but with ANSI
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)