fb_pixel

How to open HTTP port 80 and HTTPS port 443 with firewalld (RHEL 8 / CentOS 8)

IT & Software | Network & Security
Description
I installed Zabbix 5.0 in VirtualBox and I can't access it at http: / <IP> / zabbix .. Of course the connectivity on ssh works ...
Attachments
No attachments
Info
Description
1. Check the status of your firewall.
# firewall-cmd --state
running
 
2. Retrieve your currently active zones. Take a note of the zone within which you wish to open ports 80 and 443:
# firewall-cmd --get-active-zones
libvirt
  interfaces: virbr0 
public
  interfaces: enp0s3

3. Open port 80 and port 443 port.
The port 80 and port 443 ports are listed with Firewalld as http and https services. To temporarily open both ports execute:
# firewall-cmd --zone=public --add-service=http
# firewall-cmd --zone=public --add-service=https

4. Note, the above firewald commands will open HTTP and HTTPS port only temporarily.
Open port 80 and port 443 port permanently. Execute the below commands to open both ports permanently, hence, make the settings persistent after reboot:
# firewall-cmd --zone=public --permanent --add-service=http
# firewall-cmd --zone=public --permanent --add-service=https
# firewall-cmd --reload

5. Check for open ports/services. The services with permanently open ports are listed on line starting with services::
# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp0s3
  sources: 
  services: cockpit dhcpv6-client http https ssh
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules:

6. In case you need to close the previously open HTTP port 80 and HTTPS port 443 execute:

# firewall-cmd --zone=public --permanent --remove-service=http # firewall-cmd --zone=public --permanent --remove-service=https # firewall-cmd --reload


on May 21st, 2020 (5:23 pm)
All coments
This job has not been commented yet.