hello people,
I am very new to this forum and its my firs post

I want to create a simple client server c++ application for exchange of messages over internet
I have written a client server using TCP,sockets and is working perfectly on Internet . But the thing is I manually have to open the router ports... that is I have to configure router my self.
Could you please guide me what should I look for so that my code can work for intenret without manually opening ports.
We use several messengers, we nerver have to manually open the port so how they operate.
The client server code is very simple and basic.
I heard about UPnP and hole punching.
Reverse port tunneling. Would it help.??

And I am developing it on Linux.
Please I will appreciate your help and if you can give me a sample of code. I am a novice in network programing
Regards