Never played with iptables, but I prefer to control them in ufw where rules are easier to write.
Also, in terminal: man iptables
The manual gave you the arguments to make the rules, but as I said it's easier in ufw, and no, I don't know where the folders you are looking for are. Do a search in your file manager.
This tutorial had some commands for saving rules: https://snapshooter.io/blog/how-to-block-ip-accessing-your-linux-server-with-iptables-and-ufw-firewall