Circling back to this, I've been researching whether this is possible with pfSense's current strongSwan implementation or whether a code change would be required. Unfortunately, this isn't currently possible. Here's why:
The Core Issue: socket-default vs socket-dynamic
strongSwan has two socket plugins that handle IKE packet transmission:
socket-default (what pfSense uses): Opens two fixed UDP ports (500 and 4500) at daemon startup. These ports are shared globally by all connections. The local_port setting in swanctl.conf is ignored because the socket layer doesn't support per-connection ports.
socket-dynamic: Opens sockets dynamically on a per-connection basis, allowing each tunnel to specify its own local_port. However, this plugin is marked as experimental and has significant limitations.
Why socket-dynamic Isn't a Simple Solution
Cannot use port 500 - The plugin enables UDP encapsulation on all sockets, so standard IKE packets without the non-ESP marker are incorrectly processed as ESP by the kernel. You must use NAT-T ports (4500+) exclusively.
No coexistence - You cannot load both socket-default and socket-dynamic simultaneously. The socket layer operates at the daemon level, not per-connection. Both plugins would attempt to bind the same ports, and only one would actually receive packets.
Requires remote NAT-T port - Connections must set remote_port = 4500 (or another NAT-T port), limiting interoperability.
Current Workarounds
Multiple WAN IPs: Bind each tunnel to a different source IP address via the Phase 1 Interface setting
Different remote ports: If your VPN vendor can accept connections on different remote ports, pfSense does support per-connection remote_port settings
References
strongSwan FAQ on custom ports: https://docs.strongswan.org/docs/latest/support/faq.html
strongSwan socket-dynamic discussion: https://github.com/strongswan/strongswan/discussions/927
swanctl.conf local_port documentation: https://docs.strongswan.org/docs/5.9/swanctl/swanctlConf.html
Hope this helps anyone else investigating this limitation.