LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-16-2014, 01:40 PM   #1
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Rep: Reputation: Disabled
strongswan 4.5.2 on vyatta + Win7 client = random disconnects


so i've finally got an x509 VPN setup on a vyatta-based router, using strongswan v4.5.2. i can successfully connect & transfer large amounts of traffic over the VPN, but at some point i randomly get disconnected; it appears that key renegotiation is failing. there doesn't seem to be a pattern to it; it can stay up for half a day & transfer 10 gigabytes worth before it crashes, or it can stay up for 20 minutes with little traffic before a disconnect. after i get disconnected, i have to restart strongswan before i can connect again.

/etc/ipsec.conf
Code:
# generated by /opt/vyatta/sbin/vpn-config.pl

version 2.0

config setup
        charonstart=no
        interfaces="%none"
        nat_traversal=yes
        virtual_private="%v4:0.0.0.0/0"

conn clear
        auto=ignore

conn clear-or-private
        auto=ignore

conn private-or-clear
        auto=ignore

conn private
        auto=ignore

conn block
        auto=ignore

conn packetdefault
        auto=ignore

conn %default
        keyexchange=ikev1

### Vyatta L2TP VPN Begin ###
include /etc/ipsec.d/tunnels/remote-access
### Vyatta L2TP VPN End ###
/etc/ipsec.d/tunnels/remote-access
Code:
### Vyatta L2TP VPN Begin ###
conn remote-access-win-aaa
  rightprotoport=17/1701
  also=remote-access

conn remote-access-mac-zzz
  rightprotoport=17/%any
  also=remote-access

conn remote-access
  authby=rsasig
  leftrsasigkey=%cert
  rightrsasigkey=%cert
  rightca=%same
  leftcert=/etc/ipsec.d/certs/Gateway.crt
  pfs=no
  left=xx.xx.xx.xx
  leftprotoport=17/1701
  right=%any
  rightsubnet=vhost:%no,%priv
  auto=add
  ike=aes256-sha1,3des-sha1!
  dpddelay=15
  dpdtimeout=45
  dpdaction=clear
  esp=aes256-sha1,3des-sha1!
  rekey=no
  ikelifetime=3600
### Vyatta L2TP VPN End ###
here is server log during a disconnect
Code:
Jun 16 12:59:35 Gateway pluto[3492]: "remote-access-mac-zzz"[201] y.y.y.y:4500 #201: NAT-Traversal: received 2 NAT-OA. using first, ignoring others
Jun 16 12:59:35 Gateway pluto[3492]: "remote-access-mac-zzz"[201] y.y.y.y:4500 #201: IPSec Transform [AES_CBC (128), HMAC_SHA1] refused due to strict flag
Jun 16 12:59:35 Gateway pluto[3492]: "remote-access-mac-zzz"[201] y.y.y.y:4500 #201: responding to Quick Mode
Jun 16 12:59:35 Gateway pluto[3492]: "remote-access-mac-zzz"[201] y.y.y.y:4500 #201: cannot install eroute -- it is in use for "remote-access-mac-zzz"[193] y.y.y.y:4500 #193
Jun 16 12:59:36 Gateway pluto[3492]: "remote-access-mac-zzz"[201] y.y.y.y:4500 #200: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0x00000001 (perhaps this is a duplicated packet)
Jun 16 12:59:36 Gateway pluto[3492]: "remote-access-mac-zzz"[201] y.y.y.y:4500 #200: sending encrypted notification INVALID_MESSAGE_ID to y.y.y.y:4500
Jun 16 12:59:38 Gateway pluto[3492]: "remote-access-mac-zzz"[201] y.y.y.y:4500 #200: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0x00000001 (perhaps this is a duplicated packet)
Jun 16 12:59:38 Gateway pluto[3492]: "remote-access-mac-zzz"[201] y.y.y.y:4500 #200: sending encrypted notification INVALID_MESSAGE_ID to y.y.y.y:4500
Jun 16 12:59:42 Gateway pluto[3492]: "remote-access-mac-zzz"[201] y.y.y.y:4500 #200: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0x00000001 (perhaps this is a duplicated packet)
Jun 16 12:59:42 Gateway pluto[3492]: "remote-access-mac-zzz"[201] y.y.y.y:4500 #200: sending encrypted notification INVALID_MESSAGE_ID to y.y.y.y:4500
Jun 16 12:59:50 Gateway pluto[3492]: "remote-access-mac-zzz"[201] y.y.y.y:4500 #200: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0x00000001 (perhaps this is a duplicated packet)
Jun 16 12:59:50 Gateway pluto[3492]: "remote-access-mac-zzz"[201] y.y.y.y:4500 #200: sending encrypted notification INVALID_MESSAGE_ID to y.y.y.y:4500
 Quick Mode I1 message is unacceptable because it uses a previously used Message ID
those "previously used message IDs" seem to be part of the problem, but as usual, google turns up next to nothing useful, only that other people have had this problem, with no solution.
 
Old 07-09-2014, 04:59 PM   #2
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 38
It looks like the connection may have dropped but the server still sees it as up and it's in use.

Try specifying one of the closeaction options:

closeaction = none | clear | hold | restart

defines the action to take if the remote peer unexpectedly closes a CHILD_SA (IKEv2 only, see dpdaction for
meaning of values). A closeaction should not be used if the peer uses reauthentication or uniqueids checking,
as these events might trigger the defined action when not desired.


Seeing this:
cannot install eroute -- it is in use for "remote-access-mac-zzz"[193] y.y.y.y:4500 #193

makes me think if you did an ipsec auto --status the server would show the connection erouted when it's disconnected.
 
Old 07-13-2014, 03:48 PM   #3
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Original Poster
Rep: Reputation: Disabled
but closeaction is only for IKEv2, and i'm using IKEv1.... in any case, i'm virtually certain the actual link between the client and server isn't dropping, as i've been testing locally, with the client and server separate by just an ethernet cable, and i get the same connection drops.

the device is a Ubiquiti EdgeRouter Lite, which only supports running strongswan with pluto/IKEv1
 
Old 12-29-2014, 09:53 PM   #4
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Original Poster
Rep: Reputation: Disabled
sorry to necropost but, i'm still having the same problem & never got any kind of resolution here. anyone?????
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Random wireless disconnects in openSUSE 11.1 Raaj Linux - Networking 2 09-10-2010 11:58 AM
[SOLVED] Mint8 and win7 random shutdowns Jesse W Linux - General 2 05-05-2010 12:20 AM
Samba Shares on Ubuntu 8.04 - Random Disconnects and Slow copying Zabzoo Linux - Server 1 12-11-2008 03:35 PM
Xandros Surfside 3.0 disconnects dialup at random lan Linux - General 0 11-15-2008 09:07 PM
Random Disconnects Mulsiphix Linux - Networking 1 12-22-2005 08:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration