Hi Abhishek,
In future please start a new discussion rather than replying to posts from several years ago :).
If you don't have direct access to connect to your MongoDB server, you'll need to set up an SSH tunnel or VPN for remote access. The instructions for this will be specific to your operating system, but you should be able to find relevant tutorials online.
There's also some information on security & best practices in the MongoDB manual which should be a helpful read:
Regards,
Stephen