Jonathan Jonathan - 1 year ago 78
Linux Question

How do I access a specific port on a VM in Azure's Resource Manager

I'm trying to relive my university days, by running my own MUD on azure portal, and have run into difficulty when connecting from the outside world.

For those that don't know, this has a fairly simple interface which listens on a port of your choice, and which doles out descriptors as they come in:

I set up an Ubuntu VM in Azure, which has an IP address that I can connect to from my machine via ssh, and successfully compiled and run the mud. I can connect on port 4020 inside the ssh session using telnet, but can't connect to port 4020 from my machine.

netstat -an | grep :4020
tcp 0 0* LISTEN

It seems to be listening correctly, so I tried to add an Inbound security rule to the Network Security Group. I gave it a higher priority (lower number) than the ssh rule, which seems to redirect all tcp ports connecting in to 22, but am still unable to connect.

Two rules:

Source: Any, Protocol: TCP, Port: 4020, Destination: Any, Port: 4020
Source: Any, Protocol: TCP, Port: *, Destination: Any, Port: 22

There doesn't seem to be any firewall enabled in Ubuntu (ufw is disabled), but I can't connect.

Anyone got any ideas where I should be looking next? I feel I've missed something really obvious.


You need to set your source port to *, not `4020. This is specifying where traffic is originating from, not where it's going to.