[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby and Unix Domain Sockets

Chris Roos

5/19/2005 6:22:00 AM

Hi,

This question has been brought to light after using Instiki on a FreeBsd
instance that is hosted within a FreeBsd Jail. I was trying to use the
--binding flag with Instiki to ensure that I was only listening to
requests from localhost (and then provide password protected access via
Apache and mod_proxy). Unfortunately this didn't work as I didn't have
access to the loopback interface.

The workaround at present is to set-up some firewall rules to block
incoming requests on the Instiki ports.

However, I spoke to my FreeBsd host and he suggested that if Instiki
could use Unix Domain Sockets rather than IP sockets then we could get
round this problem.

I asked on the Instiki Mailing List and Alexey has pointed me here.

I just wonder if anyone has any insight / thoughts about this problem?

Thanks in advance,

Chris



1 Answer

Sam Roberts

5/20/2005 7:04:00 PM

0

Wrote Chris Roos <chris@seagul.co.uk>, on Thu, May 19, 2005 at 03:21:34PM +0900:
> Hi,
>
> This question has been brought to light after using Instiki on a FreeBsd
> instance that is hosted within a FreeBsd Jail. I was trying to use the
> --binding flag with Instiki to ensure that I was only listening to
> requests from localhost (and then provide password protected access via
> Apache and mod_proxy). Unfortunately this didn't work as I didn't have
> access to the loopback interface.

I have no idea what --binding does in Instiki, however, you can use
Socket#bind() to bind a socket to 127.0.0.1 before listening on it so
that you can only receive connections from localhost. You won't be able
to call the convenience functions like TCPServer.new, but it should
work, unless I'm really forgetting my tcp.

Or maybe I don't follow you, are you saying this doesn't work?

> However, I spoke to my FreeBsd host and he suggested that if Instiki
> could use Unix Domain Sockets rather than IP sockets then we could get
> round this problem.

I guess that would work, too, and they are supported by Socket.

Whats the problem with using them?

Cheers,
Sam

--
http://www.ce...