Re: What are port requirements for remote lisp?

Pascal Bourguignon <[email protected]> Tue, 31 Mar 2020 03:34:30 +0200
Newsgroups gmane.lisp.slime.devel
Message-ID <[email protected]>
--Apple-Mail=_0C137035-467D-4B30-BC42-AE0C0AF330D7
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8



> On 31 Mar 2020, at 03:16, Mirko Vukovic <[email protected]> =
wrote:
>=20
> Hello,
>=20
> My setup is Sly on Spacemacs with Windows 10 running remote lisp on =
Linux over a corporate network. I have not found a Sly mailing list, and =
I hope I can get an answer here.
>=20
> Emacs is running Sly on Spacemacs on Windows 10. Lisp is running on a =
Linux server. But Sly does not connect to the listening Lisp. Corporate =
network security policies have changed. I can ask for IT to accommodate =
me, but first I need to know what to ask for.


> So far, I have opened a tunnel, and started a listening lisp (details =
below).=20
>=20
> In Emacs I get:
>=20
> sly-connect RET RET RET
> [sly] Connecting to Slynk on port 4005..
> helm-M-x-execute-command: make client process failed: Connection timed =
out, :name, sly-9, :buffer, nil, :host, hal9000, :service, 4005, =
:nowait, nil, :tls-parameters, nil
> =20
> The session transcript:
> > ssh -L4005:localhost:4005 mirko@hal9000
>=20
> [mirko@hal9000 .roswell]$ ros -L ccl-bin run --load =
start-slynk-server.lisp
>=20
>  Added SLYNK path to ASDF:*CENTRAL-REGISTRY*
> SLYNK's ASDF loader finished.
>  Loaded ASDF system
> ;; Slynk started at port: 4005.
>=20
>  Created SLYNK server on port 4005
>  Set *USE-DEDICATED-OUTPUT-STREAM* to NIL
> Clozure Common Lisp Version 1.11.5/v1.11.5  (LinuxX8664)
>=20
> For more information about CCL, please see http://ccl.clozure.com =
<http://ccl.clozure.com/>.
>=20
> CCL is free software.  It is distributed under the terms of the Apache
> Licence, Version 2.0.
> ?
>=20
> My question is as follows:
> Do I need bi-directional traffic on 4005?

I don=E2=80=99t know if sly has changed anything, but with slime, you =
can use the port you want. 4005 is only the default port for slime.
And yes, the traffic is bi-directional, but since you will wrap it in a =
ssh tunnel, even if it wasn=E2=80=99t bi-directionnal, the protocols =
used by ssh are bi-directional.


> Do I need bi-directional traffic on 22? (after recent changes I cannot =
ssh or scp into my Windows machine)

Of course. Definitely.


> What tools can I use to try to narrow down the cause of the problem? =
For instance, can I send a command to the lisp image, and see its =
effects on the lisp side?

You may use WireShark as the definite tool to watch what transits on the =
network, as long as you have the rights to do it, and the system or =
drivers allow it.

Apparently the port 22 to your linux box is open since you can connect =
to it with ssh.
On the other hand, it=E2=80=99s possible that the port 4005 is blocked.  =
You may ask your IT to open it, or whether there is a port or range =
already open that you could use instead of 4005.

If you want to test it, you could for example disable the web server on =
your linux box, and use the port 80, since it=E2=80=99s very probable =
that this port open. You can check it with your web browser =
http://hal9000 <http://hal9000/> (if you have a web server running on =
your linux box).

Then you will be able to use:  ssh -L4005:localhost:80 mirko@hal9000
to establish the tunnel.  If this works, you will have confirmed that =
the problem is that the port 4005 is blocked, and will be able to ask =
confidently that they open it.

--=20
__Pascal J. Bourguignon__





--Apple-Mail=_0C137035-467D-4B30-BC42-AE0C0AF330D7
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><font=
 face=3D"Menlo" class=3D""><br style=3D"font-size: 15px;" =
class=3D""></font><div style=3D"font-size: 15px;"><font face=3D"Menlo" =
class=3D""><br class=3D""></font><blockquote type=3D"cite" class=3D""><div=
 class=3D""><font face=3D"Menlo" class=3D"">On 31 Mar 2020, at 03:16, =
Mirko Vukovic &lt;<a href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt; wrote:</font></div><font =
face=3D"Menlo" class=3D""><br =
class=3D"Apple-interchange-newline"></font><div class=3D""><div =
dir=3D"ltr" class=3D""><font face=3D"Menlo" class=3D"">Hello,</font><div =
class=3D""><font face=3D"Menlo" class=3D""><br =
class=3D""></font></div><div class=3D""><font face=3D"Menlo" class=3D"">My=
 setup is Sly on Spacemacs with Windows 10 running remote lisp on Linux =
over a corporate network. I have not found a Sly mailing list, and I =
hope I can get an answer here.</font></div><div class=3D""><font =
face=3D"Menlo" class=3D""><br class=3D""></font></div><div =
class=3D""><font face=3D"Menlo" class=3D"">Emacs is running Sly on =
Spacemacs on Windows 10. Lisp is running on a Linux server. But Sly does =
not connect to the listening Lisp. Corporate network security policies =
have changed. I can ask for IT to accommodate&nbsp;me, but first I need =
to know what to ask for.</font></div></div></div></blockquote><div =
style=3D"font-size: 15px;"><font face=3D"Menlo" class=3D""><br =
class=3D""></font></div><div style=3D"font-size: 15px;"><font =
face=3D"Menlo" class=3D""><br class=3D""></font></div></div><div =
style=3D"font-size: 15px;"><blockquote type=3D"cite" class=3D""><div =
class=3D""><div dir=3D"ltr" class=3D""><div class=3D""><font =
face=3D"Menlo" class=3D"">So far, I have opened a tunnel, and started a =
listening lisp (details below).&nbsp;</font></div><div class=3D""><font =
face=3D"Menlo" class=3D""><br class=3D""></font></div><div =
class=3D""><font face=3D"Menlo" class=3D"">In Emacs I =
get:</font></div><div class=3D""><font face=3D"Menlo" class=3D""><br =
class=3D""></font></div><font face=3D"Menlo" class=3D""><font =
class=3D"">sly-connect RET RET RET<br class=3D"">[sly] Connecting to =
Slynk on port 4005..<br class=3D"">helm-M-x-execute-command: make client =
process failed: Connection timed out, :name, sly-9, :buffer, nil, :host, =
hal9000, :service, 4005, :nowait, nil, :tls-parameters, nil</font><br =
class=3D""></font><div class=3D""><font face=3D"Menlo" =
class=3D"">&nbsp;</font></div><div class=3D""><font face=3D"Menlo" =
class=3D"">The session transcript:</font></div><div class=3D""><font =
face=3D"Menlo" class=3D""><font class=3D"">&gt; ssh =
-L4005:localhost:4005 mirko@hal9000<br class=3D""><br =
class=3D"">[mirko@hal9000 .roswell]$ ros -L ccl-bin run --load =
start-slynk-server.lisp<br class=3D""><br class=3D"">&nbsp;Added SLYNK =
path to ASDF:*CENTRAL-REGISTRY*<br class=3D"">SLYNK's ASDF loader =
finished.<br class=3D"">&nbsp;Loaded ASDF system<br class=3D"">;; Slynk =
started at port: 4005.<br class=3D""><br class=3D"">&nbsp;Created SLYNK =
server on port 4005<br class=3D"">&nbsp;Set =
*USE-DEDICATED-OUTPUT-STREAM* to NIL<br class=3D"">Clozure Common Lisp =
Version 1.11.5/v1.11.5 &nbsp;(LinuxX8664)<br class=3D""><br class=3D"">For=
 more information about CCL, please see <a =
href=3D"http://ccl.clozure.com/" class=3D"">http://ccl.clozure.com</a>.<br=
 class=3D""><br class=3D"">CCL is free software.&nbsp; It is distributed =
under the terms of the Apache<br class=3D"">Licence, Version 2.0.<br =
class=3D"">?</font><br class=3D""></font></div><div class=3D""><font =
class=3D"" face=3D"Menlo"><br class=3D""></font></div><div =
class=3D""><font class=3D"" face=3D"Menlo">My question is as =
follows:</font></div><div class=3D""><ol class=3D""><li class=3D""><font =
class=3D"" face=3D"Menlo">Do I need bi-directional traffic on =
4005?</font></li></ol></div></div></div></blockquote><div =
style=3D"font-size: 15px;"><font face=3D"Menlo" class=3D""><br =
class=3D""></font></div><div><font face=3D"Menlo" class=3D"">I don=E2=80=99=
t know if sly has changed anything, but with slime, you can use the port =
you want.&nbsp;4005 is only the default port for =
slime.</font></div><div><font face=3D"Menlo" class=3D"">And yes, the =
traffic is bi-directional, but since you will wrap it in a ssh tunnel, =
even if it wasn=E2=80=99t bi-directionnal, the protocols used by ssh are =
bi-directional.</font></div><div><font face=3D"Menlo" class=3D""><br =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" =
class=3D""></font><blockquote type=3D"cite" class=3D""><div dir=3D"ltr" =
class=3D""></div></blockquote></div><font face=3D"Menlo" class=3D""><br =
class=3D""></font><blockquote type=3D"cite" class=3D""><div =
class=3D""><div dir=3D"ltr" class=3D""><div class=3D""><ol class=3D"" =
start=3D"2"><li class=3D""><font face=3D"Menlo" class=3D"">Do I need =
bi-directional traffic on 22? (after recent changes I cannot ssh or scp =
into my Windows =
machine)</font></li></ol></div></div></div></blockquote><div =
style=3D"font-size: 15px;"><font face=3D"Menlo" class=3D""><br =
class=3D""></font></div><font face=3D"Menlo" class=3D"">Of course. =
Definitely.</font></div><div style=3D"font-size: 15px;"><font =
face=3D"Menlo" class=3D""><br class=3D""></font></div><div =
style=3D"font-size: 15px;"><font face=3D"Menlo" class=3D""><br =
class=3D""></font><blockquote type=3D"cite" class=3D""><div =
class=3D""><div dir=3D"ltr" class=3D""><div class=3D""><ol class=3D"" =
start=3D"3"><li class=3D""><font face=3D"Menlo" class=3D"">What tools =
can I use to try to narrow down the cause of the problem? For instance, =
can I send a command to the lisp image, and see its effects on the lisp =
side?</font></li></ol></div></div>
</div></blockquote><font face=3D"Menlo" class=3D""><br =
class=3D""></font></div><div style=3D"font-size: 15px;"><font =
face=3D"Menlo" class=3D"">You may use WireShark as the definite tool to =
watch what transits on the network, as long as you have the rights to do =
it, and the system or drivers allow it.</font></div><div =
style=3D"font-size: 15px;"><font face=3D"Menlo" class=3D""><br =
class=3D""></font></div><div style=3D"font-size: 15px;"><font =
face=3D"Menlo" class=3D"">Apparently the port 22 to your linux box is =
open since you can connect to it with ssh.</font></div><div =
style=3D"font-size: 15px;"><font face=3D"Menlo" class=3D"">On the other =
hand, it=E2=80=99s possible that the port 4005 is blocked. &nbsp;You may =
ask your IT to open it, or whether there is a port or range already open =
that you could use instead of 4005.</font></div><div style=3D"font-size: =
15px;"><font face=3D"Menlo" class=3D""><br class=3D""></font></div><div =
style=3D"font-size: 15px;"><font face=3D"Menlo" class=3D"">If you want =
to test it, you could for example disable the web server on your linux =
box, and use the port 80, since it=E2=80=99s very probable that this =
port open. You can check it with your web browser <a =
href=3D"http://hal9000" class=3D"">http://hal9000</a>&nbsp;(if you have =
a web server running on your linux box).</font></div><div =
style=3D"font-size: 15px;"><font face=3D"Menlo" class=3D""><br =
class=3D""></font></div><div style=3D"font-size: 15px;"><font =
face=3D"Menlo" class=3D"">Then you will be able to use: &nbsp;ssh =
-L4005:localhost:80 mirko@hal9000</font></div><div style=3D"font-size: =
15px;"><font face=3D"Menlo" class=3D"">to establish the tunnel. &nbsp;If =
this works, you will have confirmed that the problem is that the port =
4005 is blocked, and will be able to ask confidently that they open =
it.</font></div><div style=3D"font-size: 15px;"><font face=3D"Menlo" =
class=3D""><br class=3D""></font></div><div style=3D"font-size: 15px;" =
class=3D"">
<div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; text-align: =
start; text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D""><font face=3D"Menlo" class=3D"">--&nbsp;<br class=3D"">__Pascal=
 J. Bourguignon__</font></div><div style=3D"color: rgb(0, 0, 0); =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><font=
 face=3D"Menlo" class=3D""><br class=3D""><br class=3D""><br =
class=3D""></font></div></div></div>
</div>
<br class=3D""></body></html>=

--Apple-Mail=_0C137035-467D-4B30-BC42-AE0C0AF330D7--