Hector Akamine
2009-11-30 09:37:49 UTC
Hello,
Is it possible to establish a host-to-host IPsec tunnel between two hosts
when one of them is behind a NAT? I have problems in the following configuration
(NAT device is a Corega broadband router, with "VPN passthrough" option enabled.
PC1 and PC2 are Fedora 11 boxes. StrongSwan version is 4.3.5)
(WAN) (LAN)
PC2(CF-W8) ------------- NAT router ---------------- PC1(CF-W7)
192.168.0.14 192.168.0.21 192.168.1.1 192.168.1.11
I configured PC1 and PC2 to set up a host-to-host IPsec tunnel using IKEv2,
but it fails (the IKE SA is established but the CHILD SA is not)
(certificates and keys are correct, since I can establish an IPsec connection
between the PCs when removing the NAT)
CF-W8 log (in /var/log/messages) shows:
traffic selectors 192.168.0.14/32 === 192.168.1.11/32 inacceptable
11[ENC] generating IKE_AUTH response 1 [ IDr CERT AUTH N(AUTH_LFT) N(MOBIKE_SUP)
N(ADD_6_ADDR) N(TS_UNACCEPT)
CF-W7 log (in /var/log/messages) shows:
received TS_UNACCEPTABLE notify, no CHILD_SA built
ipsec.conf in CF-W7:
--------------------
config setup
plutostart=no
conn host-host
left=%defaultroute
leftcert=cf-w7hostCert.pem
right=192.168.0.14
rightid="C=GB, ST=Berkshire, O=My Company Ltd"
auto=add
keyingtries=1
keyexchange=ikev2
ipsec.conf in CF-W8:
--------------------
config setup
plutostart=no
conn host-host
left=%defaultroute
leftcert=cf-w8hostCert.pem
right=192.168.0.21
rightid="C=GB, ST=Berkshire, O=My Company Ltd"
auto=add
keyingtries=1
keyexchange=ikev2
shell(in CF-W7) :
---------------
# ipsec start
Starting strongSwan 4.3.5 IPsec [starter]...
# ipsec up host-host
initiating IKE_SA host-host[1] to 192.168.0.14
generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ]
sending packet: from 192.168.1.11[500] to 192.168.0.14[500]
received packet: from 192.168.0.14[500] to 192.168.1.11[500]
parsed IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) CERTREQ
N(MULT_AUTH) ]
local host is behind NAT, sending keep alives
received cert request for "C=GB, ST=Berkshire, L=Newbury, O=My Company Ltd"
sending cert request for "C=GB, ST=Berkshire, L=Newbury, O=My Company Ltd"
authentication of 'C=GB, ST=Berkshire, O=My Company Ltd' (myself) with RSA
signature successful
sending end entity cert "C=GB, ST=Berkshire, O=My Company Ltd"
establishing CHILD_SA host-host
generating IKE_AUTH request 1 [ IDi CERT CERTREQ IDr AUTH SA TSi TSr
N(MOBIKE_SUP) N(ADD_6_ADDR) N(MULT_AUTH) ]
sending packet: from 192.168.1.11[4500] to 192.168.0.14[4500]
received packet: from 192.168.0.14[4500] to 192.168.1.11[4500]
parsed IKE_AUTH response 1 [ IDr CERT AUTH N(AUTH_LFT) N(MOBIKE_SUP)
N(ADD_6_ADDR) N(TS_UNACCEPT) ]
received end entity cert "C=GB, ST=Berkshire, O=My Company Ltd"
using trusted ca certificate "C=GB, ST=Berkshire, L=Newbury, O=My Company Ltd"
checking certificate status of "C=GB, ST=Berkshire, O=My Company Ltd"
certificate status is not available
using trusted certificate "C=GB, ST=Berkshire, O=My Company Ltd"
signature validation failed, looking for another key
using certificate "C=GB, ST=Berkshire, O=My Company Ltd"
using trusted ca certificate "C=GB, ST=Berkshire, L=Newbury, O=My Company Ltd"
checking certificate status of "C=GB, ST=Berkshire, O=My Company Ltd"
certificate status is not available
authentication of 'C=GB, ST=Berkshire, O=My Company Ltd' with RSA signature
successful
IKE_SA host-host[1] established between 192.168.1.11[C=GB, ST=Berkshire, O=My
Company Ltd]...192.168.0.14[C=GB, ST=Berkshire, O=My Company Ltd]
scheduling reauthentication in 10126s
maximum IKE_SA lifetime 10666s
received TS_UNACCEPTABLE notify, no CHILD_SA built
# ipsec status
Security Associations:
host-host[1]: ESTABLISHED 9 seconds ago, 192.168.1.11[C=GB, ST=Berkshire,
O=My Company Ltd]...192.168.0.14[C=GB, ST=Berkshire, O=My Company Ltd]
Any hints on what can be wrong?
Thank you,
Hector
Is it possible to establish a host-to-host IPsec tunnel between two hosts
when one of them is behind a NAT? I have problems in the following configuration
(NAT device is a Corega broadband router, with "VPN passthrough" option enabled.
PC1 and PC2 are Fedora 11 boxes. StrongSwan version is 4.3.5)
(WAN) (LAN)
PC2(CF-W8) ------------- NAT router ---------------- PC1(CF-W7)
192.168.0.14 192.168.0.21 192.168.1.1 192.168.1.11
I configured PC1 and PC2 to set up a host-to-host IPsec tunnel using IKEv2,
but it fails (the IKE SA is established but the CHILD SA is not)
(certificates and keys are correct, since I can establish an IPsec connection
between the PCs when removing the NAT)
CF-W8 log (in /var/log/messages) shows:
traffic selectors 192.168.0.14/32 === 192.168.1.11/32 inacceptable
11[ENC] generating IKE_AUTH response 1 [ IDr CERT AUTH N(AUTH_LFT) N(MOBIKE_SUP)
N(ADD_6_ADDR) N(TS_UNACCEPT)
CF-W7 log (in /var/log/messages) shows:
received TS_UNACCEPTABLE notify, no CHILD_SA built
ipsec.conf in CF-W7:
--------------------
config setup
plutostart=no
conn host-host
left=%defaultroute
leftcert=cf-w7hostCert.pem
right=192.168.0.14
rightid="C=GB, ST=Berkshire, O=My Company Ltd"
auto=add
keyingtries=1
keyexchange=ikev2
ipsec.conf in CF-W8:
--------------------
config setup
plutostart=no
conn host-host
left=%defaultroute
leftcert=cf-w8hostCert.pem
right=192.168.0.21
rightid="C=GB, ST=Berkshire, O=My Company Ltd"
auto=add
keyingtries=1
keyexchange=ikev2
shell(in CF-W7) :
---------------
# ipsec start
Starting strongSwan 4.3.5 IPsec [starter]...
# ipsec up host-host
initiating IKE_SA host-host[1] to 192.168.0.14
generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) ]
sending packet: from 192.168.1.11[500] to 192.168.0.14[500]
received packet: from 192.168.0.14[500] to 192.168.1.11[500]
parsed IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) CERTREQ
N(MULT_AUTH) ]
local host is behind NAT, sending keep alives
received cert request for "C=GB, ST=Berkshire, L=Newbury, O=My Company Ltd"
sending cert request for "C=GB, ST=Berkshire, L=Newbury, O=My Company Ltd"
authentication of 'C=GB, ST=Berkshire, O=My Company Ltd' (myself) with RSA
signature successful
sending end entity cert "C=GB, ST=Berkshire, O=My Company Ltd"
establishing CHILD_SA host-host
generating IKE_AUTH request 1 [ IDi CERT CERTREQ IDr AUTH SA TSi TSr
N(MOBIKE_SUP) N(ADD_6_ADDR) N(MULT_AUTH) ]
sending packet: from 192.168.1.11[4500] to 192.168.0.14[4500]
received packet: from 192.168.0.14[4500] to 192.168.1.11[4500]
parsed IKE_AUTH response 1 [ IDr CERT AUTH N(AUTH_LFT) N(MOBIKE_SUP)
N(ADD_6_ADDR) N(TS_UNACCEPT) ]
received end entity cert "C=GB, ST=Berkshire, O=My Company Ltd"
using trusted ca certificate "C=GB, ST=Berkshire, L=Newbury, O=My Company Ltd"
checking certificate status of "C=GB, ST=Berkshire, O=My Company Ltd"
certificate status is not available
using trusted certificate "C=GB, ST=Berkshire, O=My Company Ltd"
signature validation failed, looking for another key
using certificate "C=GB, ST=Berkshire, O=My Company Ltd"
using trusted ca certificate "C=GB, ST=Berkshire, L=Newbury, O=My Company Ltd"
checking certificate status of "C=GB, ST=Berkshire, O=My Company Ltd"
certificate status is not available
authentication of 'C=GB, ST=Berkshire, O=My Company Ltd' with RSA signature
successful
IKE_SA host-host[1] established between 192.168.1.11[C=GB, ST=Berkshire, O=My
Company Ltd]...192.168.0.14[C=GB, ST=Berkshire, O=My Company Ltd]
scheduling reauthentication in 10126s
maximum IKE_SA lifetime 10666s
received TS_UNACCEPTABLE notify, no CHILD_SA built
# ipsec status
Security Associations:
host-host[1]: ESTABLISHED 9 seconds ago, 192.168.1.11[C=GB, ST=Berkshire,
O=My Company Ltd]...192.168.0.14[C=GB, ST=Berkshire, O=My Company Ltd]
Any hints on what can be wrong?
Thank you,
Hector