Try setting the system variable jgroups.udp.ip_ttl to a higher value. The default is 2.
This can also caused by the network switch dropping multicast packets when routing the traffic from one network to the next.
Your best option is to keep both nodes in the same subnet. Hope it helps.
Thanks for your reply. I had put aside the issue for some time due to other priorities.
Your reply made me dig in to it again and I managed to solve the issue.
After all, the problem was related to my /etc/hosts file. The hostname was linked to the loopback adres, and apparently, the hostname is used for clustering config. As a result, all clustering ports were listening on the loopback interface.