Hello Vishnu,
What is the version of RFC SDK library you're using on this? Is it the newest 7.20? In that case, you'll need to either check your rfcexec.sec file and your rules (check SAP Note 1581595, last section).
Additionally, please also review SAP Note 1768270, which explains why the new release denied external access.
I hope this helps.
Best Regards,
Guilherme de Oliveira