Опишу свою проблему подробно. Раньше я пробовал объединять подсети с помошью двух DI-804HV по Вашему HOWTO. Всё получилось и работало нормально. На этот раз стоит задача объединения двух подсетей использую с одной стороны DI-804HV, а с другой Linux-FreeSwan. За основу был взят вот этот HOWTO: [url="http://www.dlink.ru/technical/faq_vpn_5.php"]Настройка IPSec тоннеля между маршрутизаторами DI-804HV и FreeSwan (Linux)[/url]. Была взята такая конфигурация (собиралось на стенде, а не в реальных условиях):
Код:
172.16.1.0/24--(eth1:172.16.1.254 LINUX-FreeSwan eth0:192.168.13.136)==(eth1:192.168.13.240 ROUTER eth0:192.168.17.240)==(WAN:192.168.17.201 DI-804HV LAN:172.16.2.1)--172.16.2.0/24
syslog:
Код:
Mar 15 09:42:54 children ipsec_setup: Starting FreeS/WAN IPsec 2.06...
Mar 15 09:42:54 children ipsec_setup: KLIPS debug `none'
Mar 15 09:42:54 children kernel:
Mar 15 09:42:55 children ipsec_setup: KLIPS ipsec0 on eth1 172.16.1.254/255.255.255.0 broadcast 172.16.1.255
Mar 15 09:42:55 children ipsec_setup: ...FreeS/WAN IPsec started
Mar 15 09:42:55 children ipsec__plutorun: ipsec_auto: fatal error in "packetdefault": %defaultroute requested but not known
Mar 15 09:42:55 children ipsec__plutorun: ipsec_auto: fatal error in "block": %defaultroute requested but not known
Mar 15 09:42:55 children ipsec__plutorun: ipsec_auto: fatal error in "clear-or-private": %defaultroute requested but not known
Mar 15 09:42:55 children ipsec__plutorun: ipsec_auto: fatal error in "clear": %defaultroute requested but not known
Mar 15 09:42:55 children ipsec__plutorun: ipsec_auto: fatal error in "private-or-clear": %defaultroute requested but not known
Mar 15 09:42:56 children ipsec__plutorun: ipsec_auto: fatal error in "private": %defaultroute requested but not known
Mar 15 09:42:56 children ipsec__plutorun: 021 no connection named "packetdefault"
Mar 15 09:42:56 children ipsec__plutorun: ...could not route conn "packetdefault"
Mar 15 09:42:56 children ipsec__plutorun: 021 no connection named "block"
Mar 15 09:42:56 children ipsec__plutorun: ...could not route conn "block"
Mar 15 09:42:56 children ipsec__plutorun: 022 "di804": we have no ipsecN interface for either end of this connection
Mar 15 09:42:56 children ipsec__plutorun: ...could not route conn "di804"
Mar 15 09:42:56 children ipsec__plutorun: 021 no connection named "clear-or-private"
Mar 15 09:42:56 children ipsec__plutorun: ...could not route conn "clear-or-private"
Mar 15 09:42:56 children ipsec__plutorun: 021 no connection named "clear"
Mar 15 09:42:56 children ipsec__plutorun: ...could not route conn "clear"
Mar 15 09:42:56 children ipsec__plutorun: 021 no connection named "private-or-clear"
Mar 15 09:42:56 children ipsec__plutorun: ...could not route conn "private-or-clear"
Mar 15 09:42:56 children ipsec__plutorun: 021 no connection named "private"
Mar 15 09:42:56 children ipsec__plutorun: ...could not route conn "private"
Mar 15 09:42:56 children ipsec__plutorun: 022 "di804": we have no ipsecN interface for either end of this connection
Mar 15 09:42:56 children ipsec__plutorun: ...could not start conn "di804"
messages:
Код:
Mar 15 09:42:55 children pluto[1786]: Starting Pluto (FreeS/WAN Version 2.06 PLUTO_USES_KEYRR)
Mar 15 09:42:55 children pluto[1786]: Using KLIPS IPsec interface code
Mar 15 09:42:55 children pluto[1786]: added connection description "di804"
Mar 15 09:42:56 children pluto[1786]: listening for IKE messages
Mar 15 09:42:56 children pluto[1786]: adding interface ipsec0/eth1 172.16.1.254
Mar 15 09:42:56 children pluto[1786]: loading secrets from "/etc/ipsec.secrets"
Mar 15 09:42:56 children pluto[1786]: "di804": we have no ipsecN interface for either end of this connection
ipsec auto status:
Код:
ipsec auto: warning: obsolete command syntax used
000 interface ipsec0/eth1 172.16.1.254
000 %myid = (none)
000 debug none
000
000 "di804": 172.16.1.0/24===192.168.13.136---192.168.13.240...192.168.17.240---192.168.17.201===172.16.2.0/24; unrouted; eroute owner: #0
000 "di804": ike_life: 3600s; ipsec_life: 28800s; rekey_margin: 540s; rekey_fuzz: 100%; keyingtries: 0
000 "di804": policy: PSK+ENCRYPT+PFS; prio: 24,24; interface: ;
000 "di804": newest ISAKMP SA: #0; newest IPsec SA: #0;
000
000
Из логов мне не нравятся вот эти строчки:
Код:
--cut-- unrouted; eroute owner: #0
unrouted - не просто так наверно.
Код:
we have no ipsecN interface for either end of this connection
Какой еще ipsecN, когда в howto про него ничего не сказано и каким образом он вообще должен образоваться.
Вобщем туннель вроде как поднимается, но мне не понятно вот что, каким образом Linux с FreeSwan будет знать о существовании подсети 172.16.2.0/24. В route -n ее просто нет:
Код:
[children@kan5300]$ifconfig
eth0 Link encap:Ethernet HWaddr 00:13:D4:FB:0D:B6
inet addr:192.168.13.136 Bcast:192.168.13.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:800 errors:0 dropped:0 overruns:0 frame:0
TX packets:253 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:71483 (69.8 Kb) TX bytes:105852 (103.3 Kb)
Interrupt:10 Base address:0xe800
eth1 Link encap:Ethernet HWaddr 00:80:48:3A:D0:BC
inet addr:172.16.1.254 Bcast:172.16.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0x8800
ipsec0 Link encap:Ethernet HWaddr 00:80:48:3A:D0:BC
inet addr:172.16.1.254 Mask:255.255.255.0
UP RUNNING NOARP MTU:16260 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
[children@kan5300]$route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
172.16.1.0 0.0.0.0 255.255.255.0 U 0 0 0 ipsec0
192.168.13.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.13.240 0.0.0.0 UG 1 0 0 eth0
[children@kan5300]$
Что я делаю не так? Может быть я что-то не так настроил и должен подниматься интерфейс ipsec1 какраз с удаленной подсеткой? Поясните пожалуйста, а то я уже неделю сношаюсь с этой траблой.