Hi all,

I'm now using Raymond Toy's 2004-12-02 snapshot (thanks!)

Good security practice requires that when you create a socket server for
use solely by the local computer you should never bind to all network
interfaces.

This binds to all network interfaces:
(ext:create-inet-listener 9990)

netstat -a | grep 9990
tcp        0      0 *:9990                  *:*                     LISTEN

The listener can be supplied with a host keyword. This doesn't appear to
work for localhost or 127.0.0.1:

(ext:create-inet-listener 9991 :stream :host "localhost")

Error in function CREATE-INET-LISTENER:
   Error binding socket to port 9991: Cannot assign requested address
   [Condition of type SIMPLE-ERROR]

Note that lookup-host-entry works:

(lookup-host-entry "localhost")
=> #S(HOST-ENTRY
     :NAME "localhost.localdomain"
     :ALIASES ("localhost")
     :ADDR-TYPE 2
     :ADDR-LIST (2130706433))

Does anyone know how to make CMUCL socket servers bind solely to localhost?

Thanks,
Adam


Reply via email to