简体   繁体   中英

telnet to azure vm port from outside

I want to telnet virtual machine on port 1234. I have server.exe running on vm which listens to port 1234.

When I run telnet within virtual machine cmd "telnet 127.0.0.1 1234" response is

"ok"

However when I run telnet from outside using "telnet publicIP 1234" response is

Connecting To publicIP...Could not open connection to the host, on port 1234: Connect failed

I have added endpoints in azure portal and tried switching off the firewall from both virtual machine and my local machine.

Can anyone please suggest?

Two things to consider:

  1. Make sure that your server.exe listens also the VM network adapter, but not only on 127.0.0.1
  2. Make sure that your ISP ( Internet Provider) does not block outgoing ports - very common issue.

To avoid (2) change the public port for the VM Endpoint to 80 and try with telnet publicIP 80

To make sure you comply with (1), while on the VM try telnet **localIP** 1234

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM