Help Setting UP IPtables Rules

I have never used IPtables before, but my research tells me this is what I need to use to accomplish a specific task on my VPS running RedHat 7.3.

Here is what I need to do. I want to limit all inbound SMTP (port 25) traffic so that it is only accepted from 3 /24 blocks of IPs. All other IPs should be denied.

Can someone provide me with the commands I would need to accomplish this?

(Yes, I really do want to limit SMTP traffic this strictly.)

 

 

 

 

Top