theimpossibleastronaut / modemu2k

modemu2k is a fork of modemu, a telnet client with a modem-like user interface
https://theimpossibleastronaut.com/modemu2k
GNU General Public License v3.0
10 stars 6 forks source link

In some cases, connection fails when 'localhost' is used #44

Open andy5995 opened 2 years ago

andy5995 commented 2 years ago

On Wed, 10 Aug 2022 08:14:26 -0700 Andy Alt @.***> wrote:

I haven't been able to reproduce that yet on my Manjaro system or Slack docker container.

My results when using the container (I enabled telnetd from /etc/inetd.conf and started rc.inetd):

sh-5.1# telnet localhost
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

I have found that "atd"127.0.0.1" succeeds but "atd"localhost" fails.

@aianson Could you try the attached file? modemu2k-0.1.0.tar.gz

Yes, this works for me. I built modemu2k from that slackbuild and installed it. It is working for me with minicom.

I'm not sure why atd"localhost doesn't work for me but it is unimportant, I'll just use 127.0.0.1 when needed.

Thank you for your work on this. :)

Originally posted by @aianson in https://github.com/theimpossibleastronaut/modemu2k/issues/39#issuecomment-1211203597

andy5995 commented 2 years ago

@aianson are you able to connect to other hosts by name?

Is 'localhost' mapped in /etc/hosts?

aianson commented 2 years ago

On Thu, 11 Aug 2022 08:38:17 -0700 Andy Alt @.***> wrote:

@aianson are you able to connect to other hosts by name?

Is 'localhost' mapped in /etc/hosts?

I think so.. this is my /etc/hosts..

#

hosts This file describes a number of hostname-to-address

mappings for the TCP/IP subsystem. It is mostly

used at boot time, when no name servers are running.

On small systems, this file can be used instead of a

"named" name server. Just add the names, addresses

and any aliases to this file...

#

For loopbacking.

127.0.0.1 localhost ::1 localhost 127.0.0.1 irondust.home irondust ::1 irondust.home irondust 192.168.0.10 laptop.home laptop 192.168.0.12 trmb.home trmb

The last two 192.168.* lines were added by me for nfs shares.

andy5995 commented 2 years ago

Hi @aianson

So you can't connect by using "localhost" but you CAN connect to external telnet servers by using their hostnames?

aianson commented 2 years ago

On Thu, 18 Aug 2022 16:31:56 -0700 Andy Alt @.***> wrote:

Hi @aianson

So you can't connect by using "localhost" but you CAN connect to external telnet servers by using their hostnames?

Yes, atd"localhost fails but atd"127.0.0.1 succeeds. That is strange isn't? I wonder if I have "done something? :)

Yes, modemu2k is working for me all around using hostnames and I have been busy with it recently so all is up and running for me. Thanks for modemu2k.

andy5995 commented 2 years ago

Strange, strange, strange

I'll review the network code and see if I can get lucky fixing that issue which I'm unable to reproduce.

Thanks for your participation in the project @aianson