I have 2 Linux VMs and they refuse to connect [to each other] by port 80 (HTTP)

Richard E 0 Reputation points
2024-05-06T20:33:36.63+00:00

Hello all, I'm new here and I have a problem.

I feel that I am missing something, but I continue to be blocked.

I am trying to make one of the vms into a internal mini-repo so the other vm can pull packages from.

I have two (2) VM in Azure and in a single resource group (both Alma9 Linux)

These VM are on the 10.0.0.0/16 VNET "LuTest"
I have the default subnet: default 10.0.0.0/24

LuServer: Virtual machine LUTEST Linux Standard_B2s 20.79.###.### 10.0.0.6

LuMGT: Virtual machine LUTEST Linux Standard_B2s 20.79.###.### 10.0.0.4

Two vNICs

luserver6_z1 Network interface 10.0.0.6 default

lustremgt313_z1 Network interface 10.0.0.4 default

[I can ping each other, I can ssh to each, and to each other. I can update from the internet]

{But I can't telnet 80 from each other]

[rdxxxx@LuMGT ~]$ telnet 10.0.0.6 80

Trying 10.0.0.6...

telnet: connect to address 10.0.0.6: No route to host

[Do I need to create a route for 2 VM on the same segment?]

I have a network secruity group.

LuServer-nsg is applied to the default subnet.

I added these rules to open port 80 as only 22 is open (generally).

Rule Title Port Protocol Source Dest.

330 AllowAnyHTTPInbound_any 80 TCP Any Any Allow

1050 AllowAnyCustom80Outbound 80 TCP Any Any Allow

I have not set up any firewalls in Azure, on on the vms themselves [iptables, ufw]

LuServer-nsg Effective rules.

Inbound rules

NamePrioritySourceSource PortsDestinationDestination PortsProtocol****AccessSSH3000.0.0.0/0,0.0.0.0/00-655350.0.0.0/0,0.0.0.0/022-22TCPAllowSSH3000.0.0.0/0,0.0.0.0/00-655350.0.0.0/0,0.0.0.0/022-22TCPAllowAllowAnyHTTPInbound_any3300.0.0.0/0,0.0.0.0/00-655350.0.0.0/0,0.0.0.0/080-80TCPAllowAllowVnetInBound65000Virtual network (2 prefixes)0-65535Virtual network (2 prefixes)0-65535AllAllowAllowAzureLoadBalancerInBound65001Azure load balancer (2 prefixes)0-655350.0.0.0/0,0.0.0.0/00-65535AllAllowDenyAllInBound655000.0.0.0/0,0.0.0.0/00-655350.0.0.0/0,0.0.0.0/00-65535AllDenyOutbound rules

NamePrioritySourceSource PortsDestinationDestination PortsProtocol****AccessAllowAnyHTTPOutbound3200.0.0.0/0,0.0.0.0/00-655350.0.0.0/0,0.0.0.0/080-80TCPAllowAllowAnyHTTPOutbound3200.0.0.0/0,0.0.0.0/00-655350.0.0.0/0,0.0.0.0/080-80TCPAllowAllowVnetOutBound65000Virtual network (2 prefixes)0-65535Virtual network (2 prefixes)0-65535AllAllowAllowInternetOutBound650010.0.0.0/0,0.0.0.0/00-65535Internet (282 prefixes)0-65535AllAllowDenyAllOutBound655000.0.0.0/0,0.0.0.0/00-655350.0.0.0/0,0.0.0.0/00-65535AllDenyI feel I am missing something, but I don't know what.

So what is blocking 10.0.0.4 to telnet 80 to 10.0.0.6?

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,194 questions
{count} votes

3 answers

Sort by: Most helpful
  1. KapilAnanth-MSFT 36,316 Reputation points Microsoft Employee
    2024-05-08T11:19:18.95+00:00

    @Richard E ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    Looking at your scenario, this clearly indicates there is an OS Level filtering firewall blocking the traffic.

    • I see SSH from one VM to the other and vice versa succeeds
    • I also see ICMP Ping from one VM to the other and vice versa succeeds
    • This means, routing should be fine between the two VMs

    Wrt, "[Do I need to create a route for 2 VM on the same segment?]"

    • No
    • As long as the VMs are in the same VNET, we do not have to add any manual routes.

    As next steps,

    For Platform troubleshooting, you can consider using

    • IP flow verify or
    • NSG diagnostics
    • Make sure you run the test with the VM which listens at 80, and Direction as Inbound.
      • Local Port becomes 80
      • Remote port becomes 1234 and the remote IP becomes 10.0.0.4
    • Similarly, run the same test but this time use the VM which is expected to initiate the connection and Direction as Outbound
      • Local Port becomes 1234
      • Remote port becomes 80 and the remote IP becomes 10.0.0.6

    Please share a screenshot of the same.

    In case the above succeeds,

    • This means the issue is at the OS level
    • As next steps, you have to collect tcpdump at both the servers simultaneously.
    • Make sure you start the tcpdump in both the servers,
      • First ping the 10.0.0.6 from 10.0.0.4
      • Second telnet the 10.0.0.6 from 10.0.0.4 for port 22 (SSH)
      • Third telnet the 10.0.0.6 from 10.0.0.4 for port 80 (HTTP)
    • Then stop the tcpdump
    • See if the first two (ICMP and SSH) packets are captured
      • If you see packets destined to 80 at 10.0.0.6 but the 10.0.0.6 is not responding, it means there is an OS/Application issue
      • If you don't see any packets at all (for port 80) in 10.0.0.6, do let us know.

    Cheers,

    Kapil


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more