I'm trying to communicate 2 erlang nodes, server(on Amazon AWS) and client, over vpn. When I start the erlang shell I specified the node name and the cookie, but not work. There are special considerations for erlang communication via vpn? It is necessary to set the, in my case, tun0 device?
Thi is the routing result:
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.8.0.5 128.0.0.0 UG 0 0 0 tun0
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 wlan0
10.8.0.1 10.8.0.5 255.255.255.255 UGH 0 0 0 tun0
10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
46.51.166.55 192.168.1.254 255.255.255.255 UGH 0 0 0 wlan0
128.0.0.0 10.8.0.5 128.0.0.0 UG 0 0 0 tun0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
Thanks in advance!
I solved the problem.
This is the procedure.
Erlang server start by:
erl -name [email protected] -setcookie aStringCookie -kernel inet_dist_listen_min 9000 inet_dist_listen_max 9005
10.8.0.1 is the VPN server IP
Client:
erl -name [email protected] -setcookie aStringCookie -kernel inet_dist_listen_min 9000 inet_dist_listen_max 9005
10.8.0.6 is the VPN client IP
On the AWS security group i opened the 4369 TCP/UDP port and the other port used to initialize the server. I have also opened the ICMP port for the ping test.
In the VPN server configuration file you can enable/disable the line
push "redirect-gateway def1 bypass-dhcp" that redirect clients default network gateway through the VPN.
I tested some rpc an they work correctly.
Thanks all
Giovanni C
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With