<html>
<body>
Hi.<br><br>
I have used the <i>openswan26.spec</i> to rpmbuild the tarball package in
my red hat enterprise es 3. All OK. I have installed the rpm with the
userland tool of openswan 2.1.1 and I have configured the configuration
files. I have defined a connection named &quot;conntest&quot; with an
other VPN gateway based on a superfreeswan.<br><br>
I think that the NAT-Traversal patch is still in the kernel because i
found a patch called <i>linux-2.4.21-ipsec.patch</i> in the
kernel-2.4.21-9.0.1.EL.src.rpm<br><br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
...<br>
# 03/06/16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; derek@ihtfp.com 1.1383<br>
# [IPSEC]: Implement UDP Encapsulation framework.<br>
#<br>
# In particular, implement ESPinUDP encapsulation for IPsec<br>
# Nat Traversal.<br>
...<br>
+<br>
+/* This defines the TYPE of Nat Traversal in use.&nbsp; Currently only
one<br>
+ * type of NAT-T is supported, draft-ietf-ipsec-udp-encaps-06<br>
+ */<br>
+struct sadb_x_nat_t_type {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
uint16_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sadb_x_nat_t_type_len;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
uint16_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sadb_x_nat_t_type_exttype;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
uint8_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sadb_x_nat_t_type_type;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
uint8_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sadb_x_nat_t_type_reserved[3];<br>
+} __attribute__((packed));<br>
+/* sizeof(struct sadb_x_nat_t_type) == 8 */<br>
+<br>
+/* Pass a NAT Traversal port (Source or Dest port) */<br>
+struct sadb_x_nat_t_port {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
uint16_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sadb_x_nat_t_port_len;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
uint16_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sadb_x_nat_t_port_exttype;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
uint16_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sadb_x_nat_t_port_port;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
uint16_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sadb_x_nat_t_port_reserved;<br>
+} __attribute__((packed));<br>
+/* sizeof(struct sadb_x_nat_t_port) == 8 */<br>
+<br>
...<br>
+/* The next four entries are for setting up NAT Traversal */<br>
+#define
SADB_X_EXT_NAT_T_TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
20<br>
+#define
SADB_X_EXT_NAT_T_SPORT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
21<br>
+#define
SADB_X_EXT_NAT_T_DPORT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
22<br>
+#define
SADB_X_EXT_NAT_T_OA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
23<br>
+#define
SADB_EXT_MAX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
23<br>
+<br>
...<br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br><br>
and this patch is applied in the <i>kernel-2.4.spec</i>. But at the
moment the Nat-T it's not a problem ...<br>
If I try to start the service ...<br><br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
[root@platoon etc]# service ipsec start<br>
ipsec_setup: Starting Openswan IPsec 2.1.1...<br>
ipsec_setup: insmod: ipsec: no module by that name found<br>
ipsec_setup: /sbin/insmod
/lib/modules/2.4.21-9.0.1.EL/kernel/net/key/af_key.o<br>
ipsec_setup: Using
/lib/modules/2.4.21-9.0.1.EL/kernel/net/key/af_key.o<br>
ipsec_setup: Symbol version prefix ''<br>
[root@platoon etc]#<br>
[root@platoon etc]# ipsec verify<br>
Checking your system to see if IPsec got installed and started
correctly:<br>
Version check and ipsec
on-path&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[OK]<br>
Linux FreeS/WAN U2.1.1/K2.4.21-9.0.1.EL (native) (native)<br>
Checking for IPsec support in
kernel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[OK]<br>
Checking for RSA private key
(/etc/ipsec.secrets)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[OK]<br>
Checking that pluto is
running&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[OK]<br>
Two or more interfaces found, checking IP
forwarding&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[OK]<br>
Checking NAT and MASQUERADEing<br>
Checking for 'ip'
command&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[OK]<br>
Checking for 'iptables'
command&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[OK]<br>
Checking for 'setkey' command for native IPsec stack
support&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[OK]<br><br>
Opportunistic Encryption DNS checks:<br>
&nbsp;&nbsp; Looking for TXT in forward dns zone:
platoon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[MISSING]<br>
&nbsp;&nbsp; Does the machine have at least one non-private
address?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[OK]<br>
&nbsp;&nbsp; Looking for TXT in reverse dns zone:
35.111.111.111.in-addr.arpa.&nbsp;&nbsp; [MISSING]<br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br><br>
all seems well but ...<br><br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
[root@platoon etc]# ifconfig ipsec0<br>
ipsec0: error fetching interface information: Device not found<br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br><br>
This is the interest part of /var/log/messages:<br><br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
[root@platoon log]#tail -f messages<br>
Mar 26 11:19:40 platoon ipsec_setup: Starting Openswan IPsec
2.1.1...<br>
Mar 26 11:19:40 platoon ipsec_setup: insmod: ipsec: no module by that
name found<br>
Mar 26 11:19:40 platoon ipsec_setup: /sbin/insmod
/lib/modules/2.4.21-9.0.1.EL/kernel/net/key/af_key.o<br>
Mar 26 11:19:40 platoon ipsec_setup: Using
/lib/modules/2.4.21-9.0.1.EL/kernel/net/key/af_key.o<br>
Mar 26 11:19:40 platoon ipsec_setup: Symbol version prefix ''<br>
Mar 26 11:19:40 platoon ipsec_setup: KLIPS ipsec0 on eth0
111.111.111.35/255.255.255.0 broadcast 111.111.111.255<br>
Mar 26 11:19:40 platoon ipsec_setup: ...Openswan IPsec started<br>
Mar 26 11:19:41 platoon ipsec__plutorun: ipsec_auto: fatal error in
&quot;packetdefault&quot;: %defaultroute requested but not known<br>
Mar 26 11:19:41 platoon modprobe: modprobe: Can't locate module
ripemd160<br>
Mar 26 11:19:41 platoon modprobe: modprobe: Can't locate module
cast128<br>
Mar 26 11:19:41 platoon ipsec__plutorun: ipsec_auto: fatal error in
&quot;block&quot;: %defaultroute requested but not known<br>
Mar 26 11:19:41 platoon ipsec__plutorun: ipsec_auto: fatal error in
&quot;clear-or-private&quot;: %defaultroute requested but not known<br>
Mar 26 11:19:41 platoon modprobe: modprobe: Can't locate module lzs<br>
Mar 26 11:19:41 platoon modprobe: modprobe: Can't locate module 
lzjh<br>
Mar 26 11:19:41 platoon modprobe: modprobe: Can't locate module
ripemd160<br>
Mar 26 11:19:41 platoon modprobe: modprobe: Can't locate module
cast128<br>
Mar 26 11:19:41 platoon modprobe: modprobe: Can't locate module lzs<br>
Mar 26 11:19:41 platoon modprobe: modprobe: Can't locate module 
lzjh<br>
Mar 26 11:19:41 platoon modprobe: modprobe: Can't locate module
ripemd160<br>
Mar 26 11:19:41 platoon modprobe: modprobe: Can't locate module
cast128<br>
Mar 26 11:19:41 platoon modprobe: modprobe: Can't locate module lzs<br>
Mar 26 11:19:41 platoon modprobe: modprobe: Can't locate module 
lzjh<br>
Mar 26 11:19:41 platoon ipsec__plutorun: ipsec_auto: fatal error in
&quot;clear&quot;: %defaultroute requested but not known<br>
Mar 26 11:19:42 platoon ipsec__plutorun: ipsec_auto: fatal error in
&quot;private-or-clear&quot;: %defaultroute requested but not known<br>
Mar 26 11:19:42 platoon ipsec__plutorun: ipsec_auto: fatal error in
&quot;private&quot;: %defaultroute requested but not known<br>
Mar 26 11:19:42 platoon ipsec__plutorun: 021 no connection named
&quot;packetdefault&quot;<br>
Mar 26 11:19:42 platoon ipsec__plutorun: ...could not route conn
&quot;packetdefault&quot;<br>
Mar 26 11:19:42 platoon ipsec__plutorun: 021 no connection named
&quot;block&quot;<br>
Mar 26 11:19:42 platoon ipsec__plutorun: ...could not route conn
&quot;block&quot;<br>
Mar 26 11:19:42 platoon ipsec__plutorun: 021 no connection named
&quot;clear-or-private&quot;<br>
Mar 26 11:19:42 platoon ipsec__plutorun: ...could not route conn
&quot;clear-or-private&quot;<br>
Mar 26 11:19:42 platoon ipsec__plutorun: 021 no connection named
&quot;clear&quot;<br>
Mar 26 11:19:42 platoon ipsec__plutorun: ...could not route conn
&quot;clear&quot;<br>
Mar 26 11:19:42 platoon ipsec__plutorun: 021 no connection named
&quot;private-or-clear&quot;<br>
Mar 26 11:19:42 platoon ipsec__plutorun: ...could not route conn
&quot;private-or-clear&quot;<br>
Mar 26 11:19:42 platoon ipsec__plutorun: 021 no connection named
&quot;private&quot;<br>
Mar 26 11:19:42 platoon ipsec__plutorun: ...could not route conn
&quot;private&quot;<br>
Mar 26 11:19:42 platoon ipsec__plutorun: 104 &quot;conntest&quot; #1:
STATE_MAIN_I1: initiate<br>
Mar 26 11:19:42 platoon ipsec__plutorun: ...could not start conn
&quot;conntest&quot;<br>
Mar 26 11:20:09 platoon modprobe: modprobe: Can't locate module
ipsec0<br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br><br>
BUT ... really ... the SA &quot;conntest&quot; was established.<br>
In fact:<br><br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
[root@platoon log]# ipsec auto --status<br>
000 interface lo/lo 127.0.0.1<br>
000 interface eth0/eth0 111.111.111.35<br>
000 interface eth1/eth1 192.168.100.1<br>
000 %myid = (none)<br>
000 debug none<br>
000<br>
000 &quot;conntest&quot;:
192.168.100.0/24===111.111.111.35...222.222.222.5---222.222.222.6===192.168.2.0/24;
erouted; eroute owner: #4<br>
000 &quot;conntest&quot;:&nbsp;&nbsp; ike_life: 3600s; ipsec_life:
28800s; rekey_margin: 540s; rekey_fuzz: 100%; keyingtries: 3<br>
000 &quot;conntest&quot;:&nbsp;&nbsp; policy: PSK+ENCRYPT+TUNNEL+UP;
prio: 24,24; interface: eth0;<br>
000 &quot;conntest&quot;:&nbsp;&nbsp; newest ISAKMP SA: #3; newest IPsec
SA: #4;<br>
000<br>
000 #6: &quot;conntest&quot; STATE_QUICK_I1 (sent QI1, expecting QR1);
EVENT_RETRANSMIT in 9s<br>
000 #4: &quot;conntest&quot; STATE_QUICK_R2 (IPsec SA established);
EVENT_SA_REPLACE in 28373s; newest IPSEC; eroute owner<br>
000 #4: &quot;conntest&quot; esp.2ba2ac1f@222.222.222.6
esp.42ef01c8@111.111.111.35 tun.0@222.222.222.6 
tun.0@111.111.111.35<br>
000 #3: &quot;conntest&quot; STATE_MAIN_R3 (sent MR3, ISAKMP SA
established); EVENT_SA_REPLACE in 3173s; newest ISAKMP<br>
000 #1: &quot;conntest&quot; STATE_MAIN_I4 (ISAKMP SA established);
EVENT_SA_REPLACE in 2720s<br>
000 <br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br><br>
<i>ISAKMP SA established</i> ... but I haven't the device ipsec0 and I
haven't any route to the &quot;rightsubnet&quot;.<br>
This is my configuration of openswan:<br><br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
[root@platoon etc]# cat ipsec.conf<br>
version 2.0<br><br>
config setup<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Debug-logging
controls:&nbsp; &quot;none&quot; for (almost) none, &quot;all&quot; for
lots.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # klipsdebug=all<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # plutodebug=dns<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
interfaces=&quot;ipsec0=eth0&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#interfaces=%defaultroute<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; klipsdebug=none<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plutodebug=none<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uniqueids=yes<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #nat_traversal=yes<br><br>
conn %default<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; keyingtries=3<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; disablearrivalcheck=no<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; authby=rsasig<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=tunnel<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pfs=yes<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
conn conntest<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; authby=secret<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pfs=no<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; left=111.111.111.35<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; leftid=111.111.111.35<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
leftsubnet=192.168.100.0/24<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
#leftupdown=&quot;/usr/lib/ipsec/_updown.conntest&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; right=222.222.222.6<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rightid=222.222.222.6<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
rightsubnet=192.168.2.0/24<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
rightnexthop=222.222.222.5<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; auto=start<br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br><br>
What's the problem?<br><br>
Thanks, Morgan</body>
</html>