you need have a static ip + open port on your network.,simply the malware/spyware are act as client then connect to your server based on your configure like (Local,Wan)
you can simply use a VPS for this method or you can open port on your internet router & make a static ip on your server pc but for this one take your own risk