<div dir="ltr"><div><div>Helo,<br><br></div><div>Finally IKEv2 (with 5.1.0dr2) supports IPsec transport mode in NAT presence. Thank you, Martin!<br><br>I would like to switch my application that relies on strongSwan to use IPsec transport mode, but because of compatibility considerations, I can't simply remove support for legacy IPsec tunnel mode* (i.e. newer application versions must still be able work with older versions).<br>
<br>Is there a way to configure strongSwan 5.1.0dr2 so that with the same ipsec.conf template it could always negotiate:<br>1. IPsec transport mode when peer is using the new strongSwan 5.1.0dr2<br>2. IPsec tunnel mode when peer is using the old strongSwan 5.0.4 (i.e. as a fallback mechanism)<br>
<br></div><div>Do I really need two conn templates in ipsec.conf file (one for transport mode and one for tunnel mode)?<br>If so, then how do I tell strongSwan to chose transport mode over tunnel mode when both applications are using the new strongSwan 5.1.0dr2?<br>
</div><div><br></div><div>My application is also implemented in P2P fashion. All it receives 
is remote IP address and credentials (it does not receive peer's strongSwan version). Also ipsec.conf is symmetric and both sides can initiate IPsec.<br></div><div><br></div><div>Thank You,<br></div>SW<br><br><br></div>
<div>P.S.<br></div><div><br></div><div><div>*Currently, I have implemented IPsec tunnel mode so that the peer that is behind the NAT installs <br>1. iptables rule that SNATs packets from its local IP address to the public IP address and<br>
2. iptables rule that DNATs packets from the public IP address to its local IP address. <br></div><div>Something like emulating transport mode on top of tunnel mode. These iptables rules are inserted from updown script.<br>
</div><br></div></div>