How can I restrict mysql port to be accessed from 2 ip address?

I have APF firewall on RH9.

I would like to give access to only 2 or 3 IP address to the mysql port 3306 and block all and every other IP address from 3306

Also is masking possible on access list? I read the docs, but, I am so confused. I know how to block certain ip address, but, how can I block ALL IP address from 3306 port but allow only 3 IP address with possible masking?

Thx in advance

 

 

 

 

Top