| 1 |
|
| 2 |
helper program to interop with non-rfc IPsec implementation of Lucent. |
| 3 |
|
| 4 |
From Rolando: |
| 5 |
|
| 6 |
Lucent's way to work around NATing is to change this: |
| 7 |
|
| 8 |
| IP | whatever L4 proto | Payload | |
| 9 |
|
| 10 |
where IP has the (IP source; IP dest) within it into this: |
| 11 |
|
| 12 |
| IP | UDP:XXX | IP | whatever L4 proto | Payload | |
| 13 |
|
| 14 |
where IP have the same (IP source; IP dest) within them and XXX is the |
| 15 |
configurable UDP port (default=501) |
| 16 |
|
| 17 |
In a nutshell, they "tunnelize" all the traffic to/from the client and |
| 18 |
the gateway into a IP/UDP:XXX header |
| 19 |
|
| 20 |
May be there are better ways to do it but using iptables QUEUE is the |
| 21 |
one we used to encapsulate/decapsulate. I thought about adding it to |
| 22 |
LSW code as well as some code to make it manipulate iptables QUEUE stuff |
| 23 |
but got lost on it. :-( |
| 24 |
|
| 25 |
|
| 26 |
---------- Forwarded message ---------- |
| 27 |
Date: Sun, 5 Apr 2009 10:36:54 -0700 (PDT) |
| 28 |
From: Rolando Zappacosta |
| 29 |
Cc: [email protected] |
| 30 |
To: Paul Wouters <[email protected]> |
| 31 |
Subject: Re: [Libreswan Users] Connection against a Lucent FW success!!!! but may |
| 32 |
be there's still room for improvement |
| 33 |
|
| 34 |
|
| 35 |
Hi all, |
| 36 |
|
| 37 |
I could finally manage to get LSW to work against a Lucen VPN Gateway |
| 38 |
even through NAT. So, in case someone else needs such connection, |
| 39 |
compile below code and then run this: |
| 40 |
|
| 41 |
modprobe ip_queue |
| 42 |
UDP501encap & |
| 43 |
iptables -A OUTPUT -d IPofLucentGW -j QUEUE |
| 44 |
iptables -A INPUT -s IPofLucentGW -j QUEUE |
| 45 |
|
| 46 |
before launching LSW as usual. |
| 47 |
|
| 48 |
|
| 49 |
> I discussed this subject here: |
| 50 |
> |
| 51 |
> https://lists.libreswan.org/pipermail/users/2008-February/014030.html |
| 52 |
> based on |
| 53 |
>> what I could capture under Windows, the relevant part |
| 54 |
> of it is: |
| 55 |
>> "I'm trying to connect OpenSwan to a Lucent |
| 56 |
> VPN Gateway, which according to |
| 57 |
>> its ASCII interpretation of its Vendor ID payload is: |
| 58 |
>> |
| 59 |
> 4C5647392E312E3235353A425249434B3A392E312E323535="LVG9.1.255:BRICK:9.1.255". |
| 60 |
> I |
| 61 |
>> can connect to it by means of the Lucent VPN Client |
| 62 |
> V7.1.2 on a Windows XP |
| 63 |
>> computer (Vendor ID= |
| 64 |
> 4C5643372E312E323A5850="LVC7.1.2:XP")." |
| 65 |
> |
| 66 |
> Thanks. Normally vendorids are md5sum's of some text, |
| 67 |
> though in this case |
| 68 |
> that does not seem to be the case. I added them as-is to |
| 69 |
> vendor.c for now. |
| 70 |
> |
| 71 |
>> Seems one can know the running version of the client |
| 72 |
> and server just looking |
| 73 |
>> on the vendor id part of an ASCII capture dump. |
| 74 |
>> Interesting thing is, as explained to you privatelly, |
| 75 |
> the way the PSK gets |
| 76 |
>> handled here. Under the LVC (windows) I had to |
| 77 |
> configure a PSK like: |
| 78 |
>> <MyCompanysPSK> where the real PSK is 9 ASCII |
| 79 |
> characters long. However, I |
| 80 |
>> could find that in order to have LSW establishing |
| 81 |
> phase 1 successfully I had to |
| 82 |
>> add the string "01234567890" as a trailer, |
| 83 |
> i.e. my ipsec.secrets looks like: |
| 84 |
>> !@#$% <MyCompanysGWipAddress> : PSK |
| 85 |
> "<MyCompanysPSK>01234567890" |
| 86 |
>> |
| 87 |
>> what gives a PSK of length 20. Not sure on how they |
| 88 |
> handle it but my guess is |
| 89 |
>> they just take the PSK the user configures, add the |
| 90 |
> string |
| 91 |
>> "01234567890123456789" and take the first 20 |
| 92 |
> bytes of it. Easy way to hook you |
| 93 |
>> on their client while still keeping it simply to |
| 94 |
> develop. |
| 95 |
>> |
| 96 |
>> And I'm not sure if the user !@#$% is the one the |
| 97 |
> GW admin configured on it or |
| 98 |
>> if it's the way they handle it but whatever else I |
| 99 |
> configure, the GW just |
| 100 |
>> don't respond anything back to me. |
| 101 |
> |
| 102 |
> Thanks! I put a note of this in docs/lucent-client.txt, and |
| 103 |
> it will end up |
| 104 |
> in the new wiki once we have it online. |
| 105 |
> |
| 106 |
>>> Looks like a resend, you can ignore it. |
| 107 |
>> Strangely, I *always* do receive the duplicate packet |
| 108 |
> warning. Another |
| 109 |
>> interesting thing is Lucent's VPN client |
| 110 |
> doesn't exchange any CFG at all... |
| 111 |
>> I'm wondering now if I need it indeed. The server |
| 112 |
> sends it to me but seems |
| 113 |
>> like LSW only configures the local IP address based on |
| 114 |
> it. I supossed it was |
| 115 |
>> going to be able to configure something else, such as |
| 116 |
> DNS or things like that. |
| 117 |
> |
| 118 |
> Libreswan does support DNS/WINS via XAUTH/ModeConfig. Though |
| 119 |
> as a client, we |
| 120 |
> might be ignoring it, since we have no structured way of |
| 121 |
> modifying resolv.conf |
| 122 |
> in any modern way (eg dbus/networkmanager). I believe we |
| 123 |
> might only pass it |
| 124 |
> as env variables to the updown script. |
| 125 |
> |
| 126 |
>> The LVC do more things with no CFG at all, configures |
| 127 |
> the DNS and WINS servers |
| 128 |
>> for instance, something I'll need to do manually |
| 129 |
> via a script (or can it be |
| 130 |
>> made automatically somehow by LSW?) |
| 131 |
> |
| 132 |
> You can copy the stock _updown script and add resolv.conf |
| 133 |
> rewriting to it, |
| 134 |
> and configure the new script using leftupdown= |
| 135 |
> |
| 136 |
>>>> and this one from pluto's debug: |
| 137 |
>>>> 3) "Intranet" #1: XAUTH: |
| 138 |
> Unsupported attribute: INTERNAL_ADDRESS_EXPIRY |
| 139 |
>>> You can also ignore this. Libreswan does not |
| 140 |
> support INTERNAL_ADDRESS_EXPIRY, |
| 141 |
>>> so it won't drop the IP address or ask for a new |
| 142 |
> one. |
| 143 |
>> Same for "ignoring informational payload, type |
| 144 |
> IPSEC_RESPONDER_LIFETIME" |
| 145 |
>> above? |
| 146 |
> |
| 147 |
> Yes. the remote is telling us how long they will keep the |
| 148 |
> SA around. Libreswan |
| 149 |
> does not really care what the remote does. If the remote |
| 150 |
> wants to rekey, it |
| 151 |
> will and can do it anytime. We do enforce our own SA life |
| 152 |
> similarly. |
| 153 |
> |
| 154 |
> Paul |
| 155 |
|
| 156 |
|
| 157 |
|