Автор: Сергей
Настройка Firewalld Redhat
- systemctl status firewalld
- iptables -nvL
- # firewall-cmd --get-active-zones public interfaces: enp1s0
- # firewall-cmd --get-zone-of-interface=enp1s0 public
- # firewall-cmd --zone=public --list-interfaces enp1s0
- #firewall-cmd --list-all
- firewall-cmd --reload
- # firewall-cmd --permanent --list-all public (default) interfaces: sources: services: ssh dhcpv6-client masquerade: no forward-ports: icmp-blocks: rich rules:
- #firewall-cmd --get-services
- #firewall-cmd --info-service=ftp
- # firewall-cmd --reload
- #firewall-cmd --permanent --zone=public --add-service=zabbix-agent
- firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="10.44.1.31" service name="zabbix-agent" accept'
- /usr/lib/firewalld/services/
- firewall-cmd --permanent --zone=public --add-port=622/tcp
- firewall-cmd --zone=public --add-port=4990-4999/udp
- firewall-cmd --zone=public --add-rich-rule='rule family="ipv4" source address="10.44.1.31" drop'
- firewall-cmd --permanent --zone=public --remove-rich-rule='rule family="ipv4" source address="10.44.1.31" drop'
- firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="10.44.1.31" service name="ssh" drop'
- firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="10.44.1.31" service name="ssh" accept'
- firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="10.44.1.31/32" port protocol="tcp" port="8093" accept'