To pass IPSec traffic through a firewall, the following ports and protocols need to be opened.
1. UDP port 500 (isakmp)
2. Protocol ESP (protocol 50)
3. Sometimes protocol AH needs to be opened
So, for the first 2 an example in terms of ACLs will be:
access-list 101 permit udp 500
access-list 101 permit esp