Distributed Erlang and Firewalls
I have two Erlang nodes communicating with each other, one of which is behind a firewall. The Erlang distribution mechanism uses a couple of TCP ports that need to be opened in the firewall. The first is port 4369, used by 'epmd'. The second port is dynamically assigned which makes it difficult to configure the firewall.
You can pass some kernel configuration parameters to erlang to tell it what range of ports to use. A 'min' and 'max' port value can be configured. By setting these to the same value you can ensure only a single port is used. This can be configured like this:
This would ensure the port is number 4000. If you are using yaws then you can pass this information to yaws with the 'erlarg' argument:
Categories: erlang
You can pass some kernel configuration parameters to erlang to tell it what range of ports to use. A 'min' and 'max' port value can be configured. By setting these to the same value you can ensure only a single port is used. This can be configured like this:
erl -name "mynode" -kernel inet_dist_listen_min 4000 inet_dist_listen_max 4000
This would ensure the port is number 4000. If you are using yaws then you can pass this information to yaws with the 'erlarg' argument:
yaws -i -name yaws -erlarg "-kernel inet_dist_listen_min 4000 inet_dist_listen_max 4000"
Categories: erlang

0 Comments:
Post a Comment
<< Home