choosing distributed comm ports

klacke <>
Sat Dec 11 14:33:44 CET 2004

On Fri, Dec 10, 2004 at 01:35:34PM -0800, Michael McDaniel wrote:

> I have noticed that the ports used when my nodes communicate are not always
> the same (not a surprise).  I would like to have known fixed ports so that
> I can open those specific ports on the various firewalls where my Erlang
> nodes will be installed.

There are three interesting environment variable read by the code
in inet_tcp_dist.erl which are used to control the establishment
of the listen socket for distributed erlang.

 application:get_env(kernel,inet_dist_listen_min) and

    are used to set a range of the incoming portnumbers for 
    distribution, use this to force one (or a range) of
    explicit port numbers. These portnumbers can then be
    fed into firewalls

 application:get_env(kernel, inet_dist_use_interface)

    Is another security related env parameter. It's used
    to bind() the distribution to an explicit interface 
    on the box. Also useful for security reasons.


Claes Wikstrom                        -- Caps lock is nowhere and                  -- everything is under control          

More information about the erlang-questions mailing list