Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Building And Integrating Virtual Private Networks With Openswan (2006).pdf
Скачиваний:
73
Добавлен:
17.08.2013
Размер:
4.74 Mб
Скачать

Opportunistic Encryption

Note that if you do not have your name server in the clear policy and Openswan is running, than the last line might take a while, and some failures might show up while various DNS requests trigger more OE initiations and fail.

Testing Your OE Setup

Xelerance provides a few servers to test whether or not OE is properly running. If a functional OE setup is detected, ipsec livetest will run an OE test for you. But you can also manually trigger an

OE connection. For example, www.openswan.org, lists.openswan.org, and www.xelerance.com

all run full OE. The only thing you need to do is watch the logs and launch a ping to those sites. You should see something like this:

Nov 7 20:26:58 bofh pluto[1970]: "private-or-clear#0.0.0.0/0"[1]

...193.110.157.77===193.110.157.77/32 #1: initiating Main Mode Nov 7 20:26:58 bofh pluto[1970]: "private-or-clear#0.0.0.0/0"[1]

...193.110.157.77===193.110.157.77/32 #1: received Vendor ID payload [Dead Peer Detection]

Nov 7 20:26:58 bofh pluto[1970]: "private-or-clear#0.0.0.0/0"[1]

...193.110.157.77===193.110.157.77/32 #1: transition from state STATE_MAIN_I1 to state STATE_MAIN_I2

Nov 7 20:26:58 bofh pluto[1970]: "private-or-clear#0.0.0.0/0"[1]

...193.110.157.77===193.110.157.77/32 #1: I did not send a certificate because I do not have one.

Nov 7 20:26:58 bofh pluto[1970]: "private-or-clear#0.0.0.0/0"[1]

...193.110.157.77===193.110.157.77/32 #1: transition from state STATE_MAIN_I2 to state STATE_MAIN_I3

Nov 7 20:26:59 bofh pluto[1970]: "private-or-clear#0.0.0.0/0"[1]

...193.110.157.77===193.110.157.77/32 #1: Peer ID is ID_IPV4_ADDR: '193.110.157.77'

Nov 7 20:26:59 bofh pluto[1970]: "private-or-clear#0.0.0.0/0"[1]

...193.110.157.77===193.110.157.77/32 #1: transition from state STATE_MAIN_I3 to state STATE_MAIN_I4

Nov 7 20:26:59 bofh pluto[1970]: "private-or-clear#0.0.0.0/0"[1]

...193.110.157.77===193.110.157.77/32 #1: ISAKMP SA established Nov 7 20:26:59 bofh pluto[1970]: "private-or-clear#0.0.0.0/0"[1]

...193.110.157.77===193.110.157.77/32 #2: initiating Quick Mode RSASIG+ENCRYPT+TUNNEL+PFS+DONTREKEY+OPPORTUNISTIC+failurePASS {using isakmp#1} Nov 7 20:26:59 bofh pluto[1970]: "private-or-clear#0.0.0.0/0"[1]

...193.110.157.77===193.110.157.77/32 #2: transition from state STATE_QUICK_I1 to state STATE_QUICK_I2

Nov 7 20:26:59 bofh pluto[1970]: "private-or-clear#0.0.0.0/0"[1]

...193.110.157.77===193.110.157.77/32 #2: sent QI2, IPsec SA established {ESP=>0xa1ce4296 <0x738d2cd7}

For each OE connection, an instance of the private-or-clear connection is created. These OE connections also show up in the eroute table:

#ipsec eroute

 

 

0

0.0.0.0/0

-> 0.0.0.0/0

=> %trap

10

193.110.157.17/32

-> 0.0.0.0/0

=> %trap

27

193.110.157.17/32

-> 193.110.157.2/32

=> %pass

13

193.110.157.17/32

-> 193.110.157.5/32

=> %hold

1

193.110.157.17/32

-> 12.110.110.204/32

=> %pass

3

193.110.157.17/32

-> 193.110.157.77/32

=> tun0x1004@205.150.200.134

The eroute table shows us how many packets were sent through each eroute, the source and destination of the eroute, and the state of the eroute.

142