Centos7/RHEL7 FirewallD — the least you need to know

This post is just a simple hints-tips to get something going with FirewallD without going into too much detail.

  1. Checking if you are using firewalld:
    • firewall-cmd –state
  2. Check your zones (needed later when opening ports):
    • firewall-cmd –get-default-zone
    • firewall-cmd –get-active-zones
  3. Checking what is active:
    • firewall-cmd –zone=public –list-all
  4. Opening services:
    • firewall-cmd –zone=public –add-service=http
      Or alternatively:
    • firewall-cmd –permanent –zone=public –add-service=http
    • firewall-cmd –reload
      Services are defined in /usr/lib/firewalld/services and /etc/firewalld/services.
  5. Opening ports:
    • firewall-cmd –permanent –zone=public –add-port=443/tcp
    • firewall-cmd –reload

About alex

Owner of this website...
This entry was posted in Infrastructure, Z1 and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *