标签:firewall
[root@localhost ~]# firewall-cmd --get-default-zone public #查询当前默认区域 [root@localhost ~]# firewall-cmd --set-default-zone= #设置默认区域。会同时更改运行时配置和永久配置 [root@localhost ~]# firewall-cmd --get-zones block dmz drop external home internal public trusted work #列出所有可用区域 [root@localhost ~]# firewall-cmd --get-services amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability http https imaps ipp ipp-client ipsec kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind samba samba-client smtp ssh telnet tftp tftp-client transmission-client vnc-server wbem-https #列出所有预定义服务 [root@localhost ~]# firewall-cmd --get-active-zones public interfaces: eno16777736 virbr0 #列出当前正在使用的区域 [root@localhost ~]# firewall-cmd --list-all-zones #列出所有区域所有已配置接口、源、服务和端口信息 [root@localhost ~]# firewall-cmd --list-all public (default, active) interfaces: eno16777736 virbr0 sources: services: dhcpv6-client ssh ports: masquerade: no forward-ports: icmp-blocks: rich rules: #列出默认区域所有已配置接口、源、服务和端口信息 [root@localhost ~]# firewall-cmd --list-all --zone=home home interfaces: sources: services: dhcpv6-client ipp-client mdns samba-client ssh ports: masquerade: no forward-ports: icmp-blocks: rich rules: #列出指定区域的信息。--zone=home --permanent :下次开机生效 --runtime :立即生效 --reload :加载配置文件。可先--permanent,再reload。
标签:firewall
原文地址:http://chomper.blog.51cto.com/7866214/1694661