6

My Azure Website has trouble connecting to a distant system.

I cannot access the distant system so my only option would be to TELNET on an IP and port from my azure hosting environment. The issue is can't access this environment as it's directly hosted by azure, it's not a VM.

Is it possible to TELNET from an Azure-hosted website to a remote site ?

A_V
  • 173
  • 1
  • 1
  • 4
  • 2
    azure web apps have a basicc console https://stackoverflow.com/questions/38725395/how-to-remote-desktop-to-azure-app https://stackoverflow.com/questions/28296974/how-console-in-new-windows-azure-portal-works you can see telnet is working – Aravinda Sep 15 '17 at 01:56
  • but in console when you try telnet it says 'telnet' is not recognized as an internal or external command, operable program or batch file. – Aravinda Sep 15 '17 at 01:57
  • @Aravinda tcpping works on Kudu Console. I update my answer. – Shui shengbao Sep 15 '17 at 02:08

1 Answers1

12

According to your scenario, you could use Azure Web Job.

WebJobs is a feature of Azure App Service that enables you to run a program or script in the same context as a web app, API app, or mobile app. There is no additional cost to use WebJobs.

You could write a script to determine connectivity, web job and web app run in the same context.

Update:

Thanks for Aravinda's share. Another easy way is Kudu Console. Telnet does not supported on Kudu, but Azure provides a tool tcpping. Please refer to this blog.

For example:

tcpping www.google.com:80

enter image description here

Shui shengbao
  • 3,503
  • 1
  • 10
  • 20