In general, Erlang does not provide a means for the sandbox code that the user can enter. You can try writing your own security code, but it is rather complicated.
A better choice would probably be a language like "safe haskell":
http://www.haskell.org/ghc/docs/7.4.2/html/users_guide/safe-haskell.html
which is specially made for this kind of thing.
The isolation provided by Erlang is not intended to protect against malicious modules that are being introduced. In fact, there is no such protection in a distributed case. Once two machines are connected, there is no limit to what you can do with another machine.
source share