How to open ports on azure virtual machine? - azure

I set a new port by Add EndPoints option but it does not open that specific port on azure virtual machine.... i checked using following link
can any one tell me how to resolve this issue?
http://postimg.org/image/wb5rid6ib/
TCPSockets endpoint is not open on my virtual machine

Add-AzureEndpoint opens a port at the Azure firewall not your at your VM's side. That means after opening the port in Azure, you have to open the port at your VM's individual firewall, too. Depending on your operating system that could be done differently. E.g. in Windows Server you would configure the Windows Firewall.
More precisely, Add-AzureEndpoint create a port forwarding rule from the specified public port to the private port you have specified for your VM.

Related

Can't open Azure VM Port

I'm trying to open port 8080 on an Azure VM so that I can access SSAS through Power BI from my local computer. I have added an inbound rule to the network security group on azure portal as per https://learn.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal and I've also added an inbound rule on the firewall of the VM itself.
However, when I go to canyouseeme.org it can't see port 8080.
Any ideas what I'm doing wrong?
You also have to make sure that the firewall running on the virtual machine itself is disabled, or allows the specific ports you are interested in.
See here:
https://wiki.u-gov.it/confluence/display/SCAIUS/How+to+disable+firewall+inside+a+linux+virtual+machine
According to your description, I suggest you could check as the following steps:
1.Check Azure VM NSG, port 8080 should be open.
Note: The link you provided is open port on Vnet subnet, You also need open port on VM's nic.
2.Open port on your VM's Windows Firewall.
3.Port 8080 should be listening on your VM. You could use netstat -ant|findstr 8080 to check it. If it is not listening, maybe you need check your configuration. This link maybe helpful.
Note: The port should listen on 0.0.0.0. If it is listening on 127.0.0.1, it only could access inside VM.
1)Go to VM & open desired port in local firewall setting
Control Panel\System and Security\Windows Defender Firewall
click link -Advanced settings->Inbound rules ->New Rules
select Port option and add your desired port
2)Also On azure, In VM networking, whitelist the port
3 ) netstat -ant|findstr
Above steps worked for me.
The solution was to redeploy the VM after opening the ports on the Azure portal.

Azure Virtual Machine not accessible after RDP port changed

I've changed RDP port to 8080 in registry on my Azure Virtual Machine (Windows Server). Now it is not accessible from outside, I cant connect it.
Azure VM is managed by Resource Manager (not Classic VM).
UPDATE:
Turning secuiruty rules so allow all not helped.
I've changed RDP port to 8080 in registry on my Azure Virtual Machine
(Windows Server)
We can use CustomScriptextension to check if RDP listening on port 8080.
netstat -ant | findstr "8080"
If your port not listening on Port 8080, we may need to restart RDP service.
If RDP listening on port 8080, we can use CustomScriptextension to disable windows firewall.
netsh advfirewall set allprofiles state off
About Extension, we create a ps1 file with the command, and upload it via Azure portal.
Azure has to know to allow traffic through to your VM. By default, on a Windows VM, only RDP is open. But you (for some reason) changed the RDP port in Windows Server. You need to do this with the network interface as well, via the VM settings (which has nothing to do with Windows itself):
Via Settings, go to Network Interfaces
Select your network interface and go to Network Security Group
From network security group, add an inbound rule for port 8080 (or modify the existing RDP rule to be port 8080).
It used to be possible to change your RDP port in Classic portal using endpoints. but in RM portal you cannot change your RDP port.
If you are trying to secure your box or by pass the security firewall to connect to your box, I recommend using Azure Load Balancer NAT rules, you can create a NAT rule to translate a custom port to 3389, and then you can only allow connectivity from LB to your VM, this a trick I use when I want to by pass the corporate's firewall, for example port 443.
Make sure you attach the LB to your VM from the NAT rule section
To access any port from public ip client -
Enable port in Azure firewall (if installed)
Enable Port in Network Security Group (add inbound rule) rule like 8080 -> 8080 or rule like 80 -> 8080
Enable Port in Windows Firewall of VM (on azure) -- most important if port is other than 80 and 443. - e.g. 8080, 8090 etc..

Cannot access Neo4j browser on a Windows Server

I have a Windows Server 2012 virtual machine provisioned on Azure. I installed Neo4j server on this virtual machine and I'm accessing the Neo4j browser on localhost:7474.
However I cannot access the browser outside using my virtual machine's public IP e.g <machineIP:7474>
Here's what I have done so far:
In the Azure portal, I added inbound rules for the NSG to allow http and https ports 80 and 443 (I have done the same on a Linux virtual machine also hosted in Azure and I can access the browser just fine)
I also added an inbound rule in Windows Firewall to allow Port 80 and 443 as well
What possibly blocks me from accessing the virtual machine's IP from the outside?
You have to add TCP port 7474 to the firewall in the Azure portal:
change your neo4j-server.properties
set
org.neo4j.server.webserver.address=0.0.0.0
To remotely access Neo4j installed on a Windows VM in Azure, these are the changes you'll need to make:
In the Azure portal, add TCP port 7474 to the Endpoints of your Windows VM
On your Windows VM, in the Windows Firewall Advances Security, add a new Inbound Rule for port 7474
Change the conf/neo4j.conf and uncomment this line:
org.neo4j.server.webserver.address=0.0.0.0
Note: In case you also want full access to Neo4j's browse interface including Bolt, then also add port 7687 both in the Azure Endpoints and the Windows Firewall.

Azure VM (ARM) external port not working

I am trying to open port 8080 in a Windows Azure virtual machine. I have a test website listening in that port, and I am able to access it via localhost, so the website is running.
I have also opened the port in the firewall and created an inbound security rule in azure portal for the virtual machine, but the port doesn't seem to be open to the outside world. I have tried accessing it both via the IP address and the DNS with the same results.
Is there anything else I should be doing?

how to connect to windows azure vm-hosted team foundation server?

I installed TFS on windows azure VM, this VM has public ip:42.134.156.116 for example,i find it is with the port 63630 indeed when i remote this VM with using a downloaded .RDP file.
In visual studio on my local machine, i can not connect to this tfs via its public IP.
I think this maybe a port or firewall issue,but not exactly. because vm has the port 63630 and tfs defualt port is 8080, in addition:the inbound rule of port 8080 has the Profiles "private" and "public", ,
any help?
In Azure go to the VM and click on the endpoints and enable 8080 for your TFS.
Azure also has firewall rules as well as your local VM. The VM as you mentioned looks to have 8080 inbound open.
Regarding your local VM firewall, whether it is public or private depends on what type of network you assigned to your local VM network.
Then try to telnet from your local machine to your VM to confirm the port is open.
Then if that works you should be able to connect. If you can't after that point, it is a TFS or VS Configuration issue.
If you are having troubles, I normally find it good to disable ALL firewalls, get a good connection, then switch them on one by one until you find out which one is causing the issue.

Resources