Hello all,<br><br>I would like be able to have traffic using specific ports to use different SA's similar to this post:<br><br><a href="https://lists.strongswan.org/pipermail/users/2008-October/002854.html" target="_blank">https://lists.strongswan.org/pipermail/users/2008-October/002854.html</a><br>
<br>I have two boxes running rhel 5.2 and openswan 2.6.20 in a private lab using netkey protostack. Similar to the post above I would like to have traffic using tcp/22 use a set of SA's and tcp/23 use a set of SA's. <br>
<br>Below is part of my ipsec.conf file to get this working<br>
<br>conn allow-ssh<br> phase2alg=null-sha1-96<br> leftprotoport=6/22<br> rightprotoport=6/0<br> also=vpn-test<br><br>conn allow-telnet<br> phase2alg=3des-sha1-96<br>
leftprotoport=6/23<br> rightprotoport=6/0<br> also=vpn-test<br><br>conn vpn-test<br> authby=rsasig<br> keyexchange=ike<br>
keyingtries=5<br> ike=aes128-sha1-96<br> type=tunnel<br> pfs=yes<br> left=192.168.100.217 # Local vitals<br> leftid=@oswan2<br> leftrsasigkey=0sAQN+bc6MUiFE1P77NOt5v...<br>
# leftnexthop= # correct in many situations<br> right=192.168.100.216 # Remote vitals<br> rightid=@oswan1<br> rightrsasigkey=0sAQPQAdHkT3ZJ86rdYFDNF...<br> auto=add # authorizes but doesn't start this<br>
# connection at startup<br><br><br> No matter what we try when attempting to distinguish traffic of the same protocol (wether udp or tcp), the traffic ends up using the same set of SA's. However, I can get the traffic to use different SA's if I breakup the traffic using ICMP, TCP and UDP rules in my ipsec.conf file as below...<br>
<br><br># /etc/ipsec.conf - Openswan IPsec configuration file<br>#<br># Manual: ipsec.conf.5<br>#<br># Please place your own config files in /etc/ipsec.d/ ending in .conf<br>
<br>version 2.0 # conforms to second version of ipsec.conf specification<br><br># basic configuration<br>config setup<br> # Debug-logging controls: "none" for (almost) none, "all" for lots.<br>
# klipsdebug=none<br> # plutodebug="control parsing"<br> # For Red Hat Enterprise Linux and Fedora, leave protostack=netkey<br> protostack=netkey<br> nat_traversal=no<br> interfaces="ipsec0=eth0"<br>
<br>conn allow-tcp<br> esp=3des-sha1-96<br> leftprotoport=tcp<br> rightprotoport=tcp<br> also=vpn-test<br><br>conn allow-icmp<br> esp=null-sha1-96<br> leftprotoport=icmp<br> rightprotoport=icmp<br>
also=vpn-test<br><br>conn allow-udp<br> esp=3des-md5-96<br> leftprotoport=udp<br> rightprotoport=udp<br> also=vpn-test<br><br>conn vpn-test<br> authby=rsasig<br> keyexchange=ike<br>
keyingtries=5<br> ike=aes128-sha1-96<br> type=tunnel<br> pfs=yes<br> left=192.168.100.217 # Local vitals<br> leftid=@oswan2<br> leftrsasigkey=0sAQN+bc6MUiFE1P77NOt5v...<br>
# leftnexthop= # correct in many situations<br> right=192.168.100.216 # Remote vitals<br> rightid=@oswan1<br> rightrsasigkey=0sAQPQAdHkT3ZJ86rdYFDNF...<br> auto=add # authorizes but doesn't start this<br>
# connection at startup<br><br><br>#include /etc/ipsec.d/*.conf<br><br>#Disable Opportunistic Encryption<br>include /etc/ipsec.d/policies/no_oe.conf<br><br><br>We have this working using two Cisco routers and our next test was to see if we could get this working using openswan. Anyone have ideas of why this traffic is not using diff SA's when trying to distinguish diff traffic?<br>
<br><br>Thanks, Phillip<br>