I am creating a rat (remote authoring tool). i need help with how to connect between the client and rat (server). I am currently using winsock.

I have been testing the code between me and my friend (using his ip address), but he is behind a router and firewall, so i cant get it to work.

Could somebody tell me how to get it to work over the internet, or link me to a tutorial?