How to configure the firewall centos7 allows only a few specific IP access my server?

I have some problems about centos 7 of firewall. I want to achieve is only allowed a few specific IP access my server a few fixed ports. But I tried several method can’t achieve the result that I want. And i don’t understand the zone, source so on. who can help me? or give me some suggests

Hi try with this command : -

firewall-cmd --permanent --zone=public --add-rich-rule=“rule family=“ipv4” source address=“XX"XX:XX:XX/24” service name=“http” accept”