I have an Azure VM with Windows Server 2012. It is running a Java application that binds and listens on a specific IP/port.

The server has an external IP, and is reachable on it (I RDP to it without issue).

The application requires an IP to bind to. I have tried:

  • External IP: java.net.BindException (which is understandable, as the machine does not know it has an external IP - ipconfig only reveals internal IP:
  • - can't reach from the Internet
  • (internal IP) - can't reach from the Internet

I have accessed the Network Security Group, which is associated with both the Network Interface as well as the Subnet. I have created Inbound and Outbound rules, allowing 'Any' protocol, 'Any' source, 'Any' destination, and the port used by the java application. All online sources tell me that this should suffice.

I have restarted the VM, but that did not help.

What can I check? What did I miss?

  • Can you access this java application on Azure VM? Does this application running? please run this command to check it netstat -ant. – Jason Ye Jul 31 '17 at 0:56

By default, we should binding your application to or

For your scenarrio, we should check the application running or not, we can use this command to check it:

netstat -ant

By the way, we can use telnet to test the public IP address with this port. Also we should check our local network settings, are there something block it.

Also, we should check windows firewall, we should add port to inbound rules.

  • I indeed forgot about windows firewall. I will check it tonight and respond back. Thank's for the tip! – Gerino Jul 31 '17 at 14:46
  • @Gerino Just want to confirm the current situations. Please feel free to let me know if you need further assistance. – Jason Ye Aug 1 '17 at 7:42
  • I added Incoming rule into the Windows Firewall. Such an obvious omission on my part. Thank you so much! <3 – Gerino Aug 1 '17 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.