telnet to azure vm port from outside - azure

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:
Make sure that your server.exe listens also the VM network adapter, but not only on 127.0.0.1
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

Related

Azure VM and Visual Studio Code

I have an Azure VM running an Ubuntu 18.04 os. On this VM I created an NSG with Ports 80 and 22 Inbound rule. When trying to install VSCode on the VM, however, the code server starts on port 8080.
Then I tunneled port 8080 to 80, but I simply cannot establish a Connection from the browser to my VSCode when I try to load http://<public ip adress>:80
What am I doing wrong???
I thank you in advance for your help!
PuTTY Configuration
Run VSCode on Ubuntu
NSG Rules
Your server is listening only on interface 127.0.0.1 which represents your VM. If you want to listen on any address (including your public IP), let your server listen on 0.0.0.0 instead.

Can't connect to azure linux VM on port 9200, but ssh works

Installed ElasticSearch on a linux VM in Azure, put in on a Vnet with a public IP and a security group with ports 9200 and ssh 22 open.
I can ssh into the VM. On the VM itself, I can reach port 9200.
But on my PC, when I try to hit the {public IP}:9200, I get a 502 bad gateway? Anyone know why?
Ok, needed to set the following line in the /etc/elasticsearch/elasticsearch.yml file;
BEFORE
#
#network.host: 192.168.0.1
#
AFTER
#
network.host: [_local_, _site_]
#

Azure VPS not opening any ports no matter what

I'm trying to open several ports on Azure. I have a single VPS with a single network security group with a single virtual network and subnet. Everything seems to be configured correctly, check images:
But trying to ping any port, for instance 8080:
nc -zv 52.166.131.228 8080
nc: connect to 52.166.131.228 port 8080 (tcp) failed: Connection refused
running desperate here, I've followed the guidelines to no avail https://learn.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-nsg-quickstart-portal ...any idea what I'm missing??
According to your error, I think you should check your service firstly. I don’t find 8080 is listening according to your output.
Please ensure port 8080 is listening, you could try to use telnet for test in your VM firstly.
telnet 127.0.0.1 8080
Notes: NSG could associate to VM and subnet.
Please refer to this article about how to manage NSG
I notice that your port 5432 is only listening on 127.0.0.1. I think you should check your configuration. If you want to access port 5432 with public IP, the port should listening on 0.0.0.0

Azure resource manager windows VM accessing endpoints from internet not working

I have installed mirthconnect on windows virtual machine in azure resource manager. I am able to access admin console with http://localhost:8080 .But same is not accessible from internet. I have added endpoints in network security.
Is there any other configuration I am missing here ?
I am able to RDP to the machine . I have tried with source as * and destination as * also . But still no luck.
I am not able to telnet also with the VM public IP and the given ports.
Connect to your Virtual Machine, Open the Firewall Advanced Settings and add an exception for the port 8080 as the EndPoint Configuration doesn't do that for you
Did you allow 8080/TCP from anywhere, for all profiles in Windows Firewall?
Is you daemon listening on 0.0.0.0 or just 127.0.0.1?
netstat -ban
should give you the answer there.
e.g.
[spoolsv.exe]
TCP 0.0.0.0:1540 0.0.0.0:0 LISTENING
[lsass.exe]
TCP 0.0.0.0:2179 0.0.0.0:0 LISTENING
[vmms.exe]
TCP 0.0.0.0:5357 0.0.0.0:0 LISTENING
If you're only listening on localhost (127.0.0.1) you need to address the configuration of your daemon and then restart it.

Why do I get an error when connecting to port 80 between guests

I have two VMs. Both on the nat (vmnet8) adapter. Both machines appear to be on the same subnet.
Guest1 - 192.168.18.146
Guest2 - 192.168.18.150
I can ssh between the machines. However, when I try http it fails:
[root#localhost conf]# wget 192.168.18.146
--2016-02-18 09:53:03-- http://192.168.18.146/
Connecting to 192.168.18.146:80... failed: No route to host.
How can I access a webserver hosted on guest1 from guest2?
I have also tried a custom adapter and bridged with the same result.
OS firewall issue. I originally verified that iptables was not running but another service, firewalld was running and blocking access to port 80. Disabling the firewall allows me to access port 80 from my guests and host.

Resources