Yeah its legal , if you didn't done it before then I suggest you to make a java server first its not hard you can setup a java server in max 1h if everything goes right . You will have to download some programs and make sure that you have external ip otherway you will need to download hamachi to you'll have to open ports if you got router , well just download teamviewer I can setup the server for ya.