1) connect to two different machines accross the internet/lan
2) connect from one machine to the other accross the internet/lan
If the awnser is 1 then setup both machines to use the same port No (DO NOT use the default it is a security risk - EVERYONE knows this info!), enter port exceptions in any firewal you have
IF one or both machines are behind routers then set up port settings in the virtual server(s)
If Awnser is 2 then:
Set each machine up to use a different port then add them to your virtual server ( if you are using a router), also add port details for each machine to any firewall you may be using.
This is how I set my clients machines up (hosting)