This page lists some useful resources for a more in depth understanding on specific subjects. Assumed is that you have a basic understanding of Linux and Networking. If not, you might to start with one of the followings books
A good way to understand more about networking is two setup two computers: a server and a client. And the play around with the tools. The following tools and documentation are extremely useful
Although there is more abstract software to manage firewalls, like ufw on debian-based systems and firewall-cmd on redhat systems, Iptables will help you understand what actually happens during filtering, mangling or routing a package. https://www.frozentux.net/iptables-tutorial/iptables-tutorial.html has a structured approach in explaining what happends when a package hits the firewall.
Please have a look at http://www.robinkrens.nl/gfw.html
Here are some good cheatsheets for commonly used tools