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.
- sudo nft add rule inet filter input tcp dport 80 accept
- sudo nft add rule inet filter input tcp dport 443 accept
Below commands used to Permanently Set SELinux to Permissive Mode.
- Edit the SELinux configuration file:
sudo vi /etc/selinux/config
- Change the SELINUX=enforcing line to SELINUX=permissive to make it permissive after reboot.
- Reboot the server to apply the change.
Thank You!