[erlang-questions] Working around the Windows firewall

Patrik Nyblom <>
Mon Jan 7 18:31:07 CET 2013


On 12/24/2012 01:07 AM, Jeffrey Rennie wrote:
>
> Before I draft a formal EEP,
>
> Windows firewall is enabled by default, and blocks sockets used by 
> erlang.  Yes, exceptions can be added to the firewall, however, this 
> is not possible in some situations.  For example:
>
> 1.  A corporate network with strict policies that prohibit opening 
> ports used by erlang.
>
> 2.  An application written in erlang that installs without 
> administrator privileges.
>
> 3.  (A generalization of the above) Whenever the user who wants to run 
> erlang is not an administrator.
>
> In these environments, an alternative to sockets which get entangled 
> in the firewall, is Win32 named pipes which do not get entangled in 
>  the firewall.
>
> Therefore, I propose a change that will allow erlang nodes to 
> communicate over named pipes in addition to sockets.  Of course, it 
> would be controlled by command-line parameters.
>
> I've spent a day browsing the erlang source code and it looks pretty 
> doable.
>
> Comments and questions please.
>

Good idea! There is actually no need to change anything in the Erlang VM 
to do that. The distribution mechanism is pluggable, so you can write a 
driver that uses any protocol where you can setup a stream of bytes 
between nodes (ok, that sounds easier than it really is, but it's 
absolutely doable). There is an example in the kernel source code 
($ERL_TOP/lib/kernel/examples/uds_dist) where distribution is set up 
using Unix named pipes, which is of course more limited, but shows the 
general idea of how to implement a distribution driver.

> P.S. It took me about 5 hours to successfully build on Windows; I had 
> most of the tools like Visual Studio and cygwin installed.  I got 
> tripped up by git switching LFs to CRLFs, which chokes bash.  Also, 
> it's much faster to just run vcvars32.bat and then run bash than to 
> write your own script that sets the vc environment variables.
>
Yes, it's a pain. The CRLF defaults of msysgit is also a pain. Using 
vcvars32 directly may definitely be a shortcut, maybe you could add some 
section to the windows readme about your approach?
>
>
Cheers,
/Patrik
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130107/bee4bda5/attachment.html>


More information about the erlang-questions mailing list