Skip to main content Skip to navigation

How can I see firewall configuration?

Using firewall-cmd. E.g.

[root@mike-test0:test: ~]# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources: 
  services: http https
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 
	rule family="ipv4" source address="137.205.0.0/16" port port="22" protocol="tcp" accept
[root@mike-test0:test: ~]# 

The above example shows that the services http and https are allowed from anywhere and port 22 is open to 137.205.0.0/16.