Manage Firewall From Command Line

I searched for this matter in the forums and on google, but I was not able to find anything helpful.

I have installed this on a home server and I’d like to be able to run a command that will block or unblock ports or IPs at will. I know how to do this using the GUI… but this is not available at the time for other reasons.

If this is possible it’ll be great!

Thanks in advance,