Спасибо за отклик, выкладываю логи
auth.log
Spoiler
Aug 1 10:58:44 atlas-server pluto[1048]: shutting down
Aug 1 10:58:44 atlas-server pluto[1048]: "L2TP-PSK-noNAT": deleting connection
Aug 1 10:58:44 atlas-server pluto[1048]: "L2TP-PSK-NAT": deleting connection
Aug 1 10:58:44 atlas-server pluto[1048]: shutting down interface lo/lo ::1:500
Aug 1 10:58:44 atlas-server pluto[1048]: shutting down interface lo/lo 127.0.0.1:4500
Aug 1 10:58:44 atlas-server pluto[1048]: shutting down interface lo/lo 127.0.0.1:500
Aug 1 10:58:44 atlas-server pluto[1048]: shutting down interface eth3/eth3 192.168.0.200:4500
Aug 1 10:58:44 atlas-server pluto[1048]: shutting down interface eth3/eth3 192.168.0.200:500
Aug 1 10:58:45 atlas-server pluto[1108]: pluto_crypto_helper: helper (0) is normal exiting
Aug 1 10:58:47 atlas-server ipsec__plutorun: Starting Pluto subsystem...
Aug 1 10:58:47 atlas-server pluto[3505]: Starting Pluto (Openswan Version 2.6.38; Vendor ID OEvy\134kgzWq\134s) pid:3505
Aug 1 10:58:47 atlas-server pluto[3505]: LEAK_DETECTIVE support [disabled]
Aug 1 10:58:47 atlas-server pluto[3505]: OCF support for IKE [disabled]
Aug 1 10:58:47 atlas-server pluto[3505]: SAref support [disabled]: Protocol not available
Aug 1 10:58:47 atlas-server pluto[3505]: SAbind support [disabled]: Protocol not available
Aug 1 10:58:47 atlas-server pluto[3505]: NSS support [disabled]
Aug 1 10:58:47 atlas-server pluto[3505]: HAVE_STATSD notification support not compiled in
Aug 1 10:58:47 atlas-server pluto[3505]: Setting NAT-Traversal port-4500 floating to on
Aug 1 10:58:47 atlas-server pluto[3505]: port floating activation criteria nat_t=1/port_float=1
Aug 1 10:58:47 atlas-server pluto[3505]: NAT-Traversal support [enabled]
Aug 1 10:58:47 atlas-server pluto[3505]: using /dev/urandom as source of random entropy
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_register_enc(): Activating OAKLEY_AES_CBC: Ok (ret=0)
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_register_hash(): Activating OAKLEY_SHA2_512: Ok (ret=0)
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_register_hash(): Activating OAKLEY_SHA2_256: Ok (ret=0)
Aug 1 10:58:47 atlas-server pluto[3505]: starting up 1 cryptographic helpers
Aug 1 10:58:47 atlas-server pluto[3505]: started helper pid=3507 (fd:6)
Aug 1 10:58:47 atlas-server pluto[3505]: Using Linux 2.6 IPsec interface code on 3.2.0-23-generic-pae (experimental code)
Aug 1 10:58:47 atlas-server pluto[3507]: using /dev/urandom as source of random entropy
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_register_enc(): Activating aes_ccm_8: Ok (ret=0)
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_add(): ERROR: algo_type '0', algo_id '0', Algorithm type already exists
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_register_enc(): Activating aes_ccm_12: FAILED (ret=-17)
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_add(): ERROR: algo_type '0', algo_id '0', Algorithm type already exists
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_register_enc(): Activating aes_ccm_16: FAILED (ret=-17)
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_add(): ERROR: algo_type '0', algo_id '0', Algorithm type already exists
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_register_enc(): Activating aes_gcm_8: FAILED (ret=-17)
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_add(): ERROR: algo_type '0', algo_id '0', Algorithm type already exists
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_register_enc(): Activating aes_gcm_12: FAILED (ret=-17)
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_add(): ERROR: algo_type '0', algo_id '0', Algorithm type already exists
Aug 1 10:58:47 atlas-server pluto[3505]: ike_alg_register_enc(): Activating aes_gcm_16: FAILED (ret=-17)
Aug 1 10:58:47 atlas-server pluto[3505]: added connection description "L2TP-PSK-NAT"
Aug 1 10:58:47 atlas-server pluto[3505]: added connection description "L2TP-PSK-noNAT"
Aug 1 10:58:47 atlas-server pluto[3505]: listening for IKE messages
Aug 1 10:58:47 atlas-server pluto[3505]: adding interface eth3/eth3 192.168.0.200:500
Aug 1 10:58:47 atlas-server pluto[3505]: adding interface eth3/eth3 192.168.0.200:4500
Aug 1 10:58:47 atlas-server pluto[3505]: adding interface lo/lo 127.0.0.1:500
Aug 1 10:58:47 atlas-server pluto[3505]: adding interface lo/lo 127.0.0.1:4500
Aug 1 10:58:47 atlas-server pluto[3505]: adding interface lo/lo ::1:500
Aug 1 10:58:47 atlas-server pluto[3505]: loading secrets from "/etc/ipsec.secrets"
Aug 1 10:59:00 atlas-server pluto[3505]: packet from 47.58.254.24:500: ignoring unknown Vendor ID payload [4f45755c645c6a795c5c6170]
Aug 1 10:59:00 atlas-server pluto[3505]: packet from 47.58.254.24:500: received Vendor ID payload [Dead Peer Detection]
Aug 1 10:59:00 atlas-server pluto[3505]: packet from 47.58.254.24:500: received Vendor ID payload [RFC 3947] method set to=115
Aug 1 10:59:00 atlas-server pluto[3505]: packet from 47.58.254.24:500: received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-03] meth=108, but already using method 115
Aug 1 10:59:00 atlas-server pluto[3505]: packet from 47.58.254.24:500: received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02_n] meth=106, but already using method 115
Aug 1 10:59:00 atlas-server pluto[3505]: packet from 47.58.254.24:500: received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02] meth=107, but already using method 115
Aug 1 10:59:00 atlas-server pluto[3505]: packet from 47.58.254.24:500: received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-00]
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[1] 47.58.254.24 #1: responding to Main Mode from unknown peer 47.58.254.24
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[1] 47.58.254.24 #1: transition from state STATE_MAIN_R0 to state STATE_MAIN_R1
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[1] 47.58.254.24 #1: STATE_MAIN_R1: sent MR1, expecting MI2
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[1] 47.58.254.24 #1: NAT-Traversal: Result using draft-ietf-ipsec-nat-t-ike (MacOS X): both are NATed
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[1] 47.58.254.24 #1: transition from state STATE_MAIN_R1 to state STATE_MAIN_R2
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[1] 47.58.254.24 #1: STATE_MAIN_R2: sent MR2, expecting MI3
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[1] 47.58.254.24 #1: Main mode peer ID is ID_IPV4_ADDR: '192.168.1.4'
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[1] 47.58.254.24 #1: switched from "L2TP-PSK-NAT" to "L2TP-PSK-NAT"
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[2] 47.58.254.24 #1: deleting connection "L2TP-PSK-NAT" instance with peer 47.58.254.24 {isakmp=#0/ipsec=#0}
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[2] 47.58.254.24 #1: transition from state STATE_MAIN_R2 to state STATE_MAIN_R3
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[2] 47.58.254.24 #1: new NAT mapping for #1, was 47.58.254.24:500, now 47.58.254.24:4500
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[2] 47.58.254.24 #1: STATE_MAIN_R3: sent MR3, ISAKMP SA established {auth=OAKLEY_PRESHARED_KEY cipher=aes_128 prf=oakley_sha group=modp2048}
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[2] 47.58.254.24 #1: Dead Peer Detection (RFC 3706): enabled
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[2] 47.58.254.24 #1: next payload type of ISAKMP Hash Payload has an unknown value: 239
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[2] 47.58.254.24 #1: malformed payload in packet
Aug 1 10:59:00 atlas-server pluto[3505]: | payload malformed after IV
Aug 1 10:59:00 atlas-server pluto[3505]: | d0 38 6b b8 be 76 4e 43 42 8d d0 c6 6e 9e 3f 2f
Aug 1 10:59:00 atlas-server pluto[3505]: "L2TP-PSK-NAT"[2] 47.58.254.24 #1: sending notification PAYLOAD_MALFORMED to 47.58.254.24:4500
Aug 1 10:59:15 atlas-server pluto[3505]: "L2TP-PSK-NAT"[2] 47.58.254.24 #1: Informational Exchange message must be encrypted
Aug 1 10:59:45 atlas-server pluto[3505]: "L2TP-PSK-NAT"[2] 47.58.254.24 #1: DPD: No response from peer - declaring peer dead
Aug 1 10:59:45 atlas-server pluto[3505]: "L2TP-PSK-NAT"[2] 47.58.254.24 #1: DPD: Clearing Connection
Aug 1 10:59:45 atlas-server pluto[3505]: "L2TP-PSK-NAT" #1: deleting state (STATE_MAIN_R3)
Aug 1 10:59:45 atlas-server pluto[3505]: "L2TP-PSK-NAT"[2] 47.58.254.24: deleting connection "L2TP-PSK-NAT" instance with peer 47.58.254.24 {isakmp=#0/ipsec=#0}
syslog
Spoiler
Aug 1 10:58:38 atlas-server xl2tpd[3329]: Enabling IPsec SAref processing for L2TP transport mode SAs
Aug 1 10:58:38 atlas-server xl2tpd[3329]: IPsec SAref does not work with L2TP kernel mode yet, enabling forceuserspace=yes
Aug 1 10:58:38 atlas-server xl2tpd[3329]: setsockopt recvref[30]: Protocol not available
Aug 1 10:58:38 atlas-server xl2tpd[3329]: This binary does not support kernel L2TP.
Aug 1 10:58:38 atlas-server xl2tpd[3330]: xl2tpd version xl2tpd-1.3.1 started on atlas-server PID:3330
Aug 1 10:58:38 atlas-server xl2tpd[3330]: Written by Mark Spencer, Copyright © 1998, Adtran, Inc.
Aug 1 10:58:38 atlas-server xl2tpd[3330]: Forked by Scott Balmos and David Stipp, © 2001
Aug 1 10:58:38 atlas-server xl2tpd[3330]: Inherited by Jeff McAdams, © 2002
Aug 1 10:58:38 atlas-server xl2tpd[3330]: Forked again by Xelerance (www.xelerance.com) © 2006
Aug 1 10:58:38 atlas-server xl2tpd[3330]: Listening on IP address 0.0.0.0, port 1701
Aug 1 10:58:44 atlas-server ipsec_setup: Stopping Openswan IPsec...
Aug 1 10:58:47 atlas-server kernel: [ 3882.812029] NET: Unregistered protocol family 15
Aug 1 10:58:47 atlas-server ipsec_setup: ...Openswan IPsec stopped
Aug 1 10:58:47 atlas-server kernel: [ 3882.878095] NET: Registered protocol family 15
Aug 1 10:58:47 atlas-server ipsec_setup: Starting Openswan IPsec U2.6.38/K3.2.0-23-generic-pae...
Aug 1 10:58:47 atlas-server ipsec_setup: Using NETKEY(XFRM) stack
Aug 1 10:58:47 atlas-server kernel: [ 3882.923971] intel_rng: FWH not detected
Aug 1 10:58:47 atlas-server kernel: [ 3882.987317] Initializing XFRM netlink socket
Aug 1 10:58:47 atlas-server kernel: [ 3883.011529] padlock_sha: VIA PadLock Hash Engine not detected.
Aug 1 10:58:47 atlas-server kernel: [ 3883.023683] Intel AES-NI instructions are not detected.
Aug 1 10:58:47 atlas-server kernel: [ 3883.041576] Intel AES-NI instructions are not detected.
Aug 1 10:58:47 atlas-server pluto: adjusting ipsec.d to /etc/ipsec.d
Aug 1 10:58:47 atlas-server ipsec__plutorun: adjusting ipsec.d to /etc/ipsec.d
Aug 1 10:58:47 atlas-server ipsec_setup: ...Openswan IPsec started
Aug 1 10:58:47 atlas-server ipsec__plutorun: 002 added connection description "L2TP-PSK-NAT"
Aug 1 10:58:47 atlas-server ipsec__plutorun: 002 added connection description "L2TP-PSK-noNAT"
Тут пугает вот это "IPsec SAref does not work with L2TP kernel mode yet, enabling forceuserspace=yes". С чего SAref не работает с ядром L2TP? И куда вписать "forceuserspace=yes"? Попробовал вписать в xl2tpd.conf в секцию lns default, не помогло, точнее ругнулось, что его там не должно быть.
Вывод
ipsec verify
Spoiler
Checking your system to see if IPsec got installed and started correctly:
Version check and ipsec on-path [OK]
Linux Openswan U2.6.38/K3.2.0-23-generic-pae (netkey)
Checking for IPsec support in kernel [OK]
SAref kernel support [N/A]
NETKEY: Testing XFRM related proc values [FAILED]
Please disable /proc/sys/net/ipv4/conf/*/send_redirects
or NETKEY will cause the sending of bogus ICMP redirects!
[FAILED]
Please disable /proc/sys/net/ipv4/conf/*/accept_redirects
or NETKEY will accept bogus ICMP redirects!
[OK]
Checking that pluto is running [OK]
Pluto listening for IKE on udp 500 [OK]
Pluto listening for NAT-T on udp 4500 [OK]
Two or more interfaces found, checking IP forwarding [FAILED]
Checking NAT and MASQUERADEing [OK]
Checking for 'ip' command [OK]
Checking /bin/sh is not /bin/dash [WARNING]
Checking for 'iptables' command [OK]
Opportunistic Encryption Support [DISABLED]
Опять таки, все четко по мануалу, в мануале все ОК, а у меня еще FAIL, WARNING & N/A.
Пытался убрать это, т.к. подсказка есть, отключить send_redirects.
Код: Выделить всё
Please disable /proc/sys/net/ipv4/conf/*/send_redirects
or NETKEY will cause the sending of bogus ICMP redirects!
FAILED
В файле /etc/sysctl.conf комментировал и ставил значение 1 в строке "net.ipv4.conf.all.send_redirects = 0", после чего и перезапускал просто xl2tp и ipsec и в конце концов ребут системы, ошибка осталась
Конфиги:
ipsec.secrets
Spoiler
192.168.0.200 %any: PSK "abc123"
ipsec.conf
Spoiler
version 2.0
config setup
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:10.212.181.0/16,%v4:172.16.0.0/12
oe=off
protostack=netkey
conn L2TP-PSK-NAT
rightsubnet=vhost:%priv
also=L2TP-PSK-noNAT
conn L2TP-PSK-noNAT
authby=secret
pfs=no
auto=add
keyingtries=3
rekey=no
type=transport
left=192.168.0.200
leftprotoport=17/1701
right=%any
rightprotoport=17/%any
dpddelay=15
dpdtimeout=30
dpdaction=clear
#Uncomment the line below for OSX on MAC? untested!
#rightprotoport=17/0
xl2tpd.conf
Spoiler
[global]
ipsec saref = yes
[lns default]
ip range = 192.168.1.10-192.168.1.20
local ip = 192.168.0.200
refuse chap = yes
refuse pap = yes
require authentication = yes
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
options.xl2tpd
Spoiler
require-mschap-v2
ms-dns 192.168.0.1
ms-dns 8.8.8.8
asyncmap 0
auth
crtscts
lock
show-password
modem
debug
name l2tpd
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4
chap-secrets
Spoiler
# user server password ip
user l2tpd 1234 *
Я так понимаю, что проблема именно в работе ipsec, но как заставить работать, я вообще не шарю, да и информации, свежей, на эту тему очень мало в нете. Буду очень благодарен за помощь!