How to run distributed Erlang through a firewall?

Chandru chandrashekhar.mullaparthi@REDACTED
Tue May 30 18:19:06 CEST 2006


On 24/05/06, Tony Zheng <tzheng@REDACTED> wrote:
>
> Hi
>
> I found some instructions about how to run distributed Erlang through a
> firewall. It said:
> -----------------------------------------------------------------
> ...run distributed Erlang through a firewall?
> The simplest approach is to make an a-priori restriction to the TCP
> ports distributed Erlang uses to communicate through by setting the
> (undocumented) kernel variables 'inet_dist_listen_min' and
> 'inet_dist_listen_max':
>
>         application:set_env(kernel, inet_dist_listen_min, 9100).
>         application:set_env(kernel, inet_dist_listen_max, 9105).
>
> This forces Erlang to use only ports 9100--9105 for distributed Erlang
> traffic.
> -----------------------------------------------------------------
>
> My question is: Can I use it to replicate two Erlang nodes behind the
> different routers on Internet? I did it as follows:
> 1. Created two Erlang nodes(they have the same
> erlangcookie):one@REDACTED and two@REDACTED They
> are behind the different routers: router1 and router2.
> 2. On one@REDACTED, set the TCP ports:
>    (one@REDACTED)1> application:set_env(kernel,
> inet_dist_listen_min, 9100).



You have to set this in your sys.config. Then your kernel setting will take
effect  when it starts up. The way you are doing it above, the kernel has
already started listening on a random port so your application:set_env has
no effect.

Chandru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060530/d96d7d4f/attachment.htm>


More information about the erlang-questions mailing list