For IPSec, the common deployment is using Pre-Shared key which needs to be configured at both firewall ends. This is the key used conceptually to encrypt/decrypt. You can look for exact way of encryption/decryption as IPSec IKEv1 goes through phase 1 and phase 2.
Feb 15, 2019 What is a Firewall? | Definition and Working of Firewall Aug 23, 2017 What is a firewall and what protection should I use? | McAfee Nov 26, 2019 What is a NAT firewall, How Does it Work and When Do You
Sep 06, 2019
A firewall is a feature on a network that blocks or prevents unwanted access. Firewalls have evolved rapidly over the past 20 years and are nothing like what they were when the internet was in its infancy. Most people want a firewall on their network for the sense of security that it provides. Understanding Firewalls for Home and Small Office Use | CISA Jun 17, 2009
Sep 27, 2016
How Firewalls Work? | Firewall Security for Network Protection