sudo apt update && sudo apt install wget
wget https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-1+debian$(cut -d"." -f1 /etc/debian_version)_all.deb
sudo dpkg -i zabbix-release_6.0-1+debian$(cut -d"." -f1 /etc/debian_version)_all.deb
apt update
apt -y install zabbix-agent
#
#ufw allow 10050/tcp
#nft add rule ip filter input ct state new tcp dport 10050 counter accept comment "ZABBIX"
#netsh advfirewall firewall add rule name="Open Zabbix agentd port 10050 inbound" dir=in action=allow protocol=TCP localport=10050
#netsh advfirewall firewall add rule name="Open Zabbix agentd port 10050 outbound" dir=out action=allow protocol=TCP localport=10050
#netsh advfirewall firewall add rule name="Open Zabbix trapper port 10051 inbound" dir=in action=allow protocol=TCP localport=10051
#netsh advfirewall firewall add rule name="Open Zabbix trapper port 10051 outbound" dir=out action=allow protocol=TCP localport=10051
systemctl enable zabbix-agent

nano /etc/zabbix/zabbix_agentd.conf
Server=zbx.example.com
ServerActive=172.16.0.21
Hostname=zbx.example.com
systemctl restart zabbix-agent