80,443 ports are not worked in linux machine

Rajesh Gandhavarapu 1 Reputation point
2022-06-29T03:02:54.737+00:00

I am new to azure and I created a Redhat Linux machine and I installed tomcat on it. I changed port from 8080 to 80, tomcat is working fine and I changed port perfectly. I enabled ports 22,80,443 in NSG, except 22 other ports are not working. I don't know what the reason is.

This is my NSG setup

215951-110.png

When I am searching in google I'll get this output:

215914-az1.png

when i used this command I'll get this output:

tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN 905/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1845/sshd
tcp6 0 0 :::5355 :::* LISTEN 905/systemd-resolve
tcp6 0 0 :::22 :::* LISTEN 1845/sshd

please anyone helps me regarding this issue.
Thanks in advance.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,087 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Manu Philip 20,211 Reputation points MVP Volunteer Moderator
    2022-06-29T03:34:23.073+00:00

    I guess, the local firewall ports are blocking for a public access.
    I assume that you are using RHEL 7 or above
    Check, if the firewall is active by the command: firewall-cmd --state
    To add the port 80 in exclusion list, you may use the commands:

    sudo firewall-cmd --zone=public --add-port=80/tcp --permanent  
    sudo firewall-cmd --reload  
    firewall-cmd --list-all   
    

    ----------

    --please don't forget to upvote and Accept as answer if the reply is helpful--


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.