Unable to open tcp ports 80 and 443 in RHEL VM 9.5 kernel version to browse site.

Shiva Prasad Reddy Chokkareddy 20 Reputation points
2024-12-10T05:29:29.77+00:00

Unable to open tcp ports 80 and 443 in in RHEL VM 9.5 kernel version to browse site. In NSG also ports 22,80 & 443 are allowed, only able to access port 22. No other firewall is configured other than NSG .

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

Accepted answer
  1. Mounika Reddy Anumandla 6,845 Reputation points Microsoft External Staff Moderator
    2024-12-13T07:38:41.4133333+00:00

    Hi
    As an original poster cannot accept their own answer, I am reposting it so that you can accept it an answer. Accepted answer will help other community members navigate to the appropriate solutions.

    Issue: Unable to open tcp ports 80 and 443 in RHEL VM 9.5 kernel version to browse site.

    Solution: Below work around which i found helped me to solve the issue.

    By adding the ports in the nft rules able to work with port 80 HTTP.

    and for accessing port 443 HTTPS.

    If SELinux is enforcing and causing issues, you can create a permanent solution to allow Nginx access to the certificate files.

    Below commands are used to add ports in nft rules.

    1. sudo nft add rule inet filter input tcp dport 80 accept
    2. sudo nft add rule inet filter input tcp dport 443 accept

    Below commands used to Permanently Set SELinux to Permissive Mode.

    1. Edit the SELinux configuration file:
       sudo vi /etc/selinux/config
      
    2. Change the SELINUX=enforcing line to SELINUX=permissive to make it permissive after reboot.
    3. Reboot the server to apply the change.

    Thank You!

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most 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.