
Работал по статье лиса http://www.lissyara.su/articles/freebsd/security/ipsec/
Между центральным офисом и филиалом нет pinga
Центральный офис
setkey -D
А - белый адрес центрального офиса
В - филиала
Код: Выделить всё
А В
esp mode=tunnel spi=84074451(0x0502dfd3) reqid=0(0x00000000)
E: 3des-cbc 33f690c8 1e0701dd 98040508 55fc748e ba019141 7cb6adbc
A: hmac-sha1 161d1a70 38fd7f50 99e0f7a2 b3d77b9e 8dc41ab7
seq=0x00000000 replay=4 flags=0x00000000 state=mature
created: Jun 1 21:04:24 2010 current: Jun 1 21:38:50 2010
diff: 2066(s) hard: 3600(s) soft: 2880(s)
last: hard: 0(s) soft: 0(s)
current: 0(bytes) hard: 0(bytes) soft: 0(bytes)
allocated: 0 hard: 0 soft: 0
sadb_seq=1 pid=22790 refcnt=1
В А
esp mode=tunnel spi=94401562(0x05a0741a) reqid=0(0x00000000)
E: 3des-cbc 4601f1d5 c72c86b4 db55ffd9 b0130c4f 4d97ca33 31882d4c
A: hmac-sha1 cd9cdcee 671254f0 14e72e15 5257221b 67b977d8
seq=0x0000012f replay=4 flags=0x00000000 state=mature
created: Jun 1 21:04:24 2010 current: Jun 1 21:38:50 2010
diff: 2066(s) hard: 3600(s) soft: 2880(s)
last: Jun 1 21:38:44 2010 hard: 0(s) soft: 0(s)
current: 43886(bytes) hard: 0(bytes) soft: 0(bytes)
allocated: 303 hard: 0 soft: 0
sadb_seq=0 pid=22790 refcnt=1
/usr/local/etc/>
Код: Выделить всё
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on gif0, link-type NULL (BSD loopback), capture size 96 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
/usr/local/etc/>
и в центральном и в филиале в начале файла указываю
Код: Выделить всё
allow ip from any to any via gif0
allow udp from А to В 500
allow udp from В to А 500
allow esp from А to В
allow esp from В to А
дамп
Код: Выделить всё
UNISAW# tcpdump -i gif0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on gif0, link-type NULL (BSD loopback), capture size 96 bytes
01:50:14.044917 IP 192.168.1.22.53269 > 192.168.0.17.snmp: GetRequest(63) 25.3.2.1.5.1 25.3.5.1.1.1 [|snmp]
01:50:14.045067 IP 192.168.1.22.53269 > 192.168.0.19.snmp: GetRequest(63) 25.3.2.1.5.1 25.3.5.1.1.1 [|snmp]
^C
2 packets captured
2 packets received by filter
0 packets dropped by kernel
UNISAW#
