im gonna code my own rat just wondering what functionality is best to allow it to phone home through a router is that upnp?

i code perl mostly but i am able to use c++ and a few others fairly well

i have an idea that it will need to phone home once it hits the vics isp ill handle that and the server client arch i just need an idea how to handle this
caveat with routers and firewalls and im no script kiddie so im writing my own

any help appreciated