charlesUnixPro / dps8m

A simulator for the Multics dps-8/m mainframe
http://ringzero.wikidot.com/
Other
44 stars 11 forks source link

Telnet from remote machine not working in DPS8M 2.0 / RaspberryPI #6

Open Alchemist2 opened 5 years ago

Alchemist2 commented 5 years ago

Hello,

In DPS8M 2.0 built for RaspberryPI (default options, M32=1), telnet seems to work only from the host machine to itself (i.e. localhost). Telnet from remote machines does not work. Telnet used to work correctly in 1.0, so i tried reverting libtelnet.c / libtelnet.h to the ones shipped with 1.0. No improvement: the program still compiles correctly, but Telnet works only from the host machine. There are no firewalls on that Raspberry.

charlesUnixPro commented 5 years ago

What is the results of running

netstat -ln | grep 6180

on the Pi?

I would expect:

 tcp        0      0 0.0.0.0:6180            0.0.0.0:*               LISTEN     

The "0.0.0.0:6180" would indicate that dps8 is listening on all interfaces; "127.0.0.1:6180" would indicate that it is listening on localhost only.

That parameter is controlled by the simh command "fnpserveraddress". To set to local interface only

fnpserveraddress 127.0.0.1

To set to "listen everywhere" (the default)

fnpserveraddress 0.0.0.0

The parameter is used at the emulated FNP initialization which occurs at the "boot" or "fnpstart" commands, and so must be set before either of those commands are issued. Once the emulated FNP has been initialized, the address can only be changed be restarting dps8.

If your bootscript has an "fnpserveraddress 127.0.0.1" in it, delete it or change it to 0.0.0.0.

Alchemist2 commented 5 years ago

Seemingly, dps8 is listening only on localhost:

tcp 0 0 127.0.0.1:6180 0.0.0.0:* LISTEN

I'm using the same bootscript I've used for version 1, so the problem is not there. A grep for "127.0.0.1" in the code shows now changes between v1.0 and v2.0, so it's likely to be some change in the SIMH infrastructure. Prefixing FNPADDRESS 0.0.0.0 to my bootscript solved the problem.